diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2008-08-07 20:01:14 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2008-08-07 20:01:14 +0000 |
commit | 23cc69b6636ef7c99fd9b1e076d683e1a96283df (patch) | |
tree | 340efdd865bb90a3d8334af47651ded197ef859e /ld/testsuite | |
parent | bd8aab1c2944a603af1182db1d81cfbd832d162a (diff) | |
download | gdb-23cc69b6636ef7c99fd9b1e076d683e1a96283df.zip gdb-23cc69b6636ef7c99fd9b1e076d683e1a96283df.tar.gz gdb-23cc69b6636ef7c99fd9b1e076d683e1a96283df.tar.bz2 |
bfd/
* elfxx-mips.c (mips_got_info): Add a "reloc_only_gotno" field.
(mips_elf_got_section): Delete.
(mips_elf_sort_hash_table): Use g->reloc_only_gotno to decide
how many reloc-only entries there are.
(mips_elf_count_got_symbols): Adjust g->reloc_only_gotno as
well as g->global_gotno.
(mips_elf_make_got_per_bfd): Initialize reloc_only_gotno.
(mips_elf_multi_got): Likewise. Use gg->reloc_only_gotno
rather than gg->assigned_gotno to store the number of
reloc-only GOT entries.
(mips_elf_create_got_section): Remove the MAYBE_EXCLUDE parameter.
Initialize reloc_only_gotno.
(mips_elf_calculate_relocation): Check htab->got_info instead of
dynobj when deciding whether to call mips_elf_adjust_gp,
(_bfd_mips_elf_create_dynamic_sections): Adjust the call
to mips_elf_create_got_section.
(mips_elf_record_relocs): Likewise. Remove redundant
"dynobj == NULL" code. Do not use mips_elf_create_got_section
or mips_elf_record_global_got_symbol for R_MIPS_32, R_MIPS_REL32
and R_MIPS_64; limit global_got_area to GGA_RELOC_ONLY instead.
(_bfd_mips_elf_finish_dynamic_symbol): Use htab->sgot instead
of mips_elf_got_section.
(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
(_bfd_mips_elf_finish_dynamic_sections): Likewise.
Move the initial assignment of G to the block that uses it;
it is used for an unrelated purpose later.
ld/testsuite/
* ld-mips-elf/tls-hidden4.got, ld-mips-elf/tls-hidden4.r: We have
removed an unused GOT entry that was allocated for the R_MIPS_32
relocation against "undef", so adjust addresses down by 4 bytes.
* ld-mips-elf/got-dump-1.d, ld-mips-elf/got-dump-2.d: We have
changed the order of the GOT entries so that reloc-only ones
come last. "undef" is only referred to by dynamic relocations,
so it now comes after "glob".
* ld-mips-elf/mips16-pic-2.dd, ld-mips-elf/mips16-pic-2.gd,
ld-mips-elf/mips16-pic-2.nd, ld-mips-elf/mips16-pic-2.rd: We have
removed two unused local GOT entries that were originally created
as global entries for the hidden symbols "used2" and "used3".
"used4" and "used5" are only referred to by relocations, so they
now come after "used6" and "used7".
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/got-dump-1.d | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/got-dump-2.d | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips16-pic-2.dd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips16-pic-2.gd | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips16-pic-2.nd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips16-pic-2.rd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/tls-hidden4.got | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/tls-hidden4.r | 4 |
9 files changed, 34 insertions, 19 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index d40ec92..9294772 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,21 @@ 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com> + * ld-mips-elf/tls-hidden4.got, ld-mips-elf/tls-hidden4.r: We have + removed an unused GOT entry that was allocated for the R_MIPS_32 + relocation against "undef", so adjust addresses down by 4 bytes. + * ld-mips-elf/got-dump-1.d, ld-mips-elf/got-dump-2.d: We have + changed the order of the GOT entries so that reloc-only ones + come last. "undef" is only referred to by dynamic relocations, + so it now comes after "glob". + * ld-mips-elf/mips16-pic-2.dd, ld-mips-elf/mips16-pic-2.gd, + ld-mips-elf/mips16-pic-2.nd, ld-mips-elf/mips16-pic-2.rd: We have + removed two unused local GOT entries that were originally created + as global entries for the hidden symbols "used2" and "used3". + "used4" and "used5" are only referred to by relocations, so they + now come after "used6" and "used7". + +2008-08-07 Richard Sandiford <rdsandiford@googlemail.com> + * ld-mips-elf/got-vers-1a.s, ld-mips-elf/got-vers-1b.s, ld-mips-elf/got-vers-1.ver, ld-mips-elf/got-vers-1.dd, ld-mips-elf/got-vers-1.sd, ld-mips-elf/got-vers-1.rd: New tests. diff --git a/ld/testsuite/ld-mips-elf/got-dump-1.d b/ld/testsuite/ld-mips-elf/got-dump-1.d index eaf9c6b..b14adff 100644 --- a/ld/testsuite/ld-mips-elf/got-dump-1.d +++ b/ld/testsuite/ld-mips-elf/got-dump-1.d @@ -20,6 +20,6 @@ Primary GOT: Global entries: Address Access Initial Sym.Val. Type Ndx Name 00060020 -32736\(gp\) 00050020 00050020 FUNC UND extern - 00060024 -32732\(gp\) 00000000 00000000 NOTYPE UND undef - 00060028 -32728\(gp\) 00050000 00050000 FUNC 7 glob + 00060024 -32732\(gp\) 00050000 00050000 FUNC 7 glob + 00060028 -32728\(gp\) 00000000 00000000 NOTYPE UND undef diff --git a/ld/testsuite/ld-mips-elf/got-dump-2.d b/ld/testsuite/ld-mips-elf/got-dump-2.d index 1e656f0..56cc0b3 100644 --- a/ld/testsuite/ld-mips-elf/got-dump-2.d +++ b/ld/testsuite/ld-mips-elf/got-dump-2.d @@ -20,6 +20,6 @@ Primary GOT: Global entries: Address Access Initial Sym.Val. Type Ndx Name 0001236000000030 -32720\(gp\) 0001235000000020 0001235000000020 FUNC UND extern - 0001236000000038 -32712\(gp\) 0000000000000000 0000000000000000 NOTYPE UND undef - 0001236000000040 -32704\(gp\) 0001235000000000 0001235000000000 FUNC 7 glob + 0001236000000038 -32712\(gp\) 0001235000000000 0001235000000000 FUNC 7 glob + 0001236000000040 -32704\(gp\) 0000000000000000 0000000000000000 NOTYPE UND undef diff --git a/ld/testsuite/ld-mips-elf/mips16-pic-2.dd b/ld/testsuite/ld-mips-elf/mips16-pic-2.dd index 75ea6dc..7052057 100644 --- a/ld/testsuite/ld-mips-elf/mips16-pic-2.dd +++ b/ld/testsuite/ld-mips-elf/mips16-pic-2.dd @@ -77,7 +77,7 @@ Disassembly of section \.text: .*: [^\t]* move t9,v0 .*: [^\t]* lw v0,16\(sp\) .*: [^\t]* move gp,v0 -.*: [^\t]* lw v0,-32708\(v0\) +.*: [^\t]* lw v0,-32716\(v0\) .*: [^\t]* jalr v0 .*: [^\t]* move t9,v0 .*: [^\t]* lw v0,16\(sp\) @@ -101,7 +101,7 @@ Disassembly of section \.text: .*: [^\t]* move t9,v0 .*: [^\t]* lw v0,16\(sp\) .*: [^\t]* move gp,v0 -.*: [^\t]* lw v0,-32696\(v0\) +.*: [^\t]* lw v0,-32712\(v0\) .*: [^\t]* jalr v0 .*: [^\t]* move t9,v0 .*: [^\t]* lw v0,16\(sp\) diff --git a/ld/testsuite/ld-mips-elf/mips16-pic-2.gd b/ld/testsuite/ld-mips-elf/mips16-pic-2.gd index ebc341e..d8d1451 100644 --- a/ld/testsuite/ld-mips-elf/mips16-pic-2.gd +++ b/ld/testsuite/ld-mips-elf/mips16-pic-2.gd @@ -16,13 +16,11 @@ Primary GOT: 00050018 -32728\(gp\) 00000000 0005001c -32724\(gp\) 00000000 00050020 -32720\(gp\) 00000000 - 00050024 -32716\(gp\) 00000000 - 00050028 -32712\(gp\) 00000000 Global entries: Address Access Initial Sym\.Val\. Type Ndx Name - 0005002c -32708\(gp\) 00040574 00040574 FUNC 6 used6 + 00050024 -32716\(gp\) 00040574 00040574 FUNC 6 used6 + 00050028 -32712\(gp\) 00040598 00040598 FUNC 6 used7 + 0005002c -32708\(gp\) 00040550 00040550 FUNC 6 used5 00050030 -32704\(gp\) 0004052c 0004052c FUNC 6 used4 - 00050034 -32700\(gp\) 00040550 00040550 FUNC 6 used5 - 00050038 -32696\(gp\) 00040598 00040598 FUNC 6 used7 diff --git a/ld/testsuite/ld-mips-elf/mips16-pic-2.nd b/ld/testsuite/ld-mips-elf/mips16-pic-2.nd index c4ad9fd..a2b67b6 100644 --- a/ld/testsuite/ld-mips-elf/mips16-pic-2.nd +++ b/ld/testsuite/ld-mips-elf/mips16-pic-2.nd @@ -3,8 +3,8 @@ 4: 000405bc 36 FUNC GLOBAL DEFAULT .* used8 5: .* _GLOBAL_OFFSET_TABLE_ 6: 00040574 36 FUNC GLOBAL DEFAULT .* used6 - 7: 0004052c 36 FUNC GLOBAL DEFAULT .* used4 + 7: 00040598 36 FUNC GLOBAL DEFAULT .* used7 8: 00040550 36 FUNC GLOBAL DEFAULT .* used5 - 9: 00040598 36 FUNC GLOBAL DEFAULT .* used7 + 9: 0004052c 36 FUNC GLOBAL DEFAULT .* used4 #pass diff --git a/ld/testsuite/ld-mips-elf/mips16-pic-2.rd b/ld/testsuite/ld-mips-elf/mips16-pic-2.rd index 8411dbe..09a97b7 100644 --- a/ld/testsuite/ld-mips-elf/mips16-pic-2.rd +++ b/ld/testsuite/ld-mips-elf/mips16-pic-2.rd @@ -5,5 +5,5 @@ Relocation section '\.rel\.dyn' .*: 0+50400 * [0-9]+ * R_MIPS_REL32 * 0+50404 * [0-9]+ * R_MIPS_REL32 * 0+50410 * [0-9]+ * R_MIPS_REL32 * -0+50408 * [0-9]+ * R_MIPS_REL32 * 0004052c * used4 0+50414 * [0-9]+ * R_MIPS_REL32 * 00040550 * used5 +0+50408 * [0-9]+ * R_MIPS_REL32 * 0004052c * used4 diff --git a/ld/testsuite/ld-mips-elf/tls-hidden4.got b/ld/testsuite/ld-mips-elf/tls-hidden4.got index 0c90da2..e6b2115 100644 --- a/ld/testsuite/ld-mips-elf/tls-hidden4.got +++ b/ld/testsuite/ld-mips-elf/tls-hidden4.got @@ -15,8 +15,8 @@ Contents of section \.got: # entry for each symbol. # #... - 1c4010 00000000 00000000 0000abc8 0000abcc .* - 1c4020 0000abc0 0000abc4 00000000 80000000 .* + 1c4010 00000000 0000abc8 0000abcc 0000abc0 .* + 1c4020 0000abc4 00000000 80000000 00000000 .* # # Likewise, but the order of the entries in this GOT is: # @@ -25,4 +25,5 @@ Contents of section \.got: # foo0 # foo1 #... - 1d0030 0000abcc 0000abc8 0000abc0 0000abc4 .* + 1d0020 00000000 00000000 00000000 0000abcc .* + 1d0030 0000abc8 0000abc0 0000abc4 .* diff --git a/ld/testsuite/ld-mips-elf/tls-hidden4.r b/ld/testsuite/ld-mips-elf/tls-hidden4.r index 7a9353d..ccf2e80 100644 --- a/ld/testsuite/ld-mips-elf/tls-hidden4.r +++ b/ld/testsuite/ld-mips-elf/tls-hidden4.r @@ -7,13 +7,13 @@ Relocation section '\.rel\.dyn' at offset .* contains .* entries: # important thing is that there is exactly one entry per GOT TLS slot # and that the addresses match those in the .got dump. # +001c4014 0000002f R_MIPS_TLS_TPREL3 001c4018 0000002f R_MIPS_TLS_TPREL3 001c401c 0000002f R_MIPS_TLS_TPREL3 001c4020 0000002f R_MIPS_TLS_TPREL3 -001c4024 0000002f R_MIPS_TLS_TPREL3 +001d002c 0000002f R_MIPS_TLS_TPREL3 001d0030 0000002f R_MIPS_TLS_TPREL3 001d0034 0000002f R_MIPS_TLS_TPREL3 001d0038 0000002f R_MIPS_TLS_TPREL3 -001d003c 0000002f R_MIPS_TLS_TPREL3 .* R_MIPS_REL32 .* #pass |