mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
8d748d1dc5
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.
8 lines
102 B
Plaintext
8 lines
102 B
Plaintext
ENTRY (_start)
|
|
SECTIONS
|
|
{
|
|
.text : { *(.text) }
|
|
.bss : { . = .; *(.bss) }
|
|
.data : { *(.data) }
|
|
}
|