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.
15 lines
283 B
ArmAsm
15 lines
283 B
ArmAsm
.section .text.foo,"axG",%progbits,foo_group
|
|
.word 0
|
|
|
|
.section .rodata.str.1,"aMSG",%progbits,1,foo_group
|
|
.asciz "abc"
|
|
|
|
.section .data.foo,"waG",%progbits,foo_group
|
|
.word 1
|
|
|
|
.section .dropme,"G",%progbits,foo_group
|
|
.word 2
|
|
|
|
.section .keepme,"G",%progbits,foo_group
|
|
.word 3
|