|
Section ordering is important for _bfd_elf_map_sections_to_segments
and assign_file_positions_for_load_sections, which are only prepared
to handle sections in increasing LMA order. When zero size sections
are involved it is possible to have multiple sections at the same LMA.
In that case the zero size sections must sort before any non-zero size
sections regardless of their types.
bfd/
PR 26907
* elf.c (elf_sort_sections): Don't sort zero size !load sections
after load sections.
ld/
* testsuite/ld-elf/pr26907.ld,
* testsuite/ld-elf/pr26907.s,
* testsuite/ld-elf/pr26907.d: New test.
|