diff options
author | Christophe Lyon <christophe.lyon@st.com> | 2011-09-01 14:10:40 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@st.com> | 2011-09-01 14:10:40 +0000 |
commit | 7d500b8357c0fd219b6a9a9f128d5b982a468cf3 (patch) | |
tree | de281e8f21b8604d86730c412680e024936d311b | |
parent | df6dc84da93e5fb1e2d7e781c1bac4a8bacc334b (diff) | |
download | gdb-7d500b8357c0fd219b6a9a9f128d5b982a468cf3.zip gdb-7d500b8357c0fd219b6a9a9f128d5b982a468cf3.tar.gz gdb-7d500b8357c0fd219b6a9a9f128d5b982a468cf3.tar.bz2 |
2011-09-01 Christophe Lyon <christophe.lyon@st.com>
bfd/
* elf32-arm.c (elf32_arm_output_arch_local_syms): Skip excluded
sections.
ld/testsuite/
* ld-arm/arm-elf.exp: Add new rodata-merge-map test.
* ld-arm/rodata-merge-map.ld: New file.
* ld-arm/rodata-merge-map.sym: Likewise.
* ld-arm/rodata-merge-map1.s Likewise.
* ld-arm/rodata-merge-map2.s: Likewise.
* ld-arm/rodata-merge-map3.s: Likewise.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 3 | ||||
-rw-r--r-- | ld/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/arm-elf.exp | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/rodata-merge-map.ld | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/rodata-merge-map.sym | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/rodata-merge-map1.s | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/rodata-merge-map2.s | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/rodata-merge-map3.s | 9 |
9 files changed, 62 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1bbf84f..7f97fa4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2011-09-01 Christophe Lyon <christophe.lyon@st.com> + + * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip excluded + sections. + 2011-08-26 Nick Clifton <nickc@redhat.com> * po/es.po: Updated Spanish translation. diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 4d407a9..12bbc54 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -14506,7 +14506,8 @@ elf32_arm_output_arch_local_syms (bfd *output_bfd, == SEC_HAS_CONTENTS && get_arm_elf_section_data (osi.sec) != NULL && get_arm_elf_section_data (osi.sec)->mapcount == 0 - && osi.sec->size > 0) + && osi.sec->size > 0 + && (osi.sec->flags & SEC_EXCLUDE) == 0) { osi.sec_shndx = _bfd_elf_section_from_bfd_section (output_bfd, osi.sec->output_section); diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 2edc17d..2de5268 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2011-09-01 Christophe Lyon <christophe.lyon@st.com> + + * ld-arm/arm-elf.exp: Add new rodata-merge-map test. + * ld-arm/rodata-merge-map.ld: New file. + * ld-arm/rodata-merge-map.sym: Likewise. + * ld-arm/rodata-merge-map1.s Likewise. + * ld-arm/rodata-merge-map2.s: Likewise. + * ld-arm/rodata-merge-map3.s: Likewise. + 2011-08-22 Alan Modra <amodra@gmail.com> * ld-powerpc/tocopt4a.s, * ld-powerpc/tocopt4b.s, diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index fbdfadd..c7a0b2c 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -323,6 +323,9 @@ set armelftests { {"Data only mapping symbols" "-T data-only-map.ld -Map map" "" {data-only-map.s} {{objdump -dr data-only-map.d}} "data-only-map"} + {"Data only mapping symbols for merged sections" "-T rodata-merge-map.ld" "" {rodata-merge-map1.s rodata-merge-map2.s rodata-merge-map3.s} + {{readelf -s rodata-merge-map.sym}} + "rodata-merge-map"} {"GOT relocations in executables (setup)" "-shared" "" {exec-got-1a.s} {} diff --git a/ld/testsuite/ld-arm/rodata-merge-map.ld b/ld/testsuite/ld-arm/rodata-merge-map.ld new file mode 100644 index 0000000..0790bcb --- /dev/null +++ b/ld/testsuite/ld-arm/rodata-merge-map.ld @@ -0,0 +1,9 @@ +/* Script for ld testsuite */ +OUTPUT_ARCH(arm) +SECTIONS +{ + .rodata : + { + *(.rodata*) + } +} diff --git a/ld/testsuite/ld-arm/rodata-merge-map.sym b/ld/testsuite/ld-arm/rodata-merge-map.sym new file mode 100644 index 0000000..b1070a3 --- /dev/null +++ b/ld/testsuite/ld-arm/rodata-merge-map.sym @@ -0,0 +1,8 @@ + +Symbol table '.symtab' contains 5 entries: + Num: Value Size Type Bind Vis Ndx Name + 0: 00000000 0 NOTYPE LOCAL DEFAULT UND + 1: 00000000 0 SECTION LOCAL DEFAULT 1 + 2: 00000000 0 SECTION LOCAL DEFAULT 2 + 3: 00000000 0 NOTYPE LOCAL DEFAULT 1 \$d + 4: 0000000c 0 NOTYPE LOCAL DEFAULT 1 \$d diff --git a/ld/testsuite/ld-arm/rodata-merge-map1.s b/ld/testsuite/ld-arm/rodata-merge-map1.s new file mode 100644 index 0000000..df57c4b --- /dev/null +++ b/ld/testsuite/ld-arm/rodata-merge-map1.s @@ -0,0 +1,8 @@ +@ Test to ensure that no nameless mapping symbol is inserted +@ within a merged section. +@ This file contains the 1st contribution, which is expected to +@ generate a $d symbol at its beginning. + + .section .rodata.str1.1,"aMS",%progbits,1 +.LC0: + .string "Hello world" diff --git a/ld/testsuite/ld-arm/rodata-merge-map2.s b/ld/testsuite/ld-arm/rodata-merge-map2.s new file mode 100644 index 0000000..7136774 --- /dev/null +++ b/ld/testsuite/ld-arm/rodata-merge-map2.s @@ -0,0 +1,9 @@ +@ This file contains the 2nd contribution, which is expected to +@ be fully merged into the 1st contribution (from +@ rodata-merge-map1.s), and generate no mapping symbol (which +@ would otherwise be converted in a symbol table entry with no +@ name). + + .section .rodata.str1.1,"aMS",%progbits,1 +.LC0: + .string "world" diff --git a/ld/testsuite/ld-arm/rodata-merge-map3.s b/ld/testsuite/ld-arm/rodata-merge-map3.s new file mode 100644 index 0000000..45aaef0 --- /dev/null +++ b/ld/testsuite/ld-arm/rodata-merge-map3.s @@ -0,0 +1,9 @@ +@ This file contains the 3rd contribution, which is expected to +@ be partially merged into the 1st contribution (from +@ rodata-merge-map1.s), and generate a (redundant, but harmless) +@ $d mapping symbol. + + .section .rodata.str1.1,"aMS",%progbits,1 +.LC0: + .string "foo" + .string "world" |