summaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/emulparams/elf32bmip.sh2
-rw-r--r--ld/emulparams/elf32bmipn32-defs.sh2
-rw-r--r--ld/emulparams/elf32mipswindiss.sh2
-rw-r--r--ld/scripttempl/mips.sc2
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-mips-elf/rel32-n32.d6
-rw-r--r--ld/testsuite/ld-mips-elf/rel32-o32.d4
-rw-r--r--ld/testsuite/ld-mips-elf/rel64.d4
9 files changed, 25 insertions, 11 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 451f11069e..29311f8f54 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,12 @@
2012-08-06 Maciej W. Rozycki <macro@codesourcery.com>
+ * emulparams/elf32bmip.sh: Make _gp hidden.
+ * emulparams/elf32bmipn32-defs.sh: Likewise.
+ * emulparams/elf32mipswindiss.sh: Likewise.
+ * scripttempl/mips.sc: Likewise.
+
+2012-08-06 Maciej W. Rozycki <macro@codesourcery.com>
+
* ldexp.h (etree_union): Add defsym member to the assign member
structure.
(exp_assign): Add hidden argument to prototype.
diff --git a/ld/emulparams/elf32bmip.sh b/ld/emulparams/elf32bmip.sh
index f0fcd2c4bf..118d57a2e4 100644
--- a/ld/emulparams/elf32bmip.sh
+++ b/ld/emulparams/elf32bmip.sh
@@ -33,7 +33,7 @@ OTHER_GOT_RELOC_SECTIONS="
# of .got.
OTHER_GOT_SYMBOLS='
. = .;
- _gp = ALIGN(16) + 0x7ff0;
+ HIDDEN (_gp = ALIGN (16) + 0x7ff0);
'
# .got.plt is only used for the PLT psABI extension. It should not be
# included in the .sdata block with .got, as there is no need to access
diff --git a/ld/emulparams/elf32bmipn32-defs.sh b/ld/emulparams/elf32bmipn32-defs.sh
index 45bfd5d788..12aaf72f07 100644
--- a/ld/emulparams/elf32bmipn32-defs.sh
+++ b/ld/emulparams/elf32bmipn32-defs.sh
@@ -51,7 +51,7 @@ OTHER_GOT_RELOC_SECTIONS="
# of .got.
OTHER_GOT_SYMBOLS='
. = .;
- _gp = ALIGN(16) + 0x7ff0;
+ HIDDEN (_gp = ALIGN (16) + 0x7ff0);
'
# .got.plt is only used for the PLT psABI extension. It should not be
# included in the .sdata block with .got, as there is no need to access
diff --git a/ld/emulparams/elf32mipswindiss.sh b/ld/emulparams/elf32mipswindiss.sh
index 4f1148b951..3b9678bba1 100644
--- a/ld/emulparams/elf32mipswindiss.sh
+++ b/ld/emulparams/elf32mipswindiss.sh
@@ -12,7 +12,7 @@ MAXPAGESIZE=0x40000
# the Diab linker.
TEXT_START_ADDR=0x100000
DATA_START_SYMBOLS='__DATA_ROM = .; __DATA_RAM = .;'
-SDATA_START_SYMBOLS='_SDA_BASE_ = .; _gp = . + 0x7ff0;'
+SDATA_START_SYMBOLS='_SDA_BASE_ = .; HIDDEN (_gp = . + 0x7ff0);'
SDATA2_START_SYMBOLS='_SDA2_BASE_ = .;'
EXECUTABLE_SYMBOLS='__HEAP_START = .; __SP_INIT = 0x800000; __SP_END = __SP_INIT - 0x20000; __HEAP_END = __SP_END; __DATA_END = _edata; __BSS_START = __bss_start; __BSS_END = _end; __HEAP_START = _end;'
diff --git a/ld/scripttempl/mips.sc b/ld/scripttempl/mips.sc
index f53558aba4..1be01f9a00 100644
--- a/ld/scripttempl/mips.sc
+++ b/ld/scripttempl/mips.sc
@@ -42,7 +42,7 @@ SECTIONS
*(.data)
${CONSTRUCTING+CONSTRUCTORS}
}
- ${RELOCATING+ _gp = ALIGN(16) + 0x8000;}
+ ${RELOCATING+ HIDDEN (_gp = ALIGN (16) + 0x8000);}
.lit8 : {
*(.lit8)
}
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 7f93d4dbdd..cd71a9f23a 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,5 +1,12 @@
2012-08-06 Maciej W. Rozycki <macro@codesourcery.com>
+ * ld-mips-elf/rel32-o32.d: Adjust section VMAs after the removal
+ of _gp from the global scope.
+ * ld-mips-elf/rel32-n32.d: Likewise.
+ * ld-mips-elf/rel64.d: Likewise.
+
+2012-08-06 Maciej W. Rozycki <macro@codesourcery.com>
+
* ld-mips-elf/mips-elf.exp: Set has_newabi for all Linux targets.
Adjust abi_asflags for targets that do not infer the ISA from the
ABI.
diff --git a/ld/testsuite/ld-mips-elf/rel32-n32.d b/ld/testsuite/ld-mips-elf/rel32-n32.d
index 995161561a..ba83d51832 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':
- 0x000002e0 00000000 00000000 00000000 00000000 ................
- 0x000002f0 000002f0 00000000 00000000 00000000 ................
- 0x00000300 00000000 00000000 00000000 00000000 ................
+ 0x000002d0 00000000 00000000 00000000 00000000 ................
+ 0x000002e0 000002e0 00000000 00000000 00000000 ................
+ 0x000002f0 00000000 00000000 00000000 00000000 ................
diff --git a/ld/testsuite/ld-mips-elf/rel32-o32.d b/ld/testsuite/ld-mips-elf/rel32-o32.d
index 742cdaadb4..ac82459519 100644
--- a/ld/testsuite/ld-mips-elf/rel32-o32.d
+++ b/ld/testsuite/ld-mips-elf/rel32-o32.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':
+ 0x000002c0 00000000 00000000 00000000 00000000 ................
+ 0x000002d0 000002d0 00000000 00000000 00000000 ................
0x000002e0 00000000 00000000 00000000 00000000 ................
- 0x000002f0 000002f0 00000000 00000000 00000000 ................
- 0x00000300 00000000 00000000 00000000 00000000 ................
diff --git a/ld/testsuite/ld-mips-elf/rel64.d b/ld/testsuite/ld-mips-elf/rel64.d
index 01bffa3908..595762f0d9 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 ................
- 0x00000460 00000000 00000460 00000000 00000000 ................
- 0x00000470 00000000 00000000 00000000 00000000 ................