aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2006-10-20 07:55:37 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2006-10-20 07:55:37 +0000
commit5427f821ae3f03e66f93914e805284a08dbc0df1 (patch)
treec5390492508a17affb502437c4552276dfc34e30 /ld
parentf86172a554d0c568bc134cb7816f41df1c739475 (diff)
downloadgdb-5427f821ae3f03e66f93914e805284a08dbc0df1.zip
gdb-5427f821ae3f03e66f93914e805284a08dbc0df1.tar.gz
gdb-5427f821ae3f03e66f93914e805284a08dbc0df1.tar.bz2
ld/
* emulparams/elf32bmip.sh (OTHER_GOT_RELOC_SECTIONS): Define. * emulparams/elf32bmipn32-defs.sh (OTHER_GOT_RELOC_SECTIONS): Likewise. ld/testsuite/ * ld-mips-elf/rel32-o32.d: Bump the section number of .text by 1 to account for the fact that .rel.dyn is now before .text in the section table. * ld-mips-elf/rel32-n32.d: Likewise. * ld-mips-elf/rel64.d: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/emulparams/elf32bmip.sh7
-rw-r--r--ld/emulparams/elf32bmipn32-defs.sh7
-rw-r--r--ld/testsuite/ChangeLog8
-rw-r--r--ld/testsuite/ld-mips-elf/rel32-n32.d2
-rw-r--r--ld/testsuite/ld-mips-elf/rel32-o32.d2
-rw-r--r--ld/testsuite/ld-mips-elf/rel64.d2
7 files changed, 30 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 99b3340..e4e9a74 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-20 Richard Sandiford <richard@codesourcery.com>
+
+ * emulparams/elf32bmip.sh (OTHER_GOT_RELOC_SECTIONS): Define.
+ * emulparams/elf32bmipn32-defs.sh (OTHER_GOT_RELOC_SECTIONS): Likewise.
+
2006-10-19 Alan Modra <amodra@bigpond.net.au>
* emultempl/armelf.em (arm_elf_before_allocation): Run
diff --git a/ld/emulparams/elf32bmip.sh b/ld/emulparams/elf32bmip.sh
index 8fda60b..e1d6d34 100644
--- a/ld/emulparams/elf32bmip.sh
+++ b/ld/emulparams/elf32bmip.sh
@@ -20,6 +20,13 @@ INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
.reginfo ${RELOCATING-0} : { *(.reginfo) }
"
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
+# Unlike most targets, the MIPS backend puts all dynamic relocations
+# in a single dynobj section, which it also calls ".rel.dyn". It does
+# this so that it can easily sort all dynamic relocations before the
+# output section has been populated.
+OTHER_GOT_RELOC_SECTIONS="
+ .rel.dyn ${RELOCATING-0} : { *(.rel.dyn) }
+"
# If the output has a GOT section, there must be exactly 0x7ff0 bytes
# between .got and _gp. The ". = ." below stops the orphan code from
# inserting other sections between the assignment to _gp and the start
diff --git a/ld/emulparams/elf32bmipn32-defs.sh b/ld/emulparams/elf32bmipn32-defs.sh
index 4091ff4..49d2f85 100644
--- a/ld/emulparams/elf32bmipn32-defs.sh
+++ b/ld/emulparams/elf32bmipn32-defs.sh
@@ -37,6 +37,13 @@ TEXT_START_ADDR=0x10000000
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
ENTRY=__start
+# Unlike most targets, the MIPS backend puts all dynamic relocations
+# in a single dynobj section, which it also calls ".rel.dyn". It does
+# this so that it can easily sort all dynamic relocations before the
+# output section has been populated.
+OTHER_GOT_RELOC_SECTIONS="
+ .rel.dyn ${RELOCATING-0} : { *(.rel.dyn) }
+"
# GOT-related settings.
# If the output has a GOT section, there must be exactly 0x7ff0 bytes
# between .got and _gp. The ". = ." below stops the orphan code from
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 3f72a2f..9584b47 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2006-10-20 Richard Sandiford <richard@codesourcery.com>
+
+ * ld-mips-elf/rel32-o32.d: Bump the section number of .text by 1
+ to account for the fact that .rel.dyn is now before .text in the
+ section table.
+ * ld-mips-elf/rel32-n32.d: Likewise.
+ * ld-mips-elf/rel64.d: Likewise.
+
2006-10-19 Richard Sandiford <richard@codesourcery.com>
* ld-mips-elf/tlslib-o32-hidden.got: Sort relocations against the
diff --git a/ld/testsuite/ld-mips-elf/rel32-n32.d b/ld/testsuite/ld-mips-elf/rel32-n32.d
index 3764f40..7adf822 100644
--- a/ld/testsuite/ld-mips-elf/rel32-n32.d
+++ b/ld/testsuite/ld-mips-elf/rel32-n32.d
@@ -1,7 +1,7 @@
#name: MIPS rel32 n32
#source: rel32.s
#as: -KPIC -EB -n32
-#readelf: -x 6 -r
+#readelf: -x .text -r
#ld: -shared -melf32btsmipn32
Relocation section '.rel.dyn' at offset .* contains 2 entries:
diff --git a/ld/testsuite/ld-mips-elf/rel32-o32.d b/ld/testsuite/ld-mips-elf/rel32-o32.d
index d2d932e..ac82459 100644
--- a/ld/testsuite/ld-mips-elf/rel32-o32.d
+++ b/ld/testsuite/ld-mips-elf/rel32-o32.d
@@ -1,7 +1,7 @@
#name: MIPS rel32 o32
#source: rel32.s
#as: -KPIC -EB -32
-#readelf: -x 6 -r
+#readelf: -x .text -r
#ld: -shared -melf32btsmip
Relocation section '.rel.dyn' at offset .* contains 2 entries:
diff --git a/ld/testsuite/ld-mips-elf/rel64.d b/ld/testsuite/ld-mips-elf/rel64.d
index c3e0913..37f95ae 100644
--- a/ld/testsuite/ld-mips-elf/rel64.d
+++ b/ld/testsuite/ld-mips-elf/rel64.d
@@ -1,7 +1,7 @@
#name: MIPS rel64 n64
#source: rel64.s
#as: -KPIC -EB -64
-#readelf: -x 6 -r
+#readelf: -x .text -r
#ld: -shared -melf64btsmip
Relocation section '.rel.dyn' at offset .* contains 2 entries: