aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2006-10-19 13:42:17 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2006-10-19 13:42:17 +0000
commit6a4837657a02883bda341796fe407ee988cd0695 (patch)
tree2677bdcb07f219785abee474061f6a4eb91206ac /ld
parent76101e23e55ea5df7a9db630067a991e3f960c84 (diff)
downloadgdb-6a4837657a02883bda341796fe407ee988cd0695.zip
gdb-6a4837657a02883bda341796fe407ee988cd0695.tar.gz
gdb-6a4837657a02883bda341796fe407ee988cd0695.tar.bz2
bfd/
* elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG and DT_MIPS_RLD_MAP tags for position-independent executables. Do not add DT_DEBUG to shared libraries for any MIPS target. ld/testsuite/ * ld-mips-elf/multi-got-1.d: Remove DT_DEBUG tag. Do not require a specific file offset for .dynamic. Reduce DT_HASH by 8 to account for removed tag. * ld-mips-elf/tls-multi-got-1.r: Likewise. Also reduce DT_REL by 8. Reduce PLTGOT and symbol values by 16 to account for the removed tag. * ld-mips-elf/textrel-1.d: Remove DT_DEBUG tag. * ld-mips-elf/rel32-n32.d: Reduce addresses by 16 to account for removed DT_DEBUG tag. * ld-mips-elf/rel64.d: Likewise. * ld-mips-elf/tls-multi-got-1.got: Likewise. * ld-mips-elf/tlslib-o32-hidden.got: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog14
-rw-r--r--ld/testsuite/ld-mips-elf/multi-got-1.d5
-rw-r--r--ld/testsuite/ld-mips-elf/rel32-n32.d6
-rw-r--r--ld/testsuite/ld-mips-elf/rel64.d6
-rw-r--r--ld/testsuite/ld-mips-elf/textrel-1.d3
-rw-r--r--ld/testsuite/ld-mips-elf/tls-multi-got-1.got34
-rw-r--r--ld/testsuite/ld-mips-elf/tls-multi-got-1.r17
-rw-r--r--ld/testsuite/ld-mips-elf/tlslib-o32-hidden.got14
8 files changed, 55 insertions, 44 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index fd5bee9..da65ae6 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,17 @@
+2006-10-19 Richard Sandiford <richard@codesourcery.com>
+
+ * ld-mips-elf/multi-got-1.d: Remove DT_DEBUG tag. Do not require
+ a specific file offset for .dynamic. Reduce DT_HASH by 8 to account
+ for removed tag.
+ * ld-mips-elf/tls-multi-got-1.r: Likewise. Also reduce DT_REL by 8.
+ Reduce PLTGOT and symbol values by 16 to account for the removed tag.
+ * ld-mips-elf/textrel-1.d: Remove DT_DEBUG tag.
+ * ld-mips-elf/rel32-n32.d: Reduce addresses by 16 to account for
+ removed DT_DEBUG tag.
+ * ld-mips-elf/rel64.d: Likewise.
+ * ld-mips-elf/tls-multi-got-1.got: Likewise.
+ * ld-mips-elf/tlslib-o32-hidden.got: Likewise.
+
2006-10-18 H.J. Lu <hongjiu.lu@intel.com>
PR ld/3290
diff --git a/ld/testsuite/ld-mips-elf/multi-got-1.d b/ld/testsuite/ld-mips-elf/multi-got-1.d
index 1ba5f4b..610cfad 100644
--- a/ld/testsuite/ld-mips-elf/multi-got-1.d
+++ b/ld/testsuite/ld-mips-elf/multi-got-1.d
@@ -5,14 +5,13 @@
#ld: -melf32btsmip -shared
#readelf: -d -r
-Dynamic section at offset 0xcc contains 18 entries:
+Dynamic section at offset .* contains 17 entries:
Tag Type Name/Value
- 0x00000004 \(HASH\) 0x184
+ 0x00000004 \(HASH\) 0x17c
0x00000005 \(STRTAB\) 0x[0-9a-f]+
0x00000006 \(SYMTAB\) 0x[0-9a-f]+
0x0000000a \(STRSZ\) [0-9]+ \(bytes\)
0x0000000b \(SYMENT\) 16 \(bytes\)
- 0x00000015 \(DEBUG\) 0x0
0x00000003 \(PLTGOT\) 0x[0-9a-f]+
0x00000011 \(REL\) 0x[0-9a-f]+
0x00000012 \(RELSZ\) 65544 \(bytes\)
diff --git a/ld/testsuite/ld-mips-elf/rel32-n32.d b/ld/testsuite/ld-mips-elf/rel32-n32.d
index 3c6b093..3764f40 100644
--- a/ld/testsuite/ld-mips-elf/rel32-n32.d
+++ b/ld/testsuite/ld-mips-elf/rel32-n32.d
@@ -10,6 +10,6 @@ Relocation section '.rel.dyn' at offset .* contains 2 entries:
[0-9a-f ]+R_MIPS_REL32
Hex dump of section '.text':
- 0x000002d0 00000000 00000000 00000000 00000000 ................
- 0x000002e0 000002e0 00000000 00000000 00000000 ................
- 0x000002f0 00000000 00000000 00000000 00000000 ................
+ 0x000002c0 00000000 00000000 00000000 00000000 ................
+ 0x000002d0 000002d0 00000000 00000000 00000000 ................
+ 0x000002e0 00000000 00000000 00000000 00000000 ................
diff --git a/ld/testsuite/ld-mips-elf/rel64.d b/ld/testsuite/ld-mips-elf/rel64.d
index 34b3b45..c3e0913 100644
--- a/ld/testsuite/ld-mips-elf/rel64.d
+++ b/ld/testsuite/ld-mips-elf/rel64.d
@@ -14,6 +14,6 @@ Relocation section '.rel.dyn' at offset .* contains 2 entries:
+Type3: R_MIPS_NONE
Hex dump of section '.text':
- 0x00000430 00000000 00000000 00000000 00000000 ................
- 0x00000440 00000000 00000440 00000000 00000000 ................
- 0x00000450 00000000 00000000 00000000 00000000 ................
+ 0x00000420 00000000 00000000 00000000 00000000 ................
+ 0x00000430 00000000 00000430 00000000 00000000 ................
+ 0x00000440 00000000 00000000 00000000 00000000 ................
diff --git a/ld/testsuite/ld-mips-elf/textrel-1.d b/ld/testsuite/ld-mips-elf/textrel-1.d
index 945c863..16bd727 100644
--- a/ld/testsuite/ld-mips-elf/textrel-1.d
+++ b/ld/testsuite/ld-mips-elf/textrel-1.d
@@ -4,14 +4,13 @@
#ld: -shared -melf32btsmipn32
#readelf: -d
-Dynamic section at offset .* contains 18 entries:
+Dynamic section at offset .* contains 17 entries:
Tag Type Name/Value
0x00000004 \(HASH\) 0x[0-9a-f]*
0x00000005 \(STRTAB\) 0x[0-9a-f]*
0x00000006 \(SYMTAB\) 0x[0-9a-f]*
0x0000000a \(STRSZ\) [0-9]* \(bytes\)
0x0000000b \(SYMENT\) 16 \(bytes\)
- 0x00000015 \(DEBUG\) 0x0
0x00000003 \(PLTGOT\) 0x[0-9a-f]*
0x00000011 \(REL\) 0x[0-9a-f]*
0x00000012 \(RELSZ\) 8 \(bytes\)
diff --git a/ld/testsuite/ld-mips-elf/tls-multi-got-1.got b/ld/testsuite/ld-mips-elf/tls-multi-got-1.got
index 7e113d6..1d5e216 100644
--- a/ld/testsuite/ld-mips-elf/tls-multi-got-1.got
+++ b/ld/testsuite/ld-mips-elf/tls-multi-got-1.got
@@ -4,17 +4,17 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
00000000 R_MIPS_NONE \*ABS\*
-001495c0 R_MIPS_TLS_DTPMOD32 \*ABS\*
-0013f938 R_MIPS_TLS_DTPMOD32 \*ABS\*
-001495cc R_MIPS_TLS_DTPMOD32 tlsvar_gd
-001495d0 R_MIPS_TLS_DTPREL32 tlsvar_gd
-0013f944 R_MIPS_TLS_DTPMOD32 tlsvar_gd
-0013f948 R_MIPS_TLS_DTPREL32 tlsvar_gd
-001495c8 R_MIPS_TLS_TPREL32 tlsvar_ie
-0013f940 R_MIPS_TLS_TPREL32 tlsvar_ie
-00143f6c R_MIPS_REL32 sym_1_9526
+001495b0 R_MIPS_TLS_DTPMOD32 \*ABS\*
+0013f928 R_MIPS_TLS_DTPMOD32 \*ABS\*
+001495bc R_MIPS_TLS_DTPMOD32 tlsvar_gd
+001495c0 R_MIPS_TLS_DTPREL32 tlsvar_gd
+0013f934 R_MIPS_TLS_DTPMOD32 tlsvar_gd
+0013f938 R_MIPS_TLS_DTPREL32 tlsvar_gd
+001495b8 R_MIPS_TLS_TPREL32 tlsvar_ie
+0013f930 R_MIPS_TLS_TPREL32 tlsvar_ie
+00143f5c R_MIPS_REL32 sym_1_9526
#...
-00139bc0 R_MIPS_REL32 sym_2_8654
+00139bb0 R_MIPS_REL32 sym_2_8654
00000000 R_MIPS_NONE \*ABS\*
00000000 R_MIPS_NONE \*ABS\*
00000000 R_MIPS_NONE \*ABS\*
@@ -40,19 +40,19 @@ OFFSET TYPE VALUE
Contents of section .got:
- 122410 00000000 80000000 00000000 00000000 .*
+ 122400 00000000 80000000 00000000 00000000 .*
+ 122410 00000000 00000000 00000000 00000000 .*
122420 00000000 00000000 00000000 00000000 .*
- 122430 00000000 00000000 00000000 00000000 .*
- 122440 00000000 000d8038 000d6694 000d2044 .*
+ 122430 00000000 000d8028 000d6684 000d2034 .*
#...
+ 13f910 00000000 00000000 00000000 00000000 .*
13f920 00000000 00000000 00000000 00000000 .*
13f930 00000000 00000000 00000000 00000000 .*
- 13f940 00000000 00000000 00000000 00000000 .*
- 13f950 80000000 00000000 00000000 00000000 .*
+ 13f940 80000000 00000000 00000000 00000000 .*
#...
+ 149580 00000000 00000000 00000000 00000000 .*
149590 00000000 00000000 00000000 00000000 .*
1495a0 00000000 00000000 00000000 00000000 .*
1495b0 00000000 00000000 00000000 00000000 .*
- 1495c0 00000000 00000000 00000000 00000000 .*
- 1495d0 00000000 .*
+ 1495c0 00000000 .*
#pass
diff --git a/ld/testsuite/ld-mips-elf/tls-multi-got-1.r b/ld/testsuite/ld-mips-elf/tls-multi-got-1.r
index 51f3ab1..3befcd7 100644
--- a/ld/testsuite/ld-mips-elf/tls-multi-got-1.r
+++ b/ld/testsuite/ld-mips-elf/tls-multi-got-1.r
@@ -1,14 +1,13 @@
-Dynamic section at offset 0xec contains 19 entries:
+Dynamic section at offset .* contains 18 entries:
Tag Type Name/Value
- 0x00000004 \(HASH\) 0x1ac
+ 0x00000004 \(HASH\) 0x1a4
0x00000005 \(STRTAB\).*
0x00000006 \(SYMTAB\).*
0x0000000a \(STRSZ\) 220091 \(bytes\)
0x0000000b \(SYMENT\) 16 \(bytes\)
- 0x00000015 \(DEBUG\) 0x0
- 0x00000003 \(PLTGOT\) 0x122410
- 0x00000011 \(REL\) 0xa7960
+ 0x00000003 \(PLTGOT\) 0x122400
+ 0x00000011 \(REL\) 0xa7958
0x00000012 \(RELSZ\) 160072 \(bytes\)
0x00000013 \(RELENT\) 8 \(bytes\)
0x70000001 \(MIPS_RLD_VERSION\) 1
@@ -32,9 +31,9 @@ Relocation section '\.rel\.dyn' at offset 0x[0-9a-f]+ contains 20031 entries:
[0-9a-f ]+R_MIPS_TLS_DTPREL 00000000 tlsvar_gd
[0-9a-f ]+R_MIPS_TLS_TPREL3 00000004 tlsvar_ie
[0-9a-f ]+R_MIPS_TLS_TPREL3 00000004 tlsvar_ie
-[0-9a-f ]+R_MIPS_REL32 000d8038 sym_1_9526
-[0-9a-f ]+R_MIPS_REL32 000d6694 sym_1_7885
+[0-9a-f ]+R_MIPS_REL32 000d8028 sym_1_9526
+[0-9a-f ]+R_MIPS_REL32 000d6684 sym_1_7885
#...
-[0-9a-f ]+R_MIPS_REL32 000cf2a4 sym_1_0465
-[0-9a-f ]+R_MIPS_REL32 000e0ee8 sym_2_8654
+[0-9a-f ]+R_MIPS_REL32 000cf294 sym_1_0465
+[0-9a-f ]+R_MIPS_REL32 000e0ed8 sym_2_8654
#...
diff --git a/ld/testsuite/ld-mips-elf/tlslib-o32-hidden.got b/ld/testsuite/ld-mips-elf/tlslib-o32-hidden.got
index e1d64e0..22d048a 100644
--- a/ld/testsuite/ld-mips-elf/tlslib-o32-hidden.got
+++ b/ld/testsuite/ld-mips-elf/tlslib-o32-hidden.got
@@ -4,13 +4,13 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
00000000 R_MIPS_NONE \*ABS\*
-000403cc R_MIPS_TLS_DTPMOD32 \*ABS\*
-000403c4 R_MIPS_TLS_DTPMOD32 \*ABS\*
-000403c0 R_MIPS_TLS_TPREL32 \*ABS\*
+000403bc R_MIPS_TLS_DTPMOD32 \*ABS\*
+000403b4 R_MIPS_TLS_DTPMOD32 \*ABS\*
+000403b0 R_MIPS_TLS_TPREL32 \*ABS\*
Contents of section .got:
- 403a0 00000000 80000000 00000000 00000000 ................
- 403b0 00000000 00000000 00000000 00000370 ................
- 403c0 00000008 00000000 00000000 00000000 ................
- 403d0 ffff8004 ....
+ 40390 00000000 80000000 00000000 00000000 ................
+ 403a0 00000000 00000000 00000000 00000360 ................
+ 403b0 00000008 00000000 00000000 00000000 ................
+ 403c0 ffff8004 ....