aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2005-01-22 18:13:16 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2005-01-22 18:13:16 +0000
commit4e25343c6e697b139ad25ff7b04c39295381b355 (patch)
treef547ff4be1f904212196d442957c2d49046ad499 /ld
parentab730cc79f8e92611009dc6508df4d6a4743fa9f (diff)
downloadgdb-4e25343c6e697b139ad25ff7b04c39295381b355.zip
gdb-4e25343c6e697b139ad25ff7b04c39295381b355.tar.gz
gdb-4e25343c6e697b139ad25ff7b04c39295381b355.tar.bz2
* emulparams/elf32bmip.sh (OTHER_GOT_SECTIONS): Add ". = .;".
* emulparams/elf32bmipn32-defs.sh (OTHER_GOT_SECTIONS): Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/emulparams/elf32bmip.sh5
-rw-r--r--ld/emulparams/elf32bmipn32-defs.sh5
3 files changed, 15 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 8c7183a..d261fe2 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-22 Richard Sandiford <rsandifo@redhat.com>
+
+ * emulparams/elf32bmip.sh (OTHER_GOT_SECTIONS): Add ". = .;".
+ * emulparams/elf32bmipn32-defs.sh (OTHER_GOT_SECTIONS): Likewise.
+
2005-01-21 Jakub Jelinek <jakub@redhat.com>
* ldgram.y (AS_NEEDED): New token.
diff --git a/ld/emulparams/elf32bmip.sh b/ld/emulparams/elf32bmip.sh
index 7badcb8..3d99044 100644
--- a/ld/emulparams/elf32bmip.sh
+++ b/ld/emulparams/elf32bmip.sh
@@ -16,7 +16,12 @@ INITIAL_READONLY_SECTIONS="
.reginfo ${RELOCATING-0} : { *(.reginfo) }
"
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
+# 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
+# of .got.
OTHER_GOT_SYMBOLS='
+ . = .;
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS="
diff --git a/ld/emulparams/elf32bmipn32-defs.sh b/ld/emulparams/elf32bmipn32-defs.sh
index f7b0d08..e234d38 100644
--- a/ld/emulparams/elf32bmipn32-defs.sh
+++ b/ld/emulparams/elf32bmipn32-defs.sh
@@ -36,7 +36,12 @@ MAXPAGESIZE=0x100000
ENTRY=__start
# 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
+# inserting other sections between the assignment to _gp and the start
+# of .got.
OTHER_GOT_SYMBOLS='
+ . = .;
_gp = ALIGN(16) + 0x7ff0;
'
OTHER_SDATA_SECTIONS="