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.
11 lines
273 B
Makefile
11 lines
273 B
Makefile
#source: group10.s
|
|
#ld: -r -T group.ld
|
|
#readelf: -Sg --wide
|
|
|
|
#...
|
|
group section \[[ 0-9]+\] `foo_group' \[foo_group\] contains 4 sections:
|
|
\[Index\] Name
|
|
\[[ 0-9]+\] \.text.*
|
|
\[[ 0-9]+\] \.rodata\.str.*
|
|
\[[ 0-9]+\] \.data.*
|
|
\[[ 0-9]+\] \.keepme.*
|