From 889acb80acd526e5a8798db60e2a6d1e84b59c78 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Mon, 6 Aug 2012 22:50:07 +0000 Subject: [PATCH] * ld-mips-elf/dyn-sec64.ld: Use HIDDEN to define _gp. * ld-mips-elf/eh-frame5.ld: Likewise. * ld-mips-elf/got-dump-1.ld: Likewise. * ld-mips-elf/got-dump-2.ld: Likewise. * ld-mips-elf/got-page-1.ld: Likewise. * ld-mips-elf/mips-dyn.ld: Likewise. * ld-mips-elf/mips-lib.ld: Likewise. * ld-mips-elf/mips16-pic-1.ld: Likewise. * ld-mips-elf/no-shared-1.ld: Likewise. * ld-mips-elf/pic-and-nonpic-1.ld: Likewise. * ld-mips-elf/pic-and-nonpic-3a.ld: Likewise. * ld-mips-elf/pic-and-nonpic-3b.ld: Likewise. * ld-mips-elf/pic-and-nonpic-4b.ld: Likewise. * ld-mips-elf/pic-and-nonpic-5b.ld: Likewise. * ld-mips-elf/pic-and-nonpic-6.ld: Likewise. * ld-mips-elf/reloc-2.ld: Likewise. * ld-mips-elf/reloc-estimate-1.ld: Likewise. * ld-mips-elf/stub-dynsym-1.ld: Likewise. * ld-mips-elf/tls-hidden3.ld: Likewise. * ld-mips-elf/mips16-pic-2.ad: Update accordingly. * ld-mips-elf/pic-and-nonpic-3b.ad: Likewise. * ld-mips-elf/pic-and-nonpic-4b.ad: Likewise. * ld-mips-elf/pic-and-nonpic-5b.ad: Likewise. * ld-mips-elf/pic-and-nonpic-6-n32.ad: Likewise. * ld-mips-elf/pic-and-nonpic-6-n64.ad: Likewise. * ld-mips-elf/pic-and-nonpic-6-o32.ad: Likewise. * ld-mips-elf/eh-frame5.d: Likewise. * ld-mips-elf/tlsdyn-o32-1.d: Likewise. * ld-mips-elf/tlsdyn-o32-2.d: Likewise. * ld-mips-elf/tlsdyn-o32-3.d: Likewise. * ld-mips-elf/tlsdyn-o32.d: Likewise. * ld-mips-elf/pic-and-nonpic-3a.dd: Likewise. * ld-mips-elf/pic-and-nonpic-3b.dd: Likewise. * ld-mips-elf/pic-and-nonpic-6-n32.dd: Likewise. * ld-mips-elf/pic-and-nonpic-6-n64.dd: Likewise. * ld-mips-elf/pic-and-nonpic-6-o32.dd: Likewise. * ld-mips-elf/tls-multi-got-1.got: Likewise. * ld-mips-elf/tlsdyn-o32-1.got: Likewise. * ld-mips-elf/tlsdyn-o32-2.got: Likewise. * ld-mips-elf/tlsdyn-o32-3.got: Likewise. * ld-mips-elf/tlsdyn-o32.got: Likewise. * ld-mips-elf/tlslib-o32-ver.got: Likewise. * ld-mips-elf/tlslib-o32.got: Likewise. * ld-mips-elf/mips16-pic-2.nd: Likewise. * ld-mips-elf/pic-and-nonpic-1.nd: Likewise. * ld-mips-elf/pic-and-nonpic-3b.nd: Likewise. * ld-mips-elf/pic-and-nonpic-4b.nd: Likewise. * ld-mips-elf/pic-and-nonpic-5b.nd: Likewise. * ld-mips-elf/pic-and-nonpic-6-n32.nd: Likewise. * ld-mips-elf/pic-and-nonpic-6-n64.nd: Likewise. * ld-mips-elf/pic-and-nonpic-6-o32.nd: Likewise. * ld-mips-elf/tls-multi-got-1.r: Likewise. * ld-mips-elf/pic-and-nonpic-3b.rd: Likewise. * ld-mips-elf/pic-and-nonpic-4b.rd: Likewise. * ld-mips-elf/mips-elf.exp: Likewise. --- ld/testsuite/ChangeLog | 58 +++++++++++++++++++ ld/testsuite/ld-mips-elf/dyn-sec64.ld | 2 +- ld/testsuite/ld-mips-elf/eh-frame5.d | 2 +- ld/testsuite/ld-mips-elf/eh-frame5.ld | 2 +- ld/testsuite/ld-mips-elf/got-dump-1.ld | 2 +- ld/testsuite/ld-mips-elf/got-dump-2.ld | 2 +- ld/testsuite/ld-mips-elf/got-page-1.ld | 2 +- ld/testsuite/ld-mips-elf/mips-dyn.ld | 2 +- ld/testsuite/ld-mips-elf/mips-elf.exp | 3 +- ld/testsuite/ld-mips-elf/mips-lib.ld | 2 +- ld/testsuite/ld-mips-elf/mips16-pic-1.ld | 2 +- ld/testsuite/ld-mips-elf/mips16-pic-2.ad | 4 +- ld/testsuite/ld-mips-elf/mips16-pic-2.nd | 12 ++-- ld/testsuite/ld-mips-elf/no-shared-1.ld | 2 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-1.ld | 2 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-1.nd | 2 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.dd | 2 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.ld | 2 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ad | 4 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.dd | 2 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ld | 2 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.nd | 2 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.rd | 2 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ad | 4 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ld | 2 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.nd | 2 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.rd | 4 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ad | 4 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ld | 2 +- ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.nd | 4 +- .../ld-mips-elf/pic-and-nonpic-6-n32.ad | 4 +- .../ld-mips-elf/pic-and-nonpic-6-n32.dd | 2 +- .../ld-mips-elf/pic-and-nonpic-6-n32.nd | 14 ++--- .../ld-mips-elf/pic-and-nonpic-6-n64.ad | 4 +- .../ld-mips-elf/pic-and-nonpic-6-n64.dd | 2 +- .../ld-mips-elf/pic-and-nonpic-6-n64.nd | 14 ++--- .../ld-mips-elf/pic-and-nonpic-6-o32.ad | 4 +- .../ld-mips-elf/pic-and-nonpic-6-o32.dd | 2 +- .../ld-mips-elf/pic-and-nonpic-6-o32.nd | 14 ++--- ld/testsuite/ld-mips-elf/pic-and-nonpic-6.ld | 2 +- ld/testsuite/ld-mips-elf/reloc-2.ld | 2 +- ld/testsuite/ld-mips-elf/reloc-estimate-1.ld | 2 +- ld/testsuite/ld-mips-elf/stub-dynsym-1.ld | 2 +- ld/testsuite/ld-mips-elf/tls-hidden3.ld | 2 +- ld/testsuite/ld-mips-elf/tls-multi-got-1.got | 34 +++++------ ld/testsuite/ld-mips-elf/tls-multi-got-1.r | 18 +++--- ld/testsuite/ld-mips-elf/tlsdyn-o32-1.d | 4 +- ld/testsuite/ld-mips-elf/tlsdyn-o32-1.got | 2 +- ld/testsuite/ld-mips-elf/tlsdyn-o32-2.d | 4 +- ld/testsuite/ld-mips-elf/tlsdyn-o32-2.got | 2 +- ld/testsuite/ld-mips-elf/tlsdyn-o32-3.d | 4 +- ld/testsuite/ld-mips-elf/tlsdyn-o32-3.got | 2 +- ld/testsuite/ld-mips-elf/tlsdyn-o32.d | 2 +- ld/testsuite/ld-mips-elf/tlsdyn-o32.got | 2 +- ld/testsuite/ld-mips-elf/tlslib-o32-ver.got | 12 ++-- ld/testsuite/ld-mips-elf/tlslib-o32.got | 12 ++-- 56 files changed, 182 insertions(+), 125 deletions(-) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 19c101e8f7f..ab8c718591b 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,61 @@ +2012-08-06 Maciej W. Rozycki + + * ld-mips-elf/dyn-sec64.ld: Use HIDDEN to define _gp. + * ld-mips-elf/eh-frame5.ld: Likewise. + * ld-mips-elf/got-dump-1.ld: Likewise. + * ld-mips-elf/got-dump-2.ld: Likewise. + * ld-mips-elf/got-page-1.ld: Likewise. + * ld-mips-elf/mips-dyn.ld: Likewise. + * ld-mips-elf/mips-lib.ld: Likewise. + * ld-mips-elf/mips16-pic-1.ld: Likewise. + * ld-mips-elf/no-shared-1.ld: Likewise. + * ld-mips-elf/pic-and-nonpic-1.ld: Likewise. + * ld-mips-elf/pic-and-nonpic-3a.ld: Likewise. + * ld-mips-elf/pic-and-nonpic-3b.ld: Likewise. + * ld-mips-elf/pic-and-nonpic-4b.ld: Likewise. + * ld-mips-elf/pic-and-nonpic-5b.ld: Likewise. + * ld-mips-elf/pic-and-nonpic-6.ld: Likewise. + * ld-mips-elf/reloc-2.ld: Likewise. + * ld-mips-elf/reloc-estimate-1.ld: Likewise. + * ld-mips-elf/stub-dynsym-1.ld: Likewise. + * ld-mips-elf/tls-hidden3.ld: Likewise. + * ld-mips-elf/mips16-pic-2.ad: Update accordingly. + * ld-mips-elf/pic-and-nonpic-3b.ad: Likewise. + * ld-mips-elf/pic-and-nonpic-4b.ad: Likewise. + * ld-mips-elf/pic-and-nonpic-5b.ad: Likewise. + * ld-mips-elf/pic-and-nonpic-6-n32.ad: Likewise. + * ld-mips-elf/pic-and-nonpic-6-n64.ad: Likewise. + * ld-mips-elf/pic-and-nonpic-6-o32.ad: Likewise. + * ld-mips-elf/eh-frame5.d: Likewise. + * ld-mips-elf/tlsdyn-o32-1.d: Likewise. + * ld-mips-elf/tlsdyn-o32-2.d: Likewise. + * ld-mips-elf/tlsdyn-o32-3.d: Likewise. + * ld-mips-elf/tlsdyn-o32.d: Likewise. + * ld-mips-elf/pic-and-nonpic-3a.dd: Likewise. + * ld-mips-elf/pic-and-nonpic-3b.dd: Likewise. + * ld-mips-elf/pic-and-nonpic-6-n32.dd: Likewise. + * ld-mips-elf/pic-and-nonpic-6-n64.dd: Likewise. + * ld-mips-elf/pic-and-nonpic-6-o32.dd: Likewise. + * ld-mips-elf/tls-multi-got-1.got: Likewise. + * ld-mips-elf/tlsdyn-o32-1.got: Likewise. + * ld-mips-elf/tlsdyn-o32-2.got: Likewise. + * ld-mips-elf/tlsdyn-o32-3.got: Likewise. + * ld-mips-elf/tlsdyn-o32.got: Likewise. + * ld-mips-elf/tlslib-o32-ver.got: Likewise. + * ld-mips-elf/tlslib-o32.got: Likewise. + * ld-mips-elf/mips16-pic-2.nd: Likewise. + * ld-mips-elf/pic-and-nonpic-1.nd: Likewise. + * ld-mips-elf/pic-and-nonpic-3b.nd: Likewise. + * ld-mips-elf/pic-and-nonpic-4b.nd: Likewise. + * ld-mips-elf/pic-and-nonpic-5b.nd: Likewise. + * ld-mips-elf/pic-and-nonpic-6-n32.nd: Likewise. + * ld-mips-elf/pic-and-nonpic-6-n64.nd: Likewise. + * ld-mips-elf/pic-and-nonpic-6-o32.nd: Likewise. + * ld-mips-elf/tls-multi-got-1.r: Likewise. + * ld-mips-elf/pic-and-nonpic-3b.rd: Likewise. + * ld-mips-elf/pic-and-nonpic-4b.rd: Likewise. + * ld-mips-elf/mips-elf.exp: Likewise. + 2012-08-06 Maciej W. Rozycki * ld-mips-elf/gp-hidden.rd: New test. diff --git a/ld/testsuite/ld-mips-elf/dyn-sec64.ld b/ld/testsuite/ld-mips-elf/dyn-sec64.ld index bb75d732b46..4c6353a1485 100644 --- a/ld/testsuite/ld-mips-elf/dyn-sec64.ld +++ b/ld/testsuite/ld-mips-elf/dyn-sec64.ld @@ -17,7 +17,7 @@ SECTIONS .MIPS.stubs : { *(.MIPS.stubs) } . = 0x1235000000000; - _gp = ALIGN (16) + 0x7ff0; + HIDDEN (_gp = ALIGN (16) + 0x7ff0); .got : { *(.got) } .data : { *(.data) } } diff --git a/ld/testsuite/ld-mips-elf/eh-frame5.d b/ld/testsuite/ld-mips-elf/eh-frame5.d index f9304e2364a..91124661477 100644 --- a/ld/testsuite/ld-mips-elf/eh-frame5.d +++ b/ld/testsuite/ld-mips-elf/eh-frame5.d @@ -1,5 +1,5 @@ -Relocation section '.rel.dyn' at offset 0x101f0 contains 8 entries: +Relocation section '.rel.dyn' at offset 0x101dc contains 8 entries: Offset Info Type Sym.Value Sym. Name 00000000 .* R_MIPS_NONE * # diff --git a/ld/testsuite/ld-mips-elf/eh-frame5.ld b/ld/testsuite/ld-mips-elf/eh-frame5.ld index f00cb2706c2..9a04be67f08 100644 --- a/ld/testsuite/ld-mips-elf/eh-frame5.ld +++ b/ld/testsuite/ld-mips-elf/eh-frame5.ld @@ -13,6 +13,6 @@ SECTIONS . = 0x10000; .data : { *(.data) } . = 0x10400; - _gp = . + 0x7ff0; + HIDDEN (_gp = . + 0x7ff0); .got : { *(.got) } } diff --git a/ld/testsuite/ld-mips-elf/got-dump-1.ld b/ld/testsuite/ld-mips-elf/got-dump-1.ld index 4fe5c1a2116..ba228f53b49 100644 --- a/ld/testsuite/ld-mips-elf/got-dump-1.ld +++ b/ld/testsuite/ld-mips-elf/got-dump-1.ld @@ -14,6 +14,6 @@ SECTIONS . = 0x60000; .data : { *(.data) } - _gp = ALIGN (16) + 0x7ff0; + HIDDEN (_gp = ALIGN (16) + 0x7ff0); .got : { *(.got) } } diff --git a/ld/testsuite/ld-mips-elf/got-dump-2.ld b/ld/testsuite/ld-mips-elf/got-dump-2.ld index cab0f4b2169..0e237de3b88 100644 --- a/ld/testsuite/ld-mips-elf/got-dump-2.ld +++ b/ld/testsuite/ld-mips-elf/got-dump-2.ld @@ -13,6 +13,6 @@ SECTIONS . = 0x1236000000000; .data : { *(.data) } - _gp = ALIGN (16) + 0x7ff0; + HIDDEN (_gp = ALIGN (16) + 0x7ff0); .got : { *(.got) } } diff --git a/ld/testsuite/ld-mips-elf/got-page-1.ld b/ld/testsuite/ld-mips-elf/got-page-1.ld index fe2afe68d49..3197c9b599b 100644 --- a/ld/testsuite/ld-mips-elf/got-page-1.ld +++ b/ld/testsuite/ld-mips-elf/got-page-1.ld @@ -16,7 +16,7 @@ SECTIONS .text : { *(.text) } . = ALIGN (0x10000); - _gp = . + 0x7ff0; + HIDDEN (_gp = . + 0x7ff0); .got : { *(.got) } . = ALIGN (0x400); diff --git a/ld/testsuite/ld-mips-elf/mips-dyn.ld b/ld/testsuite/ld-mips-elf/mips-dyn.ld index 8f734d23bd5..e4f90d27393 100644 --- a/ld/testsuite/ld-mips-elf/mips-dyn.ld +++ b/ld/testsuite/ld-mips-elf/mips-dyn.ld @@ -146,7 +146,7 @@ SECTIONS SORT(CONSTRUCTORS) } .data1 : { *(.data1) } - _gp = ALIGN(16) + 0x7ff0; + HIDDEN (_gp = ALIGN(16) + 0x7ff0); .got : { *(.got.plt) *(.got) } /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp index 50e51c66600..e4717e7fae8 100644 --- a/ld/testsuite/ld-mips-elf/mips-elf.exp +++ b/ld/testsuite/ld-mips-elf/mips-elf.exp @@ -474,9 +474,8 @@ if {[istarget mips*-*-linux*]} { # # the null symbol entry # the .MIPS.stubs section symbol - # _gp # _GLOBAL_OFFSET_TABLE_ - set base_syms 4 + set base_syms 3 foreach dynsym { 7fff 8000 fff0 10000 2fe80 } { run_ld_link_tests \ [list [list \ diff --git a/ld/testsuite/ld-mips-elf/mips-lib.ld b/ld/testsuite/ld-mips-elf/mips-lib.ld index 10b41403c95..5073d9f51cc 100644 --- a/ld/testsuite/ld-mips-elf/mips-lib.ld +++ b/ld/testsuite/ld-mips-elf/mips-lib.ld @@ -138,7 +138,7 @@ SECTIONS SORT(CONSTRUCTORS) } .data1 : { *(.data1) } - _gp = ALIGN(16) + 0x7ff0; + HIDDEN (_gp = ALIGN(16) + 0x7ff0); .got : { *(.got.plt) *(.got) } .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) } .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } diff --git a/ld/testsuite/ld-mips-elf/mips16-pic-1.ld b/ld/testsuite/ld-mips-elf/mips16-pic-1.ld index 91f1464b424..4afc589023c 100644 --- a/ld/testsuite/ld-mips-elf/mips16-pic-1.ld +++ b/ld/testsuite/ld-mips-elf/mips16-pic-1.ld @@ -14,7 +14,7 @@ SECTIONS .rel.plt : { *(.rel.plt) } .rel.dyn : { *(.rel.dyn) } . = 0x50000; - _gp = . + 0x7ff0; + HIDDEN (_gp = . + 0x7ff0); .got : { *(.got) } . = 0x50400; .data : { *(.data) } diff --git a/ld/testsuite/ld-mips-elf/mips16-pic-2.ad b/ld/testsuite/ld-mips-elf/mips16-pic-2.ad index 95c53e58ea5..5f746985d6f 100644 --- a/ld/testsuite/ld-mips-elf/mips16-pic-2.ad +++ b/ld/testsuite/ld-mips-elf/mips16-pic-2.ad @@ -1,6 +1,6 @@ # [MIPS_GOTSYM, MIPS_SYMTABNO) covers used4...used7. #... - .* \(MIPS_SYMTABNO\) * 10 + .* \(MIPS_SYMTABNO\) * 9 #... - .* \(MIPS_GOTSYM\) * 0x6 + .* \(MIPS_GOTSYM\) * 0x5 #pass diff --git a/ld/testsuite/ld-mips-elf/mips16-pic-2.nd b/ld/testsuite/ld-mips-elf/mips16-pic-2.nd index 94615b5101e..540377b0d74 100644 --- a/ld/testsuite/ld-mips-elf/mips16-pic-2.nd +++ b/ld/testsuite/ld-mips-elf/mips16-pic-2.nd @@ -1,10 +1,10 @@ # used8 should come before MIPS_GOTSYM. #... - +4: 000405bc +36 +FUNC +GLOBAL +DEFAULT .* used8 - +5: .* _GLOBAL_OFFSET_TABLE_ - +6: 00040574 +36 +FUNC +GLOBAL +DEFAULT .* used6 - +7: 00040598 +36 +FUNC +GLOBAL +DEFAULT .* used7 - +8: 00040550 +36 +FUNC +GLOBAL +DEFAULT .* used5 - +9: 0004052c +36 +FUNC +GLOBAL +DEFAULT .* used4 + +3: 000405bc +36 +FUNC +GLOBAL +DEFAULT .* used8 + +4: .* _GLOBAL_OFFSET_TABLE_ + +5: 00040574 +36 +FUNC +GLOBAL +DEFAULT .* used6 + +6: 00040598 +36 +FUNC +GLOBAL +DEFAULT .* used7 + +7: 00040550 +36 +FUNC +GLOBAL +DEFAULT .* used5 + +8: 0004052c +36 +FUNC +GLOBAL +DEFAULT .* used4 #pass diff --git a/ld/testsuite/ld-mips-elf/no-shared-1.ld b/ld/testsuite/ld-mips-elf/no-shared-1.ld index 06d28a6e41c..87201a46fef 100644 --- a/ld/testsuite/ld-mips-elf/no-shared-1.ld +++ b/ld/testsuite/ld-mips-elf/no-shared-1.ld @@ -6,6 +6,6 @@ SECTIONS . = 0x60000; .data : { *(.data) } - _gp = ALIGN (16) + 0x7ff0; + HIDDEN (_gp = ALIGN (16) + 0x7ff0); .got : { *(.got) } } diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-1.ld b/ld/testsuite/ld-mips-elf/pic-and-nonpic-1.ld index 3aa140e5180..d1a9c50acfc 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-1.ld +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-1.ld @@ -5,5 +5,5 @@ SECTIONS .pdr : { *(.pdr) } . = 0x41000; .text : { *(.text) } - _gp = 0x68000; + HIDDEN (_gp = 0x68000); } diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-1.nd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-1.nd index 4fc9ae3920f..78a1c605797 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-1.nd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-1.nd @@ -1,8 +1,8 @@ #... +.*: 00068000 +0 +NOTYPE +LOCAL +DEFAULT +ABS _gp .*: 00041018 +8 +FUNC +LOCAL +DEFAULT .* .pic.f1 .*: 00041000 +16 +FUNC +LOCAL +DEFAULT .* .pic.f2 .*: 00000000 +0 +OBJECT +GLOBAL +DEFAULT +UND _gp_disp -.*: 00068000 +0 +NOTYPE +GLOBAL +DEFAULT +ABS _gp .*: 00041050 +14 +FUNC +GLOBAL +DEFAULT +\[MIPS16\] .* f3 .*: 00041060 +24 +FUNC +GLOBAL +DEFAULT .* __start .*: 0004103c +20 +FUNC +GLOBAL +DEFAULT .* f2 diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.dd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.dd index 320e4cacda1..cb72980b973 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.dd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.dd @@ -35,5 +35,5 @@ Disassembly of section \.MIPS\.stubs: c00: 8f998010 lw t9,-32752\(gp\) c04: 03e07821 move t7,ra c08: 0320f809 jalr t9 - c0c: 24180007 li t8,7 + c0c: 24180006 li t8,6 \.\.\. diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.ld b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.ld index cc4bd553fc2..81d0d8aabf6 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.ld +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.ld @@ -18,6 +18,6 @@ SECTIONS .data : { *(.data) } . = ALIGN (0x400); - _gp = . + 0x7ff0; + HIDDEN (_gp = . + 0x7ff0); .got : { *(.got) } } diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ad b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ad index fdcc0b1961e..0ad29a382b0 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ad +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ad @@ -16,10 +16,10 @@ Dynamic section at offset .* contains .*: # This must be the number of GOT entries - 1, the last entry being for "bar". 0x7000000a \(MIPS_LOCAL_GOTNO\) * 3 # This must be MIPS_GOTSYM + 1. - 0x70000011 \(MIPS_SYMTABNO\) * 8 + 0x70000011 \(MIPS_SYMTABNO\) * 7 0x70000012 \(MIPS_UNREFEXTNO\) .* # This must be the index of "bar". - 0x70000013 \(MIPS_GOTSYM\) * 0x7 + 0x70000013 \(MIPS_GOTSYM\) * 0x6 0x00000014 \(PLTREL\) * REL 0x00000017 \(JMPREL\) * 0x43000 0x00000002 \(PLTRELSZ\) * 8 \(bytes\) diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.dd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.dd index dffa7f68f73..dd1d1b0bed0 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.dd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.dd @@ -48,5 +48,5 @@ Disassembly of section .MIPS.stubs: .*: 8f998010 lw t9,-32752\(gp\) .*: 03e07821 move t7,ra .*: 0320f809 jalr t9 -.*: 24180007 li t8,7 +.*: 24180006 li t8,6 \.\.\. diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ld b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ld index d41c8f98c5f..693bbdd1ae1 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ld +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.ld @@ -27,7 +27,7 @@ SECTIONS .got.plt : { *(.got.plt) } . = 0xa0000; - _gp = . + 0x7ff0; + HIDDEN (_gp = . + 0x7ff0); .got : { *(.got) } . = 0xa1000; diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.nd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.nd index 09c94110b43..ea2b1850cbc 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.nd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.nd @@ -4,6 +4,6 @@ Symbol table '\.dynsym' contains .*: .*: 00000000 +0 +FUNC +GLOBAL +DEFAULT +UND +foo # The index on the next line should correspond to MIPS_GOTSYM. #... - *7: 00044030 +0 +FUNC +GLOBAL +DEFAULT +UND +bar + *6: 00044030 +0 +FUNC +GLOBAL +DEFAULT +UND +bar #pass diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.rd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.rd index d3418dbe9fd..f81725eabaf 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.rd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.rd @@ -1,4 +1,4 @@ Relocation section '\.rel\.plt' at offset .* contains .*: * Offset * Info * Type * Sym\.Value * Sym\. Name -00081008 * 0000057f * R_MIPS_JUMP_SLOT * 00000000 * foo +00081008 * 0000047f * R_MIPS_JUMP_SLOT * 00000000 * foo diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ad b/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ad index ad300b4b5e3..bbc80ec4a64 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ad +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ad @@ -19,8 +19,8 @@ Dynamic section at offset .* contains .*: # This must be the number of GOT entries - 1, the last entry being for "obj3". 0x7000000a \(MIPS_LOCAL_GOTNO\) * 2 # This must be MIPS_GOTSYM + 1. - 0x70000011 \(MIPS_SYMTABNO\) * 8 + 0x70000011 \(MIPS_SYMTABNO\) * 7 0x70000012 \(MIPS_UNREFEXTNO\) .* # This must be the index of "obj3". - 0x70000013 \(MIPS_GOTSYM\) * 0x7 + 0x70000013 \(MIPS_GOTSYM\) * 0x6 0x00000000 \(NULL\) * 0x0 diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ld b/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ld index bcf9e3af1ec..bae9fd86c1e 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ld +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.ld @@ -22,7 +22,7 @@ SECTIONS .rld_map : { *(.rld_map) } . = 0xa0000; - _gp = . + 0x7ff0; + HIDDEN (_gp = . + 0x7ff0); .got : { *(.got) } . = 0xa1000; diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.nd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.nd index 047d569680d..2e13dd9c9e7 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.nd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.nd @@ -7,6 +7,6 @@ Symbol table '\.dynsym' contains .*: .*: 000a2008 +4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +obj2 # The index on the next line should correspond to MIPS_GOTSYM. #... - *7: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +obj3 + *6: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +obj3 #pass diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.rd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.rd index 452d9c70eff..8c2c49c1f8f 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.rd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.rd @@ -3,5 +3,5 @@ Relocation section '\.rel\.dyn' at offset .* contains .*: * Offset * Info * Type * Sym\.Value * Sym\. Name 00000000 * 00000000 * R_MIPS_NONE * 000a2000 * 0000017e * R_MIPS_COPY * 000a2000 * obj1 -000a2008 * 0000047e * R_MIPS_COPY * 000a2008 * obj2 -000a1004 * 00000703 * R_MIPS_REL32 * 00000000 * obj3 +000a2008 * 0000037e * R_MIPS_COPY * 000a2008 * obj2 +000a1004 * 00000603 * R_MIPS_REL32 * 00000000 * obj3 diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ad b/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ad index e448ec20132..fcf0e31c741 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ad +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ad @@ -22,9 +22,9 @@ Dynamic section at offset .* contains .*: # for "bar" and "obj2". 0x7000000a \(MIPS_LOCAL_GOTNO\) * 2 # This must be MIPS_GOTSYM + 2. - 0x70000011 \(MIPS_SYMTABNO\) * 10 + 0x70000011 \(MIPS_SYMTABNO\) * 9 0x70000012 \(MIPS_UNREFEXTNO\) * .* - 0x70000013 \(MIPS_GOTSYM\) * 0x8 + 0x70000013 \(MIPS_GOTSYM\) * 0x7 0x00000014 \(PLTREL\) * REL 0x00000017 \(JMPREL\) * 0x43030 0x00000002 \(PLTRELSZ\) * 8 \(bytes\) diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ld b/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ld index 6cb75307655..b3ae77d722c 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ld +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.ld @@ -27,7 +27,7 @@ SECTIONS .got.plt : { *(.got.plt) } . = 0xa0000; - _gp = . + 0x7ff0; + HIDDEN (_gp = . + 0x7ff0); .got : { *(.got) } . = 0xa1000; diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.nd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.nd index a7648d7e273..4f389b4e35e 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.nd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.nd @@ -4,7 +4,7 @@ Symbol table '\.dynsym' contains .*: .*: 00043060 +0 +FUNC +GLOBAL +DEFAULT +\[MIPS PLT\] +UND +foo # The index on the next line should correspond to MIPS_GOTSYM. #... - *8: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +obj2 - *9: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +bar + *7: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +obj2 + *8: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +bar #pass diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.ad b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.ad index 4be2ac0d5f2..9399c4738b3 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.ad +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.ad @@ -17,9 +17,9 @@ Dynamic section at offset .* contains .*: 0x70000005 \(MIPS_FLAGS\) * NOTPOT 0x70000006 \(MIPS_BASE_ADDRESS\) * 0x40000 0x7000000a \(MIPS_LOCAL_GOTNO\) * 2 - 0x70000011 \(MIPS_SYMTABNO\) * 14 + 0x70000011 \(MIPS_SYMTABNO\) * 13 0x70000012 \(MIPS_UNREFEXTNO\) * .* - 0x70000013 \(MIPS_GOTSYM\) * 0x7 + 0x70000013 \(MIPS_GOTSYM\) * 0x6 0x00000014 \(PLTREL\) * REL 0x00000017 \(JMPREL\) * 0x43028 0x00000002 \(PLTRELSZ\) * 24 \(bytes\) diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.dd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.dd index 1e0dbcbd74e..fd76d865576 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.dd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.dd @@ -97,5 +97,5 @@ Disassembly of section \.MIPS\.stubs: 440a0: 8f998010 lw t9,-32752\(gp\) 440a4: 03e07821 move t3,ra 440a8: 0320f809 jalr t9 - 440ac: 2418000a li t8,10 + 440ac: 24180009 li t8,9 \.\.\. diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.nd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.nd index 7afd67dd103..4b807b5e40f 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.nd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.nd @@ -6,12 +6,12 @@ Symbol table '\.dynsym' contains .*: # and the remaining symbols should have the same order as the # GOT layout given in the *.dd dump. #... - *7: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf2 - *8: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf3 - *9: 0+a2000 +24 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +extd2 - *10: 0+440a0 +0 +FUNC +GLOBAL +DEFAULT +UND +extf1 - *11: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +extd1 - *12: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf4 - *13: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +extd4 + *6: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf2 + *7: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf3 + *8: 0+a2000 +24 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +extd2 + *9: 0+440a0 +0 +FUNC +GLOBAL +DEFAULT +UND +extf1 + *10: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +extd1 + *11: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf4 + *12: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +extd4 #pass diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.ad b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.ad index 2ccb8b8a2db..d4b95339d13 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.ad +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.ad @@ -17,9 +17,9 @@ Dynamic section at offset .* contains .*: 0x0+70000005 \(MIPS_FLAGS\) * NOTPOT 0x0+70000006 \(MIPS_BASE_ADDRESS\) * 0x40000 0x0+7000000a \(MIPS_LOCAL_GOTNO\) * 2 - 0x0+70000011 \(MIPS_SYMTABNO\) * 14 + 0x0+70000011 \(MIPS_SYMTABNO\) * 13 0x0+70000012 \(MIPS_UNREFEXTNO\) * .* - 0x0+70000013 \(MIPS_GOTSYM\) * 0x7 + 0x0+70000013 \(MIPS_GOTSYM\) * 0x6 0x0+00000014 \(PLTREL\) * REL 0x0+00000017 \(JMPREL\) * 0x43050 0x0+00000002 \(PLTRELSZ\) * 48 \(bytes\) diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.dd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.dd index 47c05bf09a3..864fbbbad10 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.dd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.dd @@ -97,5 +97,5 @@ Disassembly of section \.MIPS\.stubs: 440a0: df998010 ld t9,-32752\(gp\) 440a4: 03e0782d move t3,ra 440a8: 0320f809 jalr t9 - 440ac: 6418000a daddiu t8,zero,10 + 440ac: 64180009 daddiu t8,zero,9 \.\.\. diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.nd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.nd index e735a45b823..b511d43a491 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.nd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.nd @@ -6,12 +6,12 @@ Symbol table '\.dynsym' contains .*: # and the remaining symbols should have the same order as the # GOT layout given in the *.dd dump. #... - *7: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf2 - *8: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf3 - *9: 0+a2000 +24 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +extd2 - *10: 0+440a0 +0 +FUNC +GLOBAL +DEFAULT +UND +extf1 - *11: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +extd1 - *12: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf4 - *13: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +extd4 + *6: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf2 + *7: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf3 + *8: 0+a2000 +24 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +extd2 + *9: 0+440a0 +0 +FUNC +GLOBAL +DEFAULT +UND +extf1 + *10: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +extd1 + *11: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf4 + *12: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +extd4 #pass diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.ad b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.ad index 4be2ac0d5f2..9399c4738b3 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.ad +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.ad @@ -17,9 +17,9 @@ Dynamic section at offset .* contains .*: 0x70000005 \(MIPS_FLAGS\) * NOTPOT 0x70000006 \(MIPS_BASE_ADDRESS\) * 0x40000 0x7000000a \(MIPS_LOCAL_GOTNO\) * 2 - 0x70000011 \(MIPS_SYMTABNO\) * 14 + 0x70000011 \(MIPS_SYMTABNO\) * 13 0x70000012 \(MIPS_UNREFEXTNO\) * .* - 0x70000013 \(MIPS_GOTSYM\) * 0x7 + 0x70000013 \(MIPS_GOTSYM\) * 0x6 0x00000014 \(PLTREL\) * REL 0x00000017 \(JMPREL\) * 0x43028 0x00000002 \(PLTRELSZ\) * 24 \(bytes\) diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.dd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.dd index 77f762322cd..ba6ab0fb9bf 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.dd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.dd @@ -97,5 +97,5 @@ Disassembly of section \.MIPS\.stubs: 440a0: 8f998010 lw t9,-32752\(gp\) 440a4: 03e07821 move t7,ra 440a8: 0320f809 jalr t9 - 440ac: 2418000a li t8,10 + 440ac: 24180009 li t8,9 \.\.\. diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.nd b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.nd index 7afd67dd103..4b807b5e40f 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.nd +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.nd @@ -6,12 +6,12 @@ Symbol table '\.dynsym' contains .*: # and the remaining symbols should have the same order as the # GOT layout given in the *.dd dump. #... - *7: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf2 - *8: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf3 - *9: 0+a2000 +24 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +extd2 - *10: 0+440a0 +0 +FUNC +GLOBAL +DEFAULT +UND +extf1 - *11: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +extd1 - *12: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf4 - *13: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +extd4 + *6: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf2 + *7: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf3 + *8: 0+a2000 +24 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +extd2 + *9: 0+440a0 +0 +FUNC +GLOBAL +DEFAULT +UND +extf1 + *10: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +extd1 + *11: 0+ +0 +FUNC +GLOBAL +DEFAULT +UND +extf4 + *12: 0+ +0 +OBJECT +GLOBAL +DEFAULT +UND +extd4 #pass diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6.ld b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6.ld index aff900e2811..d9f276b5380 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-6.ld +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-6.ld @@ -29,7 +29,7 @@ SECTIONS .got.plt : { *(.got.plt) } . = 0xa0000; - _gp = . + 0x7ff0; + HIDDEN (_gp = . + 0x7ff0); .got : { *(.got) } . = 0xa1000; diff --git a/ld/testsuite/ld-mips-elf/reloc-2.ld b/ld/testsuite/ld-mips-elf/reloc-2.ld index ff0b2916673..35edf28b4cb 100644 --- a/ld/testsuite/ld-mips-elf/reloc-2.ld +++ b/ld/testsuite/ld-mips-elf/reloc-2.ld @@ -3,7 +3,7 @@ SECTIONS . = 0x208000; .text : { *(.text) } . = 0x400000; - _gp = 0x401234; + HIDDEN (_gp = 0x401234); .sdata : { *(.sdata) } /DISCARD/ : { *(*) } } diff --git a/ld/testsuite/ld-mips-elf/reloc-estimate-1.ld b/ld/testsuite/ld-mips-elf/reloc-estimate-1.ld index 776e503fec7..ec4c3450e5c 100644 --- a/ld/testsuite/ld-mips-elf/reloc-estimate-1.ld +++ b/ld/testsuite/ld-mips-elf/reloc-estimate-1.ld @@ -20,7 +20,7 @@ SECTIONS .data : { *(.data) } . = ALIGN (0x400); - _gp = . + 0x7ff0; + HIDDEN (_gp = . + 0x7ff0); .got : { *(.got) } } diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1.ld b/ld/testsuite/ld-mips-elf/stub-dynsym-1.ld index 17c998df029..0a58e6f38d6 100644 --- a/ld/testsuite/ld-mips-elf/stub-dynsym-1.ld +++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1.ld @@ -10,7 +10,7 @@ SECTIONS .text : { *(.text) } . = ALIGN (0x10000); - _gp = . + 0x7ff0; + HIDDEN (_gp = . + 0x7ff0); .got : { *(.got) } /DISCARD/ : { *(.reginfo) } diff --git a/ld/testsuite/ld-mips-elf/tls-hidden3.ld b/ld/testsuite/ld-mips-elf/tls-hidden3.ld index 261edceb3d9..8e0d0aa42ca 100644 --- a/ld/testsuite/ld-mips-elf/tls-hidden3.ld +++ b/ld/testsuite/ld-mips-elf/tls-hidden3.ld @@ -13,7 +13,7 @@ SECTIONS .text : { *(.text) } . = ALIGN (0x10000); - _gp = . + 0x7ff0; + HIDDEN (_gp = . + 0x7ff0); .got : { *(.got) } . = ALIGN (0x400); 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 b62d4135617..bab0fb09190 100644 --- a/ld/testsuite/ld-mips-elf/tls-multi-got-1.got +++ b/ld/testsuite/ld-mips-elf/tls-multi-got-1.got @@ -4,33 +4,33 @@ DYNAMIC RELOCATION RECORDS OFFSET TYPE VALUE 00000000 R_MIPS_NONE \*ABS\* -0013f830 R_MIPS_TLS_DTPMOD32 \*ABS\* -0014948c R_MIPS_TLS_DTPMOD32 \*ABS\* -0013f83c R_MIPS_TLS_DTPMOD32 tlsvar_gd -0013f840 R_MIPS_TLS_DTPREL32 tlsvar_gd -00149498 R_MIPS_TLS_DTPMOD32 tlsvar_gd -0014949c R_MIPS_TLS_DTPREL32 tlsvar_gd -0013f838 R_MIPS_TLS_TPREL32 tlsvar_ie -00149494 R_MIPS_TLS_TPREL32 tlsvar_ie -00143e38 R_MIPS_REL32 sym_1_9526 +0013f820 R_MIPS_TLS_DTPMOD32 \*ABS\* +0014947c R_MIPS_TLS_DTPMOD32 \*ABS\* +0013f82c R_MIPS_TLS_DTPMOD32 tlsvar_gd +0013f830 R_MIPS_TLS_DTPREL32 tlsvar_gd +00149488 R_MIPS_TLS_DTPMOD32 tlsvar_gd +0014948c R_MIPS_TLS_DTPREL32 tlsvar_gd +0013f828 R_MIPS_TLS_TPREL32 tlsvar_ie +00149484 R_MIPS_TLS_TPREL32 tlsvar_ie +00143e28 R_MIPS_REL32 sym_1_9526 #... -00139ab8 R_MIPS_REL32 sym_2_8654 +00139aa8 R_MIPS_REL32 sym_2_8654 Contents of section .got: - 122360 00000000 80000000 000d7f98 000d65f4 .* - 122370 000d1fa4 000d6010 000d5a48 000d19c0 .* + 122350 00000000 80000000 000d7f88 000d65e4 .* + 122360 000d1f94 000d6000 000d5a38 000d19b0 .* #... - 135be0 000cf204 000e0e48 00000000 80000000 .* - 135bf0 00000000 00000000 00000000 00000000 .* + 135bd0 000cf1f4 000e0e38 00000000 80000000 .* + 135be0 00000000 00000000 00000000 00000000 .* #... + 13f810 00000000 00000000 00000000 00000000 .* 13f820 00000000 00000000 00000000 00000000 .* - 13f830 00000000 00000000 00000000 00000000 .* - 13f840 00000000 00000000 80000000 00000000 .* + 13f830 00000000 00000000 80000000 00000000 .* #... + 149440 00000000 00000000 00000000 00000000 .* 149450 00000000 00000000 00000000 00000000 .* 149460 00000000 00000000 00000000 00000000 .* 149470 00000000 00000000 00000000 00000000 .* 149480 00000000 00000000 00000000 00000000 .* - 149490 00000000 00000000 00000000 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 14a12d629c7..b69ea70a5f7 100644 --- a/ld/testsuite/ld-mips-elf/tls-multi-got-1.r +++ b/ld/testsuite/ld-mips-elf/tls-multi-got-1.r @@ -4,19 +4,19 @@ Dynamic section at offset .* contains 18 entries: 0x00000004 \(HASH\) 0x1c4 0x00000005 \(STRTAB\).* 0x00000006 \(SYMTAB\).* - 0x0000000a \(STRSZ\) 220091 \(bytes\) + 0x0000000a \(STRSZ\) 220087 \(bytes\) 0x0000000b \(SYMENT\) 16 \(bytes\) - 0x00000003 \(PLTGOT\) 0x122360 - 0x00000011 \(REL\) 0xa7978 + 0x00000003 \(PLTGOT\) 0x122350 + 0x00000011 \(REL\) 0xa7960 0x00000012 \(RELSZ\) 160072 \(bytes\) 0x00000013 \(RELENT\) 8 \(bytes\) 0x70000001 \(MIPS_RLD_VERSION\) 1 0x70000005 \(MIPS_FLAGS\) NOTPOT 0x70000006 \(MIPS_BASE_ADDRESS\) 0x0 0x7000000a \(MIPS_LOCAL_GOTNO\) 2 - 0x70000011 \(MIPS_SYMTABNO\) 20013 + 0x70000011 \(MIPS_SYMTABNO\) 20012 0x70000012 \(MIPS_UNREFEXTNO\) 10 - 0x70000013 \(MIPS_GOTSYM\) 0xd + 0x70000013 \(MIPS_GOTSYM\) 0xc 0x0000001e \(FLAGS\) STATIC_TLS 0x00000000 \(NULL\) 0x0 @@ -31,8 +31,8 @@ Relocation section '\.rel\.dyn' at offset 0x[0-9a-f]+ contains 20009 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 000d7f98 sym_1_9526 -[0-9a-f ]+R_MIPS_REL32 000d65f4 sym_1_7885 +[0-9a-f ]+R_MIPS_REL32 000d7f88 sym_1_9526 +[0-9a-f ]+R_MIPS_REL32 000d65e4 sym_1_7885 #... -[0-9a-f ]+R_MIPS_REL32 000cf204 sym_1_0465 -[0-9a-f ]+R_MIPS_REL32 000e0e48 sym_2_8654 +[0-9a-f ]+R_MIPS_REL32 000cf1f4 sym_1_0465 +[0-9a-f ]+R_MIPS_REL32 000e0e38 sym_2_8654 diff --git a/ld/testsuite/ld-mips-elf/tlsdyn-o32-1.d b/ld/testsuite/ld-mips-elf/tlsdyn-o32-1.d index 80c00d31c6f..99eb032b211 100644 --- a/ld/testsuite/ld-mips-elf/tlsdyn-o32-1.d +++ b/ld/testsuite/ld-mips-elf/tlsdyn-o32-1.d @@ -5,7 +5,7 @@ Disassembly of section .text: .* <__start>: .*: 3c1c0fc0 lui gp,0xfc0 - .*: 279c7bf0 addiu gp,gp,31728 + .*: 279c7c10 addiu gp,gp,31760 .*: 0399e021 addu gp,gp,t9 .*: 27bdfff0 addiu sp,sp,-16 .*: afbe0008 sw s8,8\(sp\) @@ -55,7 +55,7 @@ Disassembly of section .text: .* : .*: 3c1c0fc0 lui gp,0xfc0 - .*: 279c7b30 addiu gp,gp,31536 + .*: 279c7b50 addiu gp,gp,31568 .*: 0399e021 addu gp,gp,t9 .*: 27bdfff0 addiu sp,sp,-16 .*: afbe0008 sw s8,8\(sp\) diff --git a/ld/testsuite/ld-mips-elf/tlsdyn-o32-1.got b/ld/testsuite/ld-mips-elf/tlsdyn-o32-1.got index eb1ff68073f..8b021e3c7ce 100644 --- a/ld/testsuite/ld-mips-elf/tlsdyn-o32-1.got +++ b/ld/testsuite/ld-mips-elf/tlsdyn-o32-1.got @@ -13,6 +13,6 @@ OFFSET TYPE VALUE Contents of section .got: - 10000020 00000000 80000000 004004cc 00000001 .........@...... + 10000020 00000000 80000000 004004ac 00000001 .........@...... 10000030 00000000 00000000 00000000 00000000 ................ 10000040 00000000 00000000 00000000 ............ diff --git a/ld/testsuite/ld-mips-elf/tlsdyn-o32-2.d b/ld/testsuite/ld-mips-elf/tlsdyn-o32-2.d index e99862ccae5..221c3b5d4c6 100644 --- a/ld/testsuite/ld-mips-elf/tlsdyn-o32-2.d +++ b/ld/testsuite/ld-mips-elf/tlsdyn-o32-2.d @@ -5,7 +5,7 @@ Disassembly of section .text: .* <__start>: .*: 3c1c0fc0 lui gp,0xfc0 - .*: 279c7bf0 addiu gp,gp,31728 + .*: 279c7c10 addiu gp,gp,31760 .*: 0399e021 addu gp,gp,t9 .*: 27bdfff0 addiu sp,sp,-16 .*: afbe0008 sw s8,8\(sp\) @@ -55,7 +55,7 @@ Disassembly of section .text: .* : .*: 3c1c0fc0 lui gp,0xfc0 - .*: 279c7b30 addiu gp,gp,31536 + .*: 279c7b50 addiu gp,gp,31568 .*: 0399e021 addu gp,gp,t9 .*: 27bdfff0 addiu sp,sp,-16 .*: afbe0008 sw s8,8\(sp\) diff --git a/ld/testsuite/ld-mips-elf/tlsdyn-o32-2.got b/ld/testsuite/ld-mips-elf/tlsdyn-o32-2.got index f3134bae411..a0fbb8c6e82 100644 --- a/ld/testsuite/ld-mips-elf/tlsdyn-o32-2.got +++ b/ld/testsuite/ld-mips-elf/tlsdyn-o32-2.got @@ -13,7 +13,7 @@ OFFSET TYPE VALUE Contents of section .got: - 10000020 00000000 80000000 004004cc 00000000 .* + 10000020 00000000 80000000 004004ac 00000000 .* 10000030 00000000 00000000 00000000 00000000 .* 10000040 00000001 00000000 00000000 00000000 .* 10000050 00000000 00000000 .* diff --git a/ld/testsuite/ld-mips-elf/tlsdyn-o32-3.d b/ld/testsuite/ld-mips-elf/tlsdyn-o32-3.d index ead6a334e56..3d540dd8c1d 100644 --- a/ld/testsuite/ld-mips-elf/tlsdyn-o32-3.d +++ b/ld/testsuite/ld-mips-elf/tlsdyn-o32-3.d @@ -5,7 +5,7 @@ Disassembly of section .text: .* : .*: 3c1c0fc0 lui gp,0xfc0 - .*: 279c7bf0 addiu gp,gp,31728 + .*: 279c7c10 addiu gp,gp,31760 .*: 0399e021 addu gp,gp,t9 .*: 27bdfff0 addiu sp,sp,-16 .*: afbe0008 sw s8,8\(sp\) @@ -51,7 +51,7 @@ Disassembly of section .text: .* <__start>: .*: 3c1c0fc0 lui gp,0xfc0 - .*: 279c7b40 addiu gp,gp,31552 + .*: 279c7b60 addiu gp,gp,31584 .*: 0399e021 addu gp,gp,t9 .*: 27bdfff0 addiu sp,sp,-16 .*: afbe0008 sw s8,8\(sp\) diff --git a/ld/testsuite/ld-mips-elf/tlsdyn-o32-3.got b/ld/testsuite/ld-mips-elf/tlsdyn-o32-3.got index 8628d463032..aaf67714fb0 100644 --- a/ld/testsuite/ld-mips-elf/tlsdyn-o32-3.got +++ b/ld/testsuite/ld-mips-elf/tlsdyn-o32-3.got @@ -13,7 +13,7 @@ OFFSET TYPE VALUE Contents of section .got: - 10000020 00000000 80000000 0040057c 00000000 .* + 10000020 00000000 80000000 0040055c 00000000 .* 10000030 00000000 00000000 00000000 00000000 .* 10000040 00000001 00000000 00000000 00000000 .* 10000050 00000000 00000000 .* diff --git a/ld/testsuite/ld-mips-elf/tlsdyn-o32.d b/ld/testsuite/ld-mips-elf/tlsdyn-o32.d index 32c3e7df21b..31b08ecf2ee 100644 --- a/ld/testsuite/ld-mips-elf/tlsdyn-o32.d +++ b/ld/testsuite/ld-mips-elf/tlsdyn-o32.d @@ -5,7 +5,7 @@ Disassembly of section .text: .* <__start>: .*: 3c1c0fc0 lui gp,0xfc0 - .*: 279c7ba0 addiu gp,gp,31648 + .*: 279c7bc0 addiu gp,gp,31680 .*: 0399e021 addu gp,gp,t9 .*: 27bdfff0 addiu sp,sp,-16 .*: afbe0008 sw s8,8\(sp\) diff --git a/ld/testsuite/ld-mips-elf/tlsdyn-o32.got b/ld/testsuite/ld-mips-elf/tlsdyn-o32.got index 5f93c17d4a9..eef85eee294 100644 --- a/ld/testsuite/ld-mips-elf/tlsdyn-o32.got +++ b/ld/testsuite/ld-mips-elf/tlsdyn-o32.got @@ -13,6 +13,6 @@ OFFSET TYPE VALUE Contents of section .got: - 10000020 00000000 80000000 0040051c 00000001 ................ + 10000020 00000000 80000000 004004fc 00000001 ................ 10000030 00000000 00000000 00000000 00000000 ................ 10000040 00000000 00000000 00000000 ............ diff --git a/ld/testsuite/ld-mips-elf/tlslib-o32-ver.got b/ld/testsuite/ld-mips-elf/tlslib-o32-ver.got index a2bc2398e2e..8b5233de0cc 100644 --- a/ld/testsuite/ld-mips-elf/tlslib-o32-ver.got +++ b/ld/testsuite/ld-mips-elf/tlslib-o32-ver.got @@ -4,12 +4,12 @@ DYNAMIC RELOCATION RECORDS OFFSET TYPE VALUE 00000000 R_MIPS_NONE \*ABS\* -00040520 R_MIPS_TLS_DTPMOD32 \*ABS\* -00040528 R_MIPS_TLS_DTPMOD32 tlsvar_gd -0004052c R_MIPS_TLS_DTPREL32 tlsvar_gd -0004051c R_MIPS_TLS_TPREL32 tlsvar_ie +00040500 R_MIPS_TLS_DTPMOD32 \*ABS\* +00040508 R_MIPS_TLS_DTPMOD32 tlsvar_gd +0004050c R_MIPS_TLS_DTPREL32 tlsvar_gd +000404fc R_MIPS_TLS_TPREL32 tlsvar_ie Contents of section .got: - 40510 00000000 80000000 000004e0 00000000 ................ - 40520 00000000 00000000 00000000 00000000 ................ + 404f0 00000000 80000000 000004c0 00000000 ................ + 40500 00000000 00000000 00000000 00000000 ................ diff --git a/ld/testsuite/ld-mips-elf/tlslib-o32.got b/ld/testsuite/ld-mips-elf/tlslib-o32.got index 7dca58ebbe3..15002234268 100644 --- a/ld/testsuite/ld-mips-elf/tlslib-o32.got +++ b/ld/testsuite/ld-mips-elf/tlslib-o32.got @@ -4,12 +4,12 @@ tmpdir/tlslib-o32.so: file format elf32-tradbigmips DYNAMIC RELOCATION RECORDS OFFSET TYPE VALUE 00000000 R_MIPS_NONE \*ABS\* -00040480 R_MIPS_TLS_DTPMOD32 \*ABS\* -00040488 R_MIPS_TLS_DTPMOD32 tlsvar_gd -0004048c R_MIPS_TLS_DTPREL32 tlsvar_gd -0004047c R_MIPS_TLS_TPREL32 tlsvar_ie +00040460 R_MIPS_TLS_DTPMOD32 \*ABS\* +00040468 R_MIPS_TLS_DTPMOD32 tlsvar_gd +0004046c R_MIPS_TLS_DTPREL32 tlsvar_gd +0004045c R_MIPS_TLS_TPREL32 tlsvar_ie Contents of section .got: - 40470 00000000 80000000 00000440 00000000 ................ - 40480 00000000 00000000 00000000 00000000 ................ + 40450 00000000 80000000 00000420 00000000 ................ + 40460 00000000 00000000 00000000 00000000 ................ -- 2.30.2