diff options
author | Alan Modra <amodra@gmail.com> | 2010-02-19 01:47:16 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2010-02-19 01:47:16 +0000 |
commit | d0bf826b37bdeb1ad98dc2d601b450bd5b9043e5 (patch) | |
tree | 6228351f86e84b5f27cf405eaa860fb830cc861a /ld/testsuite | |
parent | 220453ec97481311a3cfd0d1a191c1bfe24f3b53 (diff) | |
download | gdb-d0bf826b37bdeb1ad98dc2d601b450bd5b9043e5.zip gdb-d0bf826b37bdeb1ad98dc2d601b450bd5b9043e5.tar.gz gdb-d0bf826b37bdeb1ad98dc2d601b450bd5b9043e5.tar.bz2 |
bfd/
* 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.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/group.ld | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/group10.d | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/group10.s | 14 |
4 files changed, 31 insertions, 1 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 8e075ed..e170dfc 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-02-19 Alan Modra <amodra@gmail.com> + + * ld-elf/group.ld: Discard .dropme sections. + * ld-elf/group10.d, * ld-elf/group10.s: New test. + 2010-02-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> * ld-arm/attr-merge-6.attr: Add new test. Missed off last commit. diff --git a/ld/testsuite/ld-elf/group.ld b/ld/testsuite/ld-elf/group.ld index 58d78da..123ab26 100644 --- a/ld/testsuite/ld-elf/group.ld +++ b/ld/testsuite/ld-elf/group.ld @@ -2,5 +2,5 @@ SECTIONS { . = 0x1000; .text : { *(.text) *(.rodata.brlt) } - /DISCARD/ : { *(.reginfo) } + /DISCARD/ : { *(.dropme) *(.reginfo) } } diff --git a/ld/testsuite/ld-elf/group10.d b/ld/testsuite/ld-elf/group10.d new file mode 100644 index 0000000..d22a70a --- /dev/null +++ b/ld/testsuite/ld-elf/group10.d @@ -0,0 +1,11 @@ +#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.* diff --git a/ld/testsuite/ld-elf/group10.s b/ld/testsuite/ld-elf/group10.s new file mode 100644 index 0000000..57704b4 --- /dev/null +++ b/ld/testsuite/ld-elf/group10.s @@ -0,0 +1,14 @@ + .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 |