mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 03:03:31 +08:00
d0bf826b37
* elf.c (_bfd_elf_fixup_group_sections): New function, split out from.. (_bfd_elf_copy_private_header_data): ..here. * elflink.c (_bfd_elf_size_group_sections): New function. (bfd_elf_size_dynamic_sections): Call it. * elf-bfd.h (_bfd_elf_size_group_sections): Declare. (_bfd_elf_fixup_group_sections): Declare. ld/ * ldlang.c (unique_section_p): Add os param. Allow group sections to match /DISCARD/. Update all callers. * emultempl/genelf.em (gld${EMULATION_NAME}_before_allocation): New. (LDEMUL_BEFORE_ALLOCATION): Define. ld/testsuite/ * ld-elf/group.ld: Discard .dropme sections. * ld-elf/group10.d, * ld-elf/group10.s: New test.
7 lines
107 B
Plaintext
7 lines
107 B
Plaintext
SECTIONS
|
|
{
|
|
. = 0x1000;
|
|
.text : { *(.text) *(.rodata.brlt) }
|
|
/DISCARD/ : { *(.dropme) *(.reginfo) }
|
|
}
|