mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
fix(ldgen): enable default name SORT in linker fragment
Currently, the `SORT` flag mandates the inclusion of at least the `sort_by_first` argument in the grammar, despite the documentation[1] indicating that `SORT` can be utilized without any arguments, defaulting to sorting input sections by name. Fix this by modifying the grammar to allow a default `SORT` and update a test accordingly. [1] https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/ linker-script-generation.html Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
@@ -705,6 +705,7 @@ entries:
|
||||
archive: libmain.a
|
||||
entries:
|
||||
obj1 (default);
|
||||
text->flash_text SORT(),
|
||||
text->flash_text SORT(name),
|
||||
rodata->flash_rodata SORT(alignment),
|
||||
data->dram0_data SORT(init_priority),
|
||||
@@ -717,7 +718,8 @@ entries:
|
||||
fragment_file = parse_fragment_file(test_fragment, self.sdkconfig)
|
||||
fragment = fragment_file.fragments[0]
|
||||
|
||||
expected = [Flag('text', 'flash_text', [Sort('name')]),
|
||||
expected = [Flag('text', 'flash_text', [Sort()]),
|
||||
Flag('text', 'flash_text', [Sort('name')]),
|
||||
Flag('rodata', 'flash_rodata', [Sort('alignment')]),
|
||||
Flag('data', 'dram0_data', [Sort('init_priority')]),
|
||||
Flag('bss', 'dram0_bss', [Sort('name', 'alignment')]),
|
||||
|
||||
Reference in New Issue
Block a user