aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-powerpc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-06-08 20:17:34 +0930
committerAlan Modra <amodra@gmail.com>2018-06-08 20:17:34 +0930
commitfd161d860f1df7140153eab4726705cc3e2727b0 (patch)
tree04782c728b8692241959b3512aa227334c3f13ca /ld/testsuite/ld-powerpc
parent4f652d7b9a15cd3aae25de38f51baafe7e529646 (diff)
downloadfsf-binutils-gdb-fd161d860f1df7140153eab4726705cc3e2727b0.zip
fsf-binutils-gdb-fd161d860f1df7140153eab4726705cc3e2727b0.tar.gz
fsf-binutils-gdb-fd161d860f1df7140153eab4726705cc3e2727b0.tar.bz2
Define various symbols conditionally in shared libraries
The values of symbols in shared libraries like _end, _edata, and __bss_start are generally not that useful outside of the shared library. This patch defines them conditionally with PROVIDE, since a shared library might need the local value. An example is glibc ld.so local access to "_begin", "_etext" and "_end". (ld.so gains access to the local values by making the references using hidden visibility. That makes the definitions hidden too.) We can't use PROVIDE_HIDDEN in the linker scripts because the shared library might need the value of the symbol in the executable. An example is freebsd libc dynamic access to "_end". PR ld/23161 * emulparams/aarch64cloudabi.sh: PROVIDE __bss_start__, _bss_end__, and __end__ in shared libraries. * emulparams/aarch64fbsd.sh: Likewise. * emulparams/aarch64linux.sh: Likewise. * emulparams/aarch64linux32.sh: Likewise. * emulparams/armelf_fuchsia.sh: Likewise. * emulparams/armelf_linux.sh: Likewise. * emulparams/armelf_phoenix.sh: Likewise. * emulparams/aarch64elf.sh: Likewise, and __data_start * emulparams/aarch64elf32.sh: Likewise. * emulparams/armelf.sh: Likewise. * emulparams/armnto.sh: Likewise. * emulparams/elf32bmip.sh: Remove duplicate ". = ." from OTHER_GOT_SYMBOLS. PROVIDE _ftext, _fdata, and _fbss in shared libs. * emulparams/elf32bmipn32-defs.sh: Likewise. * emulparams/elf32frv.sh: PROVIDE __end and __data_start in shared libs. * emulparams/elf32lriscv-defs.sh: Tidy. * emulparams/elf32mcore.sh: PROVIDE __bss_start and _bss_end in shared libs * emulparams/elf32ppccommon.sh: PROVIDE __end in shared libs. * emulparams/elf32rl78.sh: Tidy. * emulparams/i386nto.sh: PROVIDE _btext in shared libs. * emulparams/shelf_nto.sh: Likewise. * emulparams/shlelf_nto.sh: Likewise. * emulparams/score3_elf.sh: PROVIDE _gp, _bss_start__, _bss_end__, __bss_end__, __end__, _fdata, _sdata_begin, and _bss_start in shared libs. * scripttempl/elf.sc: Don't use EXECUTABLE_SYMBOLS for shared libraries. PROVIDE _edata, edata, __bss_start, and _end in shared libraries. * testsuite/ld-elf/pr23161.map, * testsuite/ld-elf/pr23161a.c, * testsuite/ld-elf/pr23161b.c, * testsuite/ld-elf/pr23161c.c, * testsuite/ld-elf/pr23161a.rd, * testsuite/ld-elf/pr23161b.rd, * testsuite/ld-elf/pr23161c.rd, * testsuite/ld-elf/pr23161d.rd: New tests. * testsuite/ld-elf/shared.exp: Run ld/23161 tests. * testsuite/ld-elf/pr23162.rd, * testsuite/ld-aarch64/ifunc-1-local.d, * testsuite/ld-aarch64/ifunc-1.d, * testsuite/ld-aarch64/ifunc-2-local.d, * testsuite/ld-aarch64/ifunc-2.d, * testsuite/ld-aarch64/ifunc-21.d, * testsuite/ld-aarch64/ifunc-3a.d, * testsuite/ld-alpha/tlsbin.rd, * testsuite/ld-alpha/tlsbin.sd, * testsuite/ld-alpha/tlsbinr.rd, * testsuite/ld-alpha/tlspic.rd, * testsuite/ld-alpha/tlspic.sd, * testsuite/ld-cris/dso-pltdis1.d, * testsuite/ld-cris/dso-pltdis2.d, * testsuite/ld-cris/dso12-pltdis.d, * testsuite/ld-cris/gotplt1.d, * testsuite/ld-cris/gotplt2.d, * testsuite/ld-cris/gotplt3.d, * testsuite/ld-cris/hiddef1.d, * testsuite/ld-cris/libdso-1.d, * testsuite/ld-cris/libdso-10.d, * testsuite/ld-cris/libdso-11.d, * testsuite/ld-cris/libdso-12.d, * testsuite/ld-cris/libdso-12b.d, * testsuite/ld-cris/libdso-12c.d, * testsuite/ld-cris/libdso-13.d, * testsuite/ld-cris/libdso-13b.d, * testsuite/ld-cris/libdso-14.d, * testsuite/ld-cris/libdso-15.d, * testsuite/ld-cris/libdso-15b.d, * testsuite/ld-cris/libdso-1c.d, * testsuite/ld-cris/libdso-1d.d, * testsuite/ld-cris/libdso-2.d, * testsuite/ld-cris/pic-gc-72.d, * testsuite/ld-cris/pic-gc-73.d, * testsuite/ld-cris/pr16044.d, * testsuite/ld-cris/pv32-1.d, * testsuite/ld-cris/tls-dso-dtpoffd2.d, * testsuite/ld-cris/tls-dso-dtpoffd4.d, * testsuite/ld-cris/tls-dso-tpoffgotcomm1.d, * testsuite/ld-cris/tls-gc-71.d, * testsuite/ld-cris/tls-gd-1.d, * testsuite/ld-cris/tls-gd-1h.d, * testsuite/ld-cris/tls-gd-2.d, * testsuite/ld-cris/tls-gd-2h.d, * testsuite/ld-cris/tls-ie-10.d, * testsuite/ld-cris/tls-ie-11.d, * testsuite/ld-cris/tls-ie-78.d, * testsuite/ld-cris/tls-ie-8.d, * testsuite/ld-cris/tls-ie-9.d, * testsuite/ld-cris/tls-js1.d, * testsuite/ld-cris/tls-ld-4.d, * testsuite/ld-cris/tls-ld-5.d, * testsuite/ld-cris/tls-ld-6.d, * testsuite/ld-cris/tls-ld-7.d, * testsuite/ld-cris/tls-ldgd-14.d, * testsuite/ld-cris/tls-ldgd-15.d, * testsuite/ld-cris/tls-ldgdex-14.d, * testsuite/ld-cris/tls-ldgdex-15.d, * testsuite/ld-cris/tls-ldgdx-14.d, * testsuite/ld-cris/tls-ldgdx-15.d, * testsuite/ld-cris/tls-legdx-16.d, * testsuite/ld-cris/tls-legdx-17.d, * testsuite/ld-cris/tls-local-54.d, * testsuite/ld-cris/tls-local-60.d, * testsuite/ld-cris/tls-local-61.d, * testsuite/ld-cris/tls-local-63.d, * testsuite/ld-cris/tls-local-64.d, * testsuite/ld-cris/tls-ok-30.d, * testsuite/ld-cris/tls-ok-32.d, * testsuite/ld-cris/tls-ok-34.d, * testsuite/ld-cris/tls-und-38.d, * testsuite/ld-cris/tls-und-42.d, * testsuite/ld-cris/tls-und-46.d, * testsuite/ld-cris/tls-und-50.d, * testsuite/ld-cris/weakhiddso.d, * testsuite/ld-cris/weakref2.d, * testsuite/ld-frv/fdpic-shared-1.d, * testsuite/ld-frv/fdpic-shared-2.d, * testsuite/ld-frv/fdpic-shared-3.d, * testsuite/ld-frv/fdpic-shared-4.d, * testsuite/ld-frv/fdpic-shared-5.d, * testsuite/ld-frv/fdpic-shared-7.d, * testsuite/ld-frv/fdpic-shared-8.d, * testsuite/ld-frv/tls-dynamic-2.d, * testsuite/ld-i386/ibt-plt-1.d, * testsuite/ld-i386/ibt-plt-2a.d, * testsuite/ld-i386/ibt-plt-2b.d, * testsuite/ld-i386/ibt-plt-2c.d, * testsuite/ld-i386/ibt-plt-2d.d, * testsuite/ld-i386/ibt-plt-3a.d, * testsuite/ld-i386/ibt-plt-3b.d, * testsuite/ld-i386/ibt-plt-3c.d, * testsuite/ld-i386/ibt-plt-3d.d, * testsuite/ld-i386/plt2.dd, * testsuite/ld-i386/pr20830.d, * testsuite/ld-i386/tlsbin-nacl.rd, * testsuite/ld-i386/tlsbin.rd, * testsuite/ld-i386/tlsbin2-nacl.rd, * testsuite/ld-i386/tlsbin2.rd, * testsuite/ld-i386/tlsbindesc-nacl.rd, * testsuite/ld-i386/tlsbindesc.rd, * testsuite/ld-i386/tlsdesc-nacl.rd, * testsuite/ld-i386/tlsdesc.rd, * testsuite/ld-i386/tlsgdesc-nacl.rd, * testsuite/ld-i386/tlsgdesc.rd, * testsuite/ld-i386/tlsnopic-nacl.rd, * testsuite/ld-i386/tlsnopic.dd, * testsuite/ld-i386/tlsnopic.rd, * testsuite/ld-i386/tlsnopic.sd, * testsuite/ld-i386/tlspic-nacl.rd, * testsuite/ld-i386/tlspic.rd, * testsuite/ld-i386/tlspic2-nacl.rd, * testsuite/ld-i386/tlspic2.rd, * testsuite/ld-ia64/merge1.d, * testsuite/ld-ia64/merge2.d, * testsuite/ld-ia64/merge3.d, * testsuite/ld-ia64/merge4.d, * testsuite/ld-ia64/merge5.d, * testsuite/ld-ia64/tlsbin.rd, * testsuite/ld-ia64/tlspic.rd, * testsuite/ld-ifunc/ifunc-2-i386-now.d, * testsuite/ld-ifunc/ifunc-2-local-i386-now.d, * testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d, * testsuite/ld-ifunc/ifunc-2-local-x86-64.d, * testsuite/ld-ifunc/ifunc-2-x86-64-now.d, * testsuite/ld-ifunc/ifunc-2-x86-64.d, * testsuite/ld-ifunc/pr17154-i386-now.d, * testsuite/ld-ifunc/pr17154-i386.d, * testsuite/ld-ifunc/pr17154-x86-64-now.d, * testsuite/ld-ifunc/pr17154-x86-64.d, * testsuite/ld-m68k/tls-def-1.d, * testsuite/ld-m68k/tls-gd-1.d2, * testsuite/ld-metag/shared.d, * testsuite/ld-metag/stub_pic_app.d, * testsuite/ld-mips-elf/rel32-n32.d, * testsuite/ld-mips-elf/rel32-o32.d, * testsuite/ld-mips-elf/rel64.d, * testsuite/ld-powerpc/ambiguousv1.d, * testsuite/ld-powerpc/ambiguousv1b.d, * testsuite/ld-powerpc/ambiguousv2.d, * testsuite/ld-powerpc/ambiguousv2b.d, * testsuite/ld-powerpc/tlsexe.d, * testsuite/ld-powerpc/tlsexe.r, * testsuite/ld-powerpc/tlsexe32.d, * testsuite/ld-powerpc/tlsexe32.g, * testsuite/ld-powerpc/tlsexe32.r, * testsuite/ld-powerpc/tlsexetoc.d, * testsuite/ld-powerpc/tlsexetoc.r, * testsuite/ld-powerpc/tlsso.d, * testsuite/ld-powerpc/tlsso.r, * testsuite/ld-powerpc/tlsso32.g, * testsuite/ld-powerpc/tlsso32.r, * testsuite/ld-powerpc/tlstocso.d, * testsuite/ld-powerpc/tlstocso.g, * testsuite/ld-powerpc/tlstocso.r, * testsuite/ld-s390/gotreloc_31-1.dd, * testsuite/ld-s390/tlsbin.dd, * testsuite/ld-s390/tlsbin.rd, * testsuite/ld-s390/tlsbin_64.dd, * testsuite/ld-s390/tlsbin_64.rd, * testsuite/ld-s390/tlspic.rd, * testsuite/ld-s390/tlspic_64.rd, * testsuite/ld-sh/tlsbin-2.d, * testsuite/ld-sh/tlspic-2.d, * testsuite/ld-sparc/gotop32.rd, * testsuite/ld-sparc/gotop64.rd, * testsuite/ld-sparc/tlssunbin32.rd, * testsuite/ld-sparc/tlssunbin64.rd, * testsuite/ld-sparc/tlssunnopic32.rd, * testsuite/ld-sparc/tlssunnopic64.rd, * testsuite/ld-sparc/tlssunpic32.rd, * testsuite/ld-sparc/tlssunpic64.rd, * testsuite/ld-x86-64/bnd-branch-1-now.d, * testsuite/ld-x86-64/bnd-ifunc-1-now.d, * testsuite/ld-x86-64/bnd-ifunc-2-now.d, * testsuite/ld-x86-64/bnd-ifunc-2.d, * testsuite/ld-x86-64/bnd-plt-1-now.d, * testsuite/ld-x86-64/bnd-plt-1.d, * testsuite/ld-x86-64/ibt-plt-1-x32.d, * testsuite/ld-x86-64/ibt-plt-1.d, * testsuite/ld-x86-64/ibt-plt-2a-x32.d, * testsuite/ld-x86-64/ibt-plt-2a.d, * testsuite/ld-x86-64/ibt-plt-2b-x32.d, * testsuite/ld-x86-64/ibt-plt-2b.d, * testsuite/ld-x86-64/ibt-plt-2c-x32.d, * testsuite/ld-x86-64/ibt-plt-2c.d, * testsuite/ld-x86-64/ibt-plt-2d-x32.d, * testsuite/ld-x86-64/ibt-plt-2d.d, * testsuite/ld-x86-64/ibt-plt-3a-x32.d, * testsuite/ld-x86-64/ibt-plt-3a.d, * testsuite/ld-x86-64/ibt-plt-3b-x32.d, * testsuite/ld-x86-64/ibt-plt-3b.d, * testsuite/ld-x86-64/ibt-plt-3c-x32.d, * testsuite/ld-x86-64/ibt-plt-3c.d, * testsuite/ld-x86-64/ibt-plt-3d-x32.d, * testsuite/ld-x86-64/ibt-plt-3d.d, * testsuite/ld-x86-64/ilp32-4-nacl.d, * testsuite/ld-x86-64/ilp32-4.d, * testsuite/ld-x86-64/load1c-nacl.d, * testsuite/ld-x86-64/load1c.d, * testsuite/ld-x86-64/load1d-nacl.d, * testsuite/ld-x86-64/load1d.d, * testsuite/ld-x86-64/mpx3n.dd, * testsuite/ld-x86-64/mpx4.dd, * testsuite/ld-x86-64/mpx4n.dd, * testsuite/ld-x86-64/plt2.dd, * testsuite/ld-x86-64/pr14207.d, * testsuite/ld-x86-64/pr19162.d, * testsuite/ld-x86-64/pr20253-1f.d, * testsuite/ld-x86-64/pr20253-1l.d, * testsuite/ld-x86-64/pr20830a-now.d, * testsuite/ld-x86-64/pr20830a.d, * testsuite/ld-x86-64/pr20830b-now.d, * testsuite/ld-x86-64/pr20830b.d, * testsuite/ld-x86-64/pr21038a-now.d, * testsuite/ld-x86-64/pr21038a.d, * testsuite/ld-x86-64/pr21038b-now.d, * testsuite/ld-x86-64/pr21038b.d, * testsuite/ld-x86-64/pr21038c-now.d, * testsuite/ld-x86-64/pr21038c.d, * testsuite/ld-x86-64/tlsbin-nacl.rd, * testsuite/ld-x86-64/tlsbin.rd, * testsuite/ld-x86-64/tlsbin2-nacl.rd, * testsuite/ld-x86-64/tlsbin2.rd, * testsuite/ld-x86-64/tlsbindesc-nacl.rd, * testsuite/ld-x86-64/tlsbindesc.rd, * testsuite/ld-x86-64/tlsdesc-nacl.rd, * testsuite/ld-x86-64/tlsdesc.rd, * testsuite/ld-x86-64/tlsgdesc-nacl.rd, * testsuite/ld-x86-64/tlsgdesc.rd, * testsuite/ld-x86-64/tlspic-nacl.rd, * testsuite/ld-x86-64/tlspic.rd, * testsuite/ld-x86-64/tlspic2-nacl.rd, * testsuite/ld-x86-64/tlspic2.rd: Update.
Diffstat (limited to 'ld/testsuite/ld-powerpc')
-rw-r--r--ld/testsuite/ld-powerpc/ambiguousv1.d2
-rw-r--r--ld/testsuite/ld-powerpc/ambiguousv1b.d2
-rw-r--r--ld/testsuite/ld-powerpc/ambiguousv2.d3
-rw-r--r--ld/testsuite/ld-powerpc/ambiguousv2b.d2
-rw-r--r--ld/testsuite/ld-powerpc/tlsexe.d4
-rw-r--r--ld/testsuite/ld-powerpc/tlsexe.r3
-rw-r--r--ld/testsuite/ld-powerpc/tlsexe32.d8
-rw-r--r--ld/testsuite/ld-powerpc/tlsexe32.g2
-rw-r--r--ld/testsuite/ld-powerpc/tlsexe32.r4
-rw-r--r--ld/testsuite/ld-powerpc/tlsexetoc.d4
-rw-r--r--ld/testsuite/ld-powerpc/tlsexetoc.r3
-rw-r--r--ld/testsuite/ld-powerpc/tlsso.d4
-rw-r--r--ld/testsuite/ld-powerpc/tlsso.r8
-rw-r--r--ld/testsuite/ld-powerpc/tlsso32.g2
-rw-r--r--ld/testsuite/ld-powerpc/tlsso32.r14
-rw-r--r--ld/testsuite/ld-powerpc/tlstocso.d4
-rw-r--r--ld/testsuite/ld-powerpc/tlstocso.g2
-rw-r--r--ld/testsuite/ld-powerpc/tlstocso.r10
18 files changed, 25 insertions, 56 deletions
diff --git a/ld/testsuite/ld-powerpc/ambiguousv1.d b/ld/testsuite/ld-powerpc/ambiguousv1.d
index 7ef4575..17450f3 100644
--- a/ld/testsuite/ld-powerpc/ambiguousv1.d
+++ b/ld/testsuite/ld-powerpc/ambiguousv1.d
@@ -13,7 +13,7 @@ Relocation section .* contains 1 entry:
.*
.* R_PPC64_ADDR64 +0+ my_func \+ 0
-Symbol table '\.dynsym' contains 5 entries:
+Symbol table '\.dynsym' contains 2 entries:
.*
0: .*
1: 0+00000000 0 FUNC GLOBAL DEFAULT UND my_func
diff --git a/ld/testsuite/ld-powerpc/ambiguousv1b.d b/ld/testsuite/ld-powerpc/ambiguousv1b.d
index 236dfea..9be1371 100644
--- a/ld/testsuite/ld-powerpc/ambiguousv1b.d
+++ b/ld/testsuite/ld-powerpc/ambiguousv1b.d
@@ -13,7 +13,7 @@ Relocation section .* contains 1 entry:
.*
.* R_PPC64_COPY .* my_func \+ 0
-Symbol table '\.dynsym' contains 5 entries:
+Symbol table '\.dynsym' contains 2 entries:
#...
.*: 0*[1-9a-f][0-9a-f]* 4 FUNC GLOBAL DEFAULT 1[23] my_func
#...
diff --git a/ld/testsuite/ld-powerpc/ambiguousv2.d b/ld/testsuite/ld-powerpc/ambiguousv2.d
index 915ad9b..5fd0d39 100644
--- a/ld/testsuite/ld-powerpc/ambiguousv2.d
+++ b/ld/testsuite/ld-powerpc/ambiguousv2.d
@@ -13,11 +13,10 @@ Relocation section .* contains 1 entry:
.*
.* R_PPC64_ADDR64 .* my_func \+ 0
-Symbol table '\.dynsym' contains 5 entries:
+Symbol table '\.dynsym' contains 2 entries:
.*
0: .*
1: 0+00000000 0 FUNC GLOBAL DEFAULT UND my_func
-#...
Symbol table '\.symtab' contains .* entries:
#...
diff --git a/ld/testsuite/ld-powerpc/ambiguousv2b.d b/ld/testsuite/ld-powerpc/ambiguousv2b.d
index 8100ee1..3ea31c7 100644
--- a/ld/testsuite/ld-powerpc/ambiguousv2b.d
+++ b/ld/testsuite/ld-powerpc/ambiguousv2b.d
@@ -14,7 +14,7 @@ Relocation section .* contains 1 entry:
.*
.* R_PPC64_JMP_SLOT .* my_func \+ 0
-Symbol table '\.dynsym' contains 5 entries:
+Symbol table '\.dynsym' contains 2 entries:
#...
.*: 0*[1-9a-f][0-9a-f]* 0 FUNC GLOBAL DEFAULT UND my_func
#...
diff --git a/ld/testsuite/ld-powerpc/tlsexe.d b/ld/testsuite/ld-powerpc/tlsexe.d
index 396f455..a455df1 100644
--- a/ld/testsuite/ld-powerpc/tlsexe.d
+++ b/ld/testsuite/ld-powerpc/tlsexe.d
@@ -67,8 +67,8 @@ Disassembly of section \.text:
.* (e9 4d 90 2a|2a 90 4d e9) lwa r10,-28632\(r13\)
.* (60 00 00 00|00 00 00 60) nop
.* (a9 4d 90 30|30 90 4d a9) lha r10,-28624\(r13\)
-.* (00 00 00 00|20 02 01 00) .*
-.* (00 01 02 20|00 00 00 00) .*
+.* (00 00 00 00|80 02 01 00) .*
+.* (00 01 02 80|00 00 00 00) .*
.* <__glink_PLTresolve>:
.* (7d 88 02 a6|a6 02 88 7d) mflr r12
.* (42 9f 00 05|05 00 9f 42) bcl 20,4\*cr7\+so,.*
diff --git a/ld/testsuite/ld-powerpc/tlsexe.r b/ld/testsuite/ld-powerpc/tlsexe.r
index 8c8b331..aecf0ff 100644
--- a/ld/testsuite/ld-powerpc/tlsexe.r
+++ b/ld/testsuite/ld-powerpc/tlsexe.r
@@ -65,10 +65,7 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
.* NOTYPE +LOCAL +DEFAULT +UND *
.* TLS +GLOBAL +DEFAULT +UND gd
.* TLS +GLOBAL +DEFAULT +UND ld
-.* NOTYPE +GLOBAL +DEFAULT +13 __bss_start
.* FUNC +GLOBAL +DEFAULT +UND __tls_get_addr_opt
-.* NOTYPE +GLOBAL +DEFAULT +13 _edata
-.* NOTYPE +GLOBAL +DEFAULT +13 _end
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
diff --git a/ld/testsuite/ld-powerpc/tlsexe32.d b/ld/testsuite/ld-powerpc/tlsexe32.d
index 7902946..622995e 100644
--- a/ld/testsuite/ld-powerpc/tlsexe32.d
+++ b/ld/testsuite/ld-powerpc/tlsexe32.d
@@ -52,18 +52,18 @@ Disassembly of section \.text:
.*: (7c 03 03 78|78 03 03 7c) mr r3,r0
.*: (60 00 00 00|00 00 00 60) nop
.*: (3d 60 01 81|81 01 60 3d) lis r11,385
-.*: (81 6b 04 04|04 04 6b 81) lwz r11,1028\(r11\)
+.*: (81 6b 03 94|94 03 6b 81) lwz r11,916\(r11\)
.*: (7d 69 03 a6|a6 03 69 7d) mtctr r11
.*: (4e 80 04 20|20 04 80 4e) bctr
.* <__glink(_PLTresolve)?>:
.*: (3d 80 01 81|81 01 80 3d) lis r12,385
.*: (3d 6b fe 80|80 fe 6b 3d) addis r11,r11,-384
-.*: (80 0c 03 fc|fc 03 0c 80) lwz r0,1020\(r12\)
-.*: (39 6b fd 20|20 fd 6b 39) addi r11,r11,-736
+.*: (80 0c 03 8c|8c 03 0c 80) lwz r0,908\(r12\)
+.*: (39 6b fd 90|90 fd 6b 39) addi r11,r11,-624
.*: (7c 09 03 a6|a6 03 09 7c) mtctr r0
.*: (7c 0b 5a 14|14 5a 0b 7c) add r0,r11,r11
-.*: (81 8c 04 00|00 04 8c 81) lwz r12,1024\(r12\)
+.*: (81 8c 03 90|90 03 8c 81) lwz r12,912\(r12\)
.*: (7d 60 5a 14|14 5a 60 7d) add r11,r0,r11
.*: (4e 80 04 20|20 04 80 4e) bctr
.*: (60 00 00 00|00 00 00 60) nop
diff --git a/ld/testsuite/ld-powerpc/tlsexe32.g b/ld/testsuite/ld-powerpc/tlsexe32.g
index b6afc9c..a23a0af 100644
--- a/ld/testsuite/ld-powerpc/tlsexe32.g
+++ b/ld/testsuite/ld-powerpc/tlsexe32.g
@@ -7,5 +7,5 @@
.*
Contents of section \.got:
-.* 00000000 00000000 00000000 (0181033c|3c038101) .*
+.* 00000000 00000000 00000000 (018102cc|cc028101) .*
.* 00000000 00000000 .*
diff --git a/ld/testsuite/ld-powerpc/tlsexe32.r b/ld/testsuite/ld-powerpc/tlsexe32.r
index a7387e4..23045c8 100644
--- a/ld/testsuite/ld-powerpc/tlsexe32.r
+++ b/ld/testsuite/ld-powerpc/tlsexe32.r
@@ -64,11 +64,7 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
.* NOTYPE +LOCAL +DEFAULT +UND
.* TLS +GLOBAL +DEFAULT +UND gd
.* TLS +GLOBAL +DEFAULT +UND ld
-.* NOTYPE +GLOBAL +DEFAULT +12 __end
-.* NOTYPE +GLOBAL +DEFAULT +12 __bss_start
.* FUNC +GLOBAL +DEFAULT +UND __tls_get_addr_opt
-.* NOTYPE +GLOBAL +DEFAULT +12 _edata
-.* NOTYPE +GLOBAL +DEFAULT +12 _end
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
diff --git a/ld/testsuite/ld-powerpc/tlsexetoc.d b/ld/testsuite/ld-powerpc/tlsexetoc.d
index 4bab567..4186fa2 100644
--- a/ld/testsuite/ld-powerpc/tlsexetoc.d
+++ b/ld/testsuite/ld-powerpc/tlsexetoc.d
@@ -51,8 +51,8 @@ Disassembly of section \.text:
.* (89 4d 90 60|60 90 4d 89) lbz r10,-28576\(r13\)
.* (60 00 00 00|00 00 00 60) nop
.* (99 4d 90 68|68 90 4d 99) stb r10,-28568\(r13\)
-.* (00 00 00 00|68 02 01 00) .*
-.* (00 01 02 68|00 00 00 00) .*
+.* (00 00 00 00|e8 02 01 00) .*
+.* (00 01 02 e8|00 00 00 00) .*
.* <__glink_PLTresolve>:
.* (7d 88 02 a6|a6 02 88 7d) mflr r12
.* (42 9f 00 05|05 00 9f 42) bcl 20,4\*cr7\+so,.*
diff --git a/ld/testsuite/ld-powerpc/tlsexetoc.r b/ld/testsuite/ld-powerpc/tlsexetoc.r
index 14096ac..4ee5ffb 100644
--- a/ld/testsuite/ld-powerpc/tlsexetoc.r
+++ b/ld/testsuite/ld-powerpc/tlsexetoc.r
@@ -66,10 +66,7 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
.* NOTYPE +LOCAL +DEFAULT +UND *
.* TLS +GLOBAL +DEFAULT +UND gd
.* TLS +GLOBAL +DEFAULT +UND ld
-.* NOTYPE +GLOBAL +DEFAULT +13 __bss_start
.* FUNC +GLOBAL +DEFAULT +UND __tls_get_addr_opt
-.* NOTYPE +GLOBAL +DEFAULT +13 _edata
-.* NOTYPE +GLOBAL +DEFAULT +13 _end
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
diff --git a/ld/testsuite/ld-powerpc/tlsso.d b/ld/testsuite/ld-powerpc/tlsso.d
index 58c9dee..caebc49 100644
--- a/ld/testsuite/ld-powerpc/tlsso.d
+++ b/ld/testsuite/ld-powerpc/tlsso.d
@@ -57,8 +57,8 @@ Disassembly of section \.text:
.* (3d 2d 00 00|00 00 2d 3d) addis r9,r13,0
.* (a9 49 00 00|00 00 49 a9) lha r10,0\(r9\)
.* (60 00 00 00|00 00 00 60) nop
-.* (00 00 00 00|58 02 01 00) .*
-.* (00 01 02 58|00 00 00 00) .*
+.* (00 00 00 00|b8 02 01 00) .*
+.* (00 01 02 b8|00 00 00 00) .*
.* <__glink_PLTresolve>:
.* (7d 88 02 a6|a6 02 88 7d) mflr r12
.* (42 9f 00 05|05 00 9f 42) bcl 20,4\*cr7\+so,.*
diff --git a/ld/testsuite/ld-powerpc/tlsso.r b/ld/testsuite/ld-powerpc/tlsso.r
index 5d349e5..259c69e 100644
--- a/ld/testsuite/ld-powerpc/tlsso.r
+++ b/ld/testsuite/ld-powerpc/tlsso.r
@@ -46,7 +46,7 @@ Program Headers:
Relocation section '\.rela\.dyn' at offset .* contains 18 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
-[0-9a-f ]+R_PPC64_RELATIVE +55c
+[0-9a-f ]+R_PPC64_RELATIVE +4fc
[0-9a-f ]+R_PPC64_RELATIVE +18800
[0-9a-f ]+R_PPC64_TPREL16 +0+60 le0 \+ 0
[0-9a-f ]+R_PPC64_TPREL16_HA +0+68 le1 \+ 0
@@ -83,9 +83,6 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
.* FUNC +GLOBAL +DEFAULT +10 _start
.* TLS +GLOBAL +DEFAULT +8 ld2
.* TLS +GLOBAL +DEFAULT +8 ld1
-.* NOTYPE +GLOBAL +DEFAULT +12 __bss_start
-.* NOTYPE +GLOBAL +DEFAULT +12 _edata
-.* NOTYPE +GLOBAL +DEFAULT +12 _end
.* TLS +GLOBAL +DEFAULT +8 gd0
.* TLS +GLOBAL +DEFAULT +8 ie0
@@ -125,8 +122,5 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* FUNC +GLOBAL +DEFAULT +10 _start
.* TLS +GLOBAL +DEFAULT +8 ld2
.* TLS +GLOBAL +DEFAULT +8 ld1
-.* NOTYPE +GLOBAL +DEFAULT +12 __bss_start
-.* NOTYPE +GLOBAL +DEFAULT +12 _edata
-.* NOTYPE +GLOBAL +DEFAULT +12 _end
.* TLS +GLOBAL +DEFAULT +8 gd0
.* TLS +GLOBAL +DEFAULT +8 ie0
diff --git a/ld/testsuite/ld-powerpc/tlsso32.g b/ld/testsuite/ld-powerpc/tlsso32.g
index 9909063..832a840 100644
--- a/ld/testsuite/ld-powerpc/tlsso32.g
+++ b/ld/testsuite/ld-powerpc/tlsso32.g
@@ -9,4 +9,4 @@
Contents of section \.got:
.* 00000000 00000000 00000000 00000000 .*
.* 00000000 00000000 00000000 00000000 .*
-.* 00000000 (0001044c|4c040100) 00000000 00000000 .*
+.* 00000000 (000103ec|ec030100) 00000000 00000000 .*
diff --git a/ld/testsuite/ld-powerpc/tlsso32.r b/ld/testsuite/ld-powerpc/tlsso32.r
index 2aabfaa..6a5a48a 100644
--- a/ld/testsuite/ld-powerpc/tlsso32.r
+++ b/ld/testsuite/ld-powerpc/tlsso32.r
@@ -52,9 +52,9 @@ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries:
[0-9a-f ]+R_PPC_TPREL16 +0+30 +le0 \+ 0
[0-9a-f ]+R_PPC_TPREL16_HA +0+34 +le1 \+ 0
[0-9a-f ]+R_PPC_TPREL16_LO +0+34 +le1 \+ 0
-[0-9a-f ]+R_PPC_TPREL16 +0+10430 +\.tdata \+ 10444
-[0-9a-f ]+R_PPC_TPREL16_HA +0+10430 +\.tdata \+ 10448
-[0-9a-f ]+R_PPC_TPREL16_LO +0+10430 +\.tdata \+ 10448
+[0-9a-f ]+R_PPC_TPREL16 +0+103d0 +\.tdata \+ 103e4
+[0-9a-f ]+R_PPC_TPREL16_HA +0+103d0 +\.tdata \+ 103e8
+[0-9a-f ]+R_PPC_TPREL16_LO +0+103d0 +\.tdata \+ 103e8
[0-9a-f ]+R_PPC_DTPMOD32 +0
[0-9a-f ]+R_PPC_DTPREL32 +0
[0-9a-f ]+R_PPC_DTPMOD32 +0
@@ -80,12 +80,8 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
.* TLS +GLOBAL +DEFAULT +8 le1
.* TLS +GLOBAL +DEFAULT +UND ld
.* NOTYPE +GLOBAL +DEFAULT +6 _start
-.* NOTYPE +GLOBAL +DEFAULT +11 __end
.* TLS +GLOBAL +DEFAULT +8 ld2
.* TLS +GLOBAL +DEFAULT +8 ld1
-.* NOTYPE +GLOBAL +DEFAULT +11 __bss_start
-.* NOTYPE +GLOBAL +DEFAULT +11 _edata
-.* NOTYPE +GLOBAL +DEFAULT +11 _end
.* TLS +GLOBAL +DEFAULT +8 gd0
.* TLS +GLOBAL +DEFAULT +8 ie0
@@ -124,11 +120,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* TLS +GLOBAL +DEFAULT +8 le1
.* TLS +GLOBAL +DEFAULT +UND ld
.* NOTYPE +GLOBAL +DEFAULT +6 _start
-.* NOTYPE +GLOBAL +DEFAULT +11 __end
.* TLS +GLOBAL +DEFAULT +8 ld2
.* TLS +GLOBAL +DEFAULT +8 ld1
-.* NOTYPE +GLOBAL +DEFAULT +11 __bss_start
-.* NOTYPE +GLOBAL +DEFAULT +11 _edata
-.* NOTYPE +GLOBAL +DEFAULT +11 _end
.* TLS +GLOBAL +DEFAULT +8 gd0
.* TLS +GLOBAL +DEFAULT +8 ie0
diff --git a/ld/testsuite/ld-powerpc/tlstocso.d b/ld/testsuite/ld-powerpc/tlstocso.d
index 8d55fee..d7157ef 100644
--- a/ld/testsuite/ld-powerpc/tlstocso.d
+++ b/ld/testsuite/ld-powerpc/tlstocso.d
@@ -41,8 +41,8 @@ Disassembly of section \.text:
.* (3d 2d 00 00|00 00 2d 3d) addis r9,r13,0
.* (99 49 00 00|00 00 49 99) stb r10,0\(r9\)
.* (60 00 00 00|00 00 00 60) nop
-.* (00 00 00 00|10 03 01 00) .*
-.* (00 01 03 10|00 00 00 00) .*
+.* (00 00 00 00|70 02 01 00) .*
+.* (00 01 02 70|00 00 00 00) .*
.* <__glink_PLTresolve>:
.* (7d 88 02 a6|a6 02 88 7d) mflr r12
.* (42 9f 00 05|05 00 9f 42) bcl 20,4\*cr7\+so,.*
diff --git a/ld/testsuite/ld-powerpc/tlstocso.g b/ld/testsuite/ld-powerpc/tlstocso.g
index 2e5ffc8..76e894b 100644
--- a/ld/testsuite/ld-powerpc/tlstocso.g
+++ b/ld/testsuite/ld-powerpc/tlstocso.g
@@ -7,7 +7,7 @@
.*
Contents of section \.got:
- 10800 (00000000|00880100) (00018800|00000000) 00000000 00000000 .*
+ 10700 (00000000|00870100) (00018700|00000000) 00000000 00000000 .*
.* 00000000 00000000 00000000 00000000 .*
.* 00000000 00000000 00000000 00000000 .*
.* 00000000 00000000 00000000 00000000 .*
diff --git a/ld/testsuite/ld-powerpc/tlstocso.r b/ld/testsuite/ld-powerpc/tlstocso.r
index f8922ee..c43ffb6 100644
--- a/ld/testsuite/ld-powerpc/tlstocso.r
+++ b/ld/testsuite/ld-powerpc/tlstocso.r
@@ -46,8 +46,8 @@ Program Headers:
Relocation section '\.rela\.dyn' at offset .* contains 13 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
-[0-9a-f ]+R_PPC64_RELATIVE +4dc
-[0-9a-f ]+R_PPC64_RELATIVE +18800
+[0-9a-f ]+R_PPC64_RELATIVE +47c
+[0-9a-f ]+R_PPC64_RELATIVE +18700
[0-9a-f ]+R_PPC64_TPREL16 +0+60 le0 \+ 0
[0-9a-f ]+R_PPC64_TPREL16_HA +0+68 le1 \+ 0
[0-9a-f ]+R_PPC64_TPREL16_LO +0+68 le1 \+ 0
@@ -78,9 +78,6 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
.* FUNC +GLOBAL +DEFAULT +10 _start
.* TLS +GLOBAL +DEFAULT +8 ld2
.* TLS +GLOBAL +DEFAULT +8 ld1
-.* NOTYPE +GLOBAL +DEFAULT +12 __bss_start
-.* NOTYPE +GLOBAL +DEFAULT +12 _edata
-.* NOTYPE +GLOBAL +DEFAULT +12 _end
.* TLS +GLOBAL +DEFAULT +8 gd0
.* TLS +GLOBAL +DEFAULT +8 ie0
@@ -121,8 +118,5 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* FUNC +GLOBAL +DEFAULT +10 _start
.* TLS +GLOBAL +DEFAULT +8 ld2
.* TLS +GLOBAL +DEFAULT +8 ld1
-.* NOTYPE +GLOBAL +DEFAULT +12 __bss_start
-.* NOTYPE +GLOBAL +DEFAULT +12 _edata
-.* NOTYPE +GLOBAL +DEFAULT +12 _end
.* TLS +GLOBAL +DEFAULT +8 gd0
.* TLS +GLOBAL +DEFAULT +8 ie0