aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaamoun Tarsha <maamountk@hotmail.com>2019-01-14 16:00:14 +0000
committerNick Clifton <nickc@redhat.com>2019-01-14 16:00:14 +0000
commit5a12586d44fa8d5dfc74cbca4f2f36a273a16335 (patch)
tree40fc567191c2d5360e179e6da0c86553a657ab02
parentd63f2be21bfbedb8a83b5c5f317896bf2bb19a95 (diff)
downloadgdb-5a12586d44fa8d5dfc74cbca4f2f36a273a16335.zip
gdb-5a12586d44fa8d5dfc74cbca4f2f36a273a16335.tar.gz
gdb-5a12586d44fa8d5dfc74cbca4f2f36a273a16335.tar.bz2
Add support to GNU ld to separate got related plt entries from normal ones in order to be able to switch the non-plt got entries to read-only after startup, conforming to revised Linux for zSeries ABI.
PR 20133 * emulparams/elf64_s390.sh (SEPARATE_GOTPLT): Define. * emulparams/elf_s390.sh (SEPARATE_GOTPLT): Define. * testsuite/ld-s390/gotreloc_31-1.dd: Update expected output. * testsuite/ld-s390/tlsbin.dd: Likewise. * testsuite/ld-s390/tlsbin.rd: Likewise. * testsuite/ld-s390/tlsbin.sd: Likewise. * testsuite/ld-s390/tlsbin_64.dd: Likewise. * testsuite/ld-s390/tlsbin_64.rd: Likewise. * testsuite/ld-s390/tlsbin_64.sd: Likewise. * testsuite/ld-s390/tlspic.dd: Likewise. * testsuite/ld-s390/tlspic.rd: Likewise. * testsuite/ld-s390/tlspic.sd: Likewise. * testsuite/ld-s390/tlspic_64.dd: Likewise. * testsuite/ld-s390/tlspic_64.rd: Likewise. * testsuite/ld-s390/tlspic_64.sd: Likewise. * testsuite/ld-s390/s390.exp: Skip s390 tests for tpf targets.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-s390.c3
-rw-r--r--ld/ChangeLog20
-rw-r--r--ld/emulparams/elf64_s390.sh1
-rw-r--r--ld/emulparams/elf_s390.sh1
-rw-r--r--ld/testsuite/ld-s390/gotreloc_31-1.dd10
-rw-r--r--ld/testsuite/ld-s390/s390.exp4
-rw-r--r--ld/testsuite/ld-s390/tlsbin.dd16
-rw-r--r--ld/testsuite/ld-s390/tlsbin.rd12
-rw-r--r--ld/testsuite/ld-s390/tlsbin.sd1
-rw-r--r--ld/testsuite/ld-s390/tlsbin_64.dd18
-rw-r--r--ld/testsuite/ld-s390/tlsbin_64.rd10
-rw-r--r--ld/testsuite/ld-s390/tlsbin_64.sd15
-rw-r--r--ld/testsuite/ld-s390/tlspic.dd38
-rw-r--r--ld/testsuite/ld-s390/tlspic.rd4
-rw-r--r--ld/testsuite/ld-s390/tlspic.sd1
-rw-r--r--ld/testsuite/ld-s390/tlspic_64.dd48
-rw-r--r--ld/testsuite/ld-s390/tlspic_64.rd2
-rw-r--r--ld/testsuite/ld-s390/tlspic_64.sd21
19 files changed, 131 insertions, 99 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f394db2..89aef20 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
+
+ PR 20133
+ * elf32-s390.c (allocate_dynrelocs): Update comment.
+
2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
* warning.m4: Adjust egrep pattern for non-GNU compilers.
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 49a301f..1bf8cc2 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -1666,8 +1666,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
/* Make room for this entry. */
s->size += PLT_ENTRY_SIZE;
- /* We also need to make an entry in the .got.plt section, which
- will be placed in the .got section by the linker script. */
+ /* We also need to make an entry in the .got.plt section. */
htab->elf.sgotplt->size += GOT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 274f4af..3f19dc3 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,23 @@
+2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
+
+ PR 20133
+ * emulparams/elf64_s390.sh (SEPARATE_GOTPLT): Define.
+ * emulparams/elf_s390.sh (SEPARATE_GOTPLT): Define.
+ * testsuite/ld-s390/gotreloc_31-1.dd: Update expected output.
+ * testsuite/ld-s390/tlsbin.dd: Likewise.
+ * testsuite/ld-s390/tlsbin.rd: Likewise.
+ * testsuite/ld-s390/tlsbin.sd: Likewise.
+ * testsuite/ld-s390/tlsbin_64.dd: Likewise.
+ * testsuite/ld-s390/tlsbin_64.rd: Likewise.
+ * testsuite/ld-s390/tlsbin_64.sd: Likewise.
+ * testsuite/ld-s390/tlspic.dd: Likewise.
+ * testsuite/ld-s390/tlspic.rd: Likewise.
+ * testsuite/ld-s390/tlspic.sd: Likewise.
+ * testsuite/ld-s390/tlspic_64.dd: Likewise.
+ * testsuite/ld-s390/tlspic_64.rd: Likewise.
+ * testsuite/ld-s390/tlspic_64.sd: Likewise.
+ * testsuite/ld-s390/s390.exp: Skip s390 tests for tpf targets.
+
2019-01-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
* ld.texi (--wrap): Add example to emphasise that only undefined
diff --git a/ld/emulparams/elf64_s390.sh b/ld/emulparams/elf64_s390.sh
index 8d02042..e0239be 100644
--- a/ld/emulparams/elf64_s390.sh
+++ b/ld/emulparams/elf64_s390.sh
@@ -14,6 +14,7 @@ GENERATE_PIE_SCRIPT=yes
GENERATE_RELRO_SCRIPT=yes
NO_SMALL_DATA=yes
EXTRA_EM_FILE=s390
+SEPARATE_GOTPLT=24
IREL_IN_PLT=
SEPARATE_GOTPLT=0
test -z "$RELRO" && unset SEPARATE_GOTPLT
diff --git a/ld/emulparams/elf_s390.sh b/ld/emulparams/elf_s390.sh
index f2286ec..39c746c 100644
--- a/ld/emulparams/elf_s390.sh
+++ b/ld/emulparams/elf_s390.sh
@@ -11,4 +11,5 @@ TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
NO_SMALL_DATA=yes
+SEPARATE_GOTPLT=12
IREL_IN_PLT=
diff --git a/ld/testsuite/ld-s390/gotreloc_31-1.dd b/ld/testsuite/ld-s390/gotreloc_31-1.dd
index b1cf37c..d6dd861 100644
--- a/ld/testsuite/ld-s390/gotreloc_31-1.dd
+++ b/ld/testsuite/ld-s390/gotreloc_31-1.dd
@@ -4,10 +4,10 @@ tmpdir/gotreloc_31-1: file format elf32-s390
Disassembly of section .text:
.* <foo>:
-.*: c4 18 00 00 08 56 [ ]*lgrl %r1,11b4 <_GLOBAL_OFFSET_TABLE_\+0x14>
-.*: e3 10 c0 14 00 04 [ ]*lg %r1,20\(%r12\)
+.*: c4 18 00 00 08 50 [ ]*lgrl %r1,11a8 <\.got\+0x8>
+.*: e3 10 c0 08 00 04 [ ]*lg %r1,8\(%r12\)
.*: c0 10 00 00 08 52 [ ]*larl %r1,11b8 <bar>
-.*: 58 10 c0 14 [ ]*l %r1,20\(%r12\)
+.*: 58 10 c0 08 [ ]*l %r1,8\(%r12\)
.*: c0 10 00 00 08 4d [ ]*larl %r1,11b8 <bar>
-.*: c4 18 00 00 08 46 [ ]*lgrl %r1,11b0 <_GLOBAL_OFFSET_TABLE_\+0x10>
-.*: c4 18 00 00 08 41 [ ]*lgrl %r1,11ac <_GLOBAL_OFFSET_TABLE_\+0xc>
+.*: c4 18 00 00 08 40 [ ]*lgrl %r1,11a4 <\.got\+0x4>
+.*: c4 18 00 00 08 3b [ ]*lgrl %r1,11a0 <\.got>
diff --git a/ld/testsuite/ld-s390/s390.exp b/ld/testsuite/ld-s390/s390.exp
index 7970f23..38fd072 100644
--- a/ld/testsuite/ld-s390/s390.exp
+++ b/ld/testsuite/ld-s390/s390.exp
@@ -92,6 +92,8 @@ if [istarget "s390-*-*"] {
}
if [istarget "s390x-*-*"] {
- run_ld_link_tests $s390tests
+ if {! [istarget "*-*-tpf"] } {
+ run_ld_link_tests $s390tests
+ }
run_ld_link_tests $s390xtests
}
diff --git a/ld/testsuite/ld-s390/tlsbin.dd b/ld/testsuite/ld-s390/tlsbin.dd
index 677357c..4d992c4 100644
--- a/ld/testsuite/ld-s390/tlsbin.dd
+++ b/ld/testsuite/ld-s390/tlsbin.dd
@@ -27,9 +27,9 @@ Disassembly of section .text:
# __tls_get_addr@plt-.LT1
+[0-9a-f]+: [0-9a-f ]+ .long 0x[0-9a-f]+
# sG1@tlsgd
- +[0-9a-f]+: 00 00 00 28 .long 0x00000028
+ +[0-9a-f]+: 00 00 00 18 .long 0x00000018
# sG2@tlsgd
- +[0-9a-f]+: 00 00 00 20 .long 0x00000020
+ +[0-9a-f]+: 00 00 00 10 .long 0x00000010
# sg1@tlsgd
+[0-9a-f]+: ff ff ff 60 .long 0xffffff60
# sl1@tlsgd
@@ -49,7 +49,7 @@ Disassembly of section .text:
# sh2@dtpoff
+[0-9a-f]+: ff ff ff a4 .long 0xffffffa4
# sG2@gotntpoff
- +[0-9a-f]+: 00 00 00 20 .long 0x00000020
+ +[0-9a-f]+: 00 00 00 10 .long 0x00000010
# sg1@gotntpoff
+[0-9a-f]+: ff ff ff 60 .long 0xffffff60
# sl1@gotntpoff
@@ -122,17 +122,17 @@ Disassembly of section .text:
+[0-9a-f]+: 07 00 nopr
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# IE against global var with small got access (no optimization)
- +[0-9a-f]+: 58 30 c0 14 l %r3,20\(%r12\)
+ +[0-9a-f]+: 58 30 c0 04 l %r3,4\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against global var defined in exec with small got access
# (no optimization)
- +[0-9a-f]+: 58 30 c0 18 l %r3,24\(%r12\)
+ +[0-9a-f]+: 58 30 c0 08 l %r3,8\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against local var with small got access (no optimization)
- +[0-9a-f]+: 58 30 c0 10 l %r3,16\(%r12\)
+ +[0-9a-f]+: 58 30 c0 00 l %r3,0\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against hidden var with small got access (no optimization)
- +[0-9a-f]+: 58 30 c0 1c l %r3,28\(%r12\)
+ +[0-9a-f]+: 58 30 c0 0c l %r3,12\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# function epilog
+[0-9a-f]+: 98 6e f0 78 lm %r6,%r14,120\(%r15\)
@@ -151,7 +151,7 @@ Disassembly of section .text:
+[0-9a-f]+: 90 6e f0 18 stm %r6,%r14,24\(%r15\)
+[0-9a-f]+: a7 d5 00 0c bras %r13,[0-9a-f]+ <_start\+0x1c>
# sG6@indntpoff
- +[0-9a-f]+: 00 40 15 64 .long 0x00401564
+ +[0-9a-f]+: 00 40 15 54 .long 0x00401554
# bg6@indntpoff
+[0-9a-f]+: ff ff ff d4 .long 0xffffffd4
# bl6@indntpoff
diff --git a/ld/testsuite/ld-s390/tlsbin.rd b/ld/testsuite/ld-s390/tlsbin.rd
index 50d4443..963f774 100644
--- a/ld/testsuite/ld-s390/tlsbin.rd
+++ b/ld/testsuite/ld-s390/tlsbin.rd
@@ -22,6 +22,7 @@ Section Headers:
+\[[ 0-9]+\] .tbss +NOBITS .* 0+40 00 WAT +0 +0 +1
+\[[ 0-9]+\] .dynamic +DYNAMIC .*
+\[[ 0-9]+\] .got +PROGBITS .*
+ +\[[ 0-9]+\] .got.plt +PROGBITS .*
+\[[ 0-9]+\] .symtab .*
+\[[ 0-9]+\] .strtab .*
+\[[ 0-9]+\] .shstrtab .*
@@ -47,7 +48,7 @@ Program Headers:
+00 *
+01 +.interp *
+02 +.interp .hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text *
- +03 +.tdata .dynamic .got *
+ +03 +.tdata .dynamic .got .got.plt *
+04 +.dynamic *
+05 +.tdata .tbss *
@@ -86,6 +87,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* SECTION +LOCAL +DEFAULT +10
.* SECTION +LOCAL +DEFAULT +11
.* SECTION +LOCAL +DEFAULT +12
+.* SECTION +LOCAL +DEFAULT +13
.* FILE +LOCAL +DEFAULT +ABS .*
.* TLS +LOCAL +DEFAULT +9 sl1
.* TLS +LOCAL +DEFAULT +9 sl2
@@ -106,7 +108,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* TLS +LOCAL +DEFAULT +10 bl8
.* FILE +LOCAL +DEFAULT +ABS .*
.* OBJECT +LOCAL +DEFAULT +11 _DYNAMIC
-.* OBJECT +LOCAL +DEFAULT +12 _GLOBAL_OFFSET_TABLE_
+.* OBJECT +LOCAL +DEFAULT +13 _GLOBAL_OFFSET_TABLE_
.* TLS +GLOBAL +DEFAULT +UND sG3
.* TLS +GLOBAL +DEFAULT +9 sg8
.* TLS +GLOBAL +DEFAULT +10 bg8
@@ -126,7 +128,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* TLS +GLOBAL +HIDDEN +9 sh4
.* TLS +GLOBAL +DEFAULT +10 bg7
.* TLS +GLOBAL +HIDDEN +9 sh5
-.* NOTYPE +GLOBAL +DEFAULT +12 __bss_start
+.* NOTYPE +GLOBAL +DEFAULT +13 __bss_start
.* TLS +GLOBAL +DEFAULT +UND sG6
.* FUNC +GLOBAL +DEFAULT +8 fn2
.* TLS +GLOBAL +DEFAULT +9 sg2
@@ -134,8 +136,8 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* TLS +GLOBAL +HIDDEN +9 sh1
.* TLS +GLOBAL +DEFAULT +9 sg6
.* TLS +GLOBAL +DEFAULT +9 sg7
-.* NOTYPE +GLOBAL +DEFAULT +12 _edata
-.* NOTYPE +GLOBAL +DEFAULT +12 _end
+.* NOTYPE +GLOBAL +DEFAULT +13 _edata
+.* NOTYPE +GLOBAL +DEFAULT +13 _end
.* TLS +GLOBAL +HIDDEN +9 sh2
.* TLS +GLOBAL +HIDDEN +9 sh6
.* TLS +GLOBAL +DEFAULT +10 bg2
diff --git a/ld/testsuite/ld-s390/tlsbin.sd b/ld/testsuite/ld-s390/tlsbin.sd
index b1ecbf0..12ec2f1 100644
--- a/ld/testsuite/ld-s390/tlsbin.sd
+++ b/ld/testsuite/ld-s390/tlsbin.sd
@@ -8,6 +8,5 @@
.*: file format elf32-s390
Contents of section .got:
- [0-9a-f]+ [0-9a-f]+ 00000000 00000000 [0-9a-f]+ .@...........@..
[0-9a-f]+ ffffff88 00000000 ffffff68 ffffffa8 ...........h....
[0-9a-f]+ 00000000 00000000 00000000 ............
diff --git a/ld/testsuite/ld-s390/tlsbin_64.dd b/ld/testsuite/ld-s390/tlsbin_64.dd
index b984c57..6ee87b0 100644
--- a/ld/testsuite/ld-s390/tlsbin_64.dd
+++ b/ld/testsuite/ld-s390/tlsbin_64.dd
@@ -70,7 +70,7 @@ Disassembly of section .text:
# function prolog
+[0-9a-f]+: b9 04 00 ef lgr %r14,%r15
+[0-9a-f]+: a7 fb ff 60 aghi %r15,-160
- +[0-9a-f]+: c0 c0 [0-9a-f ]+ larl %r12,[0-9a-f]+ <_GLOBAL_OFFSET_TABLE_>
+ +[0-9a-f]+: c0 c0 [0-9a-f ]+ larl %r12,[0-9a-f]+ <.*>
+[0-9a-f]+: e3 e0 e0 00 00 24 stg %r14,0\(%r14\)
# extract TCB
+[0-9a-f]+: b2 4f 00 90 ear %r9,%a0
@@ -133,29 +133,29 @@ Disassembly of section .text:
+[0-9a-f]+: e3 33 c0 00 00 04 lg %r3,0\(%r3,%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against global var defined in exec with larl got access
- +[0-9a-f]+: c0 30 [0-9a-f ]+ larl %r3,[0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x38>
+ +[0-9a-f]+: c0 30 [0-9a-f ]+ larl %r3,[0-9a-f]+ <.*>
+[0-9a-f]+: eb 43 00 00 00 0d sllg %r4,%r3,0
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# IE against local var with larl got access
- +[0-9a-f]+: c0 30 [0-9a-f ]+ larl %r3,[0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x20>
+ +[0-9a-f]+: c0 30 [0-9a-f ]+ larl %r3,[0-9a-f]+ <.*>
+[0-9a-f]+: eb 43 00 00 00 0d sllg %r4,%r3,0
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# IE against hidden var with larl got access
- +[0-9a-f]+: c0 30 [0-9a-f ]+ larl %r3,[0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x40>
+ +[0-9a-f]+: c0 30 [0-9a-f ]+ larl %r3,[0-9a-f]+ <.*>
+[0-9a-f]+: eb 43 00 00 00 0d sllg %r4,%r3,0
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# IE against global var with small got access (no optimization)
- +[0-9a-f]+: e3 30 c0 28 00 04 lg %r3,40\(%r12\)
+ +[0-9a-f]+: e3 30 c0 .8 00 04 lg %r3,.*\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against global var defined in exec with small got access
# (no optimization)
- +[0-9a-f]+: e3 30 c0 38 00 04 lg %r3,56\(%r12\)
+ +[0-9a-f]+: e3 30 c0 .8 00 04 lg %r3,..\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against local var with small got access (no optimization)
- +[0-9a-f]+: e3 30 c0 20 00 04 lg %r3,32\(%r12\)
+ +[0-9a-f]+: e3 30 c0 .0 00 04 lg %r3,.*\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against hidden var with small got access (no optimization)
- +[0-9a-f]+: e3 30 c0 40 00 04 lg %r3,64\(%r12\)
+ +[0-9a-f]+: e3 30 c0 .0 00 04 lg %r3,..\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# function epilog
+[0-9a-f]+: eb 6e f0 d0 00 04 lmg %r6,%r14,208\(%r15\)
@@ -177,7 +177,7 @@ Disassembly of section .text:
+[0-9a-f]+: a7 d5 00 16 bras %r13,[0-9a-f]+ <_start\+0x30>
# sG6@indntpoff
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 01 00 18 18 .long 0x01001818
+ +[0-9a-f]+: 01 00 1. .8 .long 0x01001..8
# bg6@indntpoff
+[0-9a-f]+: ff ff ff ff .long 0xffffffff
+[0-9a-f]+: ff ff ff d4 .long 0xffffffd4
diff --git a/ld/testsuite/ld-s390/tlsbin_64.rd b/ld/testsuite/ld-s390/tlsbin_64.rd
index fe7811a..9790fa7 100644
--- a/ld/testsuite/ld-s390/tlsbin_64.rd
+++ b/ld/testsuite/ld-s390/tlsbin_64.rd
@@ -22,6 +22,7 @@ Section Headers:
+\[[ 0-9]+\] .tbss +NOBITS .* 0+40 00 WAT +0 +0 +1
+\[[ 0-9]+\] .dynamic +DYNAMIC .*
+\[[ 0-9]+\] .got +PROGBITS .*
+#...
+\[[ 0-9]+\] .symtab .*
+\[[ 0-9]+\] .strtab .*
+\[[ 0-9]+\] .shstrtab .*
@@ -86,6 +87,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* SECTION +LOCAL +DEFAULT +10
.* SECTION +LOCAL +DEFAULT +11
.* SECTION +LOCAL +DEFAULT +12
+#...
.* FILE +LOCAL +DEFAULT +ABS .*
.* TLS +LOCAL +DEFAULT +9 sl1
.* TLS +LOCAL +DEFAULT +9 sl2
@@ -106,7 +108,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* TLS +LOCAL +DEFAULT +10 bl8
.* FILE +LOCAL +DEFAULT +ABS .*
.* OBJECT +LOCAL +DEFAULT +11 _DYNAMIC
-.* OBJECT +LOCAL +DEFAULT +12 _GLOBAL_OFFSET_TABLE_
+.* OBJECT +LOCAL +DEFAULT +1. _GLOBAL_OFFSET_TABLE_
.* TLS +GLOBAL +DEFAULT +UND sG3
.* TLS +GLOBAL +DEFAULT +9 sg8
.* TLS +GLOBAL +DEFAULT +10 bg8
@@ -126,7 +128,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* TLS +GLOBAL +HIDDEN +9 sh4
.* TLS +GLOBAL +DEFAULT +10 bg7
.* TLS +GLOBAL +HIDDEN +9 sh5
-.* NOTYPE +GLOBAL +DEFAULT +12 __bss_start
+.* NOTYPE +GLOBAL +DEFAULT +1. __bss_start
.* TLS +GLOBAL +DEFAULT +UND sG6
.* FUNC +GLOBAL +DEFAULT +8 fn2
.* TLS +GLOBAL +DEFAULT +9 sg2
@@ -134,8 +136,8 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* TLS +GLOBAL +HIDDEN +9 sh1
.* TLS +GLOBAL +DEFAULT +9 sg6
.* TLS +GLOBAL +DEFAULT +9 sg7
-.* NOTYPE +GLOBAL +DEFAULT +12 _edata
-.* NOTYPE +GLOBAL +DEFAULT +12 _end
+.* NOTYPE +GLOBAL +DEFAULT +1. _edata
+.* NOTYPE +GLOBAL +DEFAULT +1. _end
.* TLS +GLOBAL +HIDDEN +9 sh2
.* TLS +GLOBAL +HIDDEN +9 sh6
.* TLS +GLOBAL +DEFAULT +10 bg2
diff --git a/ld/testsuite/ld-s390/tlsbin_64.sd b/ld/testsuite/ld-s390/tlsbin_64.sd
index 6618e45..7212114 100644
--- a/ld/testsuite/ld-s390/tlsbin_64.sd
+++ b/ld/testsuite/ld-s390/tlsbin_64.sd
@@ -8,11 +8,10 @@
.*: file format elf64-s390
Contents of section .got:
- [0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00000000 00000000 .*
- [0-9a-f]+ 00000000 00000000 [0-9a-f]+ [0-9a-f]+ .*
- [0-9a-f]+ ffffffff ffffff88 00000000 00000000 .*
- [0-9a-f]+ 00000000 00000000 ffffffff ffffff68 .*
- [0-9a-f]+ ffffffff ffffffa8 00000000 00000000 .*
- [0-9a-f]+ 00000000 00000000 00000000 00000000 .*
- [0-9a-f]+ 00000000 00000000 00000000 00000000 .*
- [0-9a-f]+ 00000000 00000000 .*
+ [0-9a-f]+ ........ ........ 00000000 00000000 .*
+ [0-9a-f]+ 00000000 00000000 ........ ........ .*
+ [0-9a-f]+ ffffffff ffffff.8 00000000 00000000 .*
+ [0-9a-f]+ 00000000 00000000 ........ ........ .*
+ [0-9a-f]+ ........ ........ ........ ........ .*
+ [0-9a-f]+ 00000000 00000000 .*
+#...
diff --git a/ld/testsuite/ld-s390/tlspic.dd b/ld/testsuite/ld-s390/tlspic.dd
index d5caeaf..427e2f6 100644
--- a/ld/testsuite/ld-s390/tlspic.dd
+++ b/ld/testsuite/ld-s390/tlspic.dd
@@ -18,47 +18,47 @@ Disassembly of section .text:
# __tls_get_addr@plt-.LT1
+[0-9a-f]+: [0-9a-f ]+ .long 0x[0-9a-f]+
# sg1@tlsgd
- +[0-9a-f]+: 00 00 00 38 .long 0x00000038
+ +[0-9a-f]+: 00 00 00 28 .long 0x00000028
# sg2@tlsgd
- +[0-9a-f]+: 00 00 00 48 .long 0x00000048
+ +[0-9a-f]+: 00 00 00 38 .long 0x00000038
# sl1@tlsgd
- +[0-9a-f]+: 00 00 00 10 .long 0x00000010
+ +[0-9a-f]+: 00 00 00 00 .long 0x00000000
# sl2@tlsgd
- +[0-9a-f]+: 00 00 00 18 .long 0x00000018
+ +[0-9a-f]+: 00 00 00 08 .long 0x00000008
# sh1@tlsgd
- +[0-9a-f]+: 00 00 00 4c .long 0x0000004c
+ +[0-9a-f]+: 00 00 00 3c .long 0x0000003c
# sh2@tlsgd
- +[0-9a-f]+: 00 00 00 54 .long 0x00000054
+ +[0-9a-f]+: 00 00 00 44 .long 0x00000044
# sH1@tlsgd
- +[0-9a-f]+: 00 00 00 28 .long 0x00000028
+ +[0-9a-f]+: 00 00 00 18 .long 0x00000018
# sH2@tlsgd
- +[0-9a-f]+: 00 00 00 30 .long 0x00000030
-# sl1@tlsldm
+[0-9a-f]+: 00 00 00 20 .long 0x00000020
+# sl1@tlsldm
+ +[0-9a-f]+: 00 00 00 10 .long 0x00000010
# sl1@dtpoff
+[0-9a-f]+: 00 00 00 20 .long 0x00000020
# sl2@dtpoff
+[0-9a-f]+: 00 00 00 24 .long 0x00000024
# sh1@tlsldm
- +[0-9a-f]+: 00 00 00 20 .long 0x00000020
+ +[0-9a-f]+: 00 00 00 10 .long 0x00000010
# sh1@dtpoff
+[0-9a-f]+: 00 00 00 40 .long 0x00000040
# sh2@dtpoff
+[0-9a-f]+: 00 00 00 44 .long 0x00000044
# sH1@tlsldm
- +[0-9a-f]+: 00 00 00 20 .long 0x00000020
+ +[0-9a-f]+: 00 00 00 10 .long 0x00000010
# sH1@dtpoff
+[0-9a-f]+: 00 00 00 60 .long 0x00000060
# sH2@dtpoff
+[0-9a-f]+: 00 00 00 64 .long 0x00000064
# sg2@gotntpoff
- +[0-9a-f]+: 00 00 00 48 .long 0x00000048
+ +[0-9a-f]+: 00 00 00 38 .long 0x00000038
# sl2@gotntpoff
- +[0-9a-f]+: 00 00 00 18 .long 0x00000018
+ +[0-9a-f]+: 00 00 00 08 .long 0x00000008
# sh2@gotntpoff
- +[0-9a-f]+: 00 00 00 54 .long 0x00000054
+ +[0-9a-f]+: 00 00 00 44 .long 0x00000044
# sH2@gotntpoff
- +[0-9a-f]+: 00 00 00 30 .long 0x00000030
+ +[0-9a-f]+: 00 00 00 20 .long 0x00000020
# function prolog
+[0-9a-f]+: 18 ef lr %r14,%r15
+[0-9a-f]+: 58 c0 d0 00 l %r12,0\(%r13\)
@@ -143,18 +143,18 @@ Disassembly of section .text:
+[0-9a-f]+: 58 43 c0 00 l %r4,0\(%r3,%r12\)
+[0-9a-f]+: 41 54 30 00 la %r5,0\(%r4,%r3\)
# IE against global var with small got access (no optimization)
- +[0-9a-f]+: 58 30 c0 34 l %r3,52\(%r12\)
+ +[0-9a-f]+: 58 30 c0 24 l %r3,36\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against local var with small got access (no optimization)
- +[0-9a-f]+: 58 30 c0 1c l %r3,28\(%r12\)
+ +[0-9a-f]+: 58 30 c0 0c l %r3,12\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against hidden and local var with small got access
# (no optimization)
- +[0-9a-f]+: 58 30 c0 40 l %r3,64\(%r12\)
+ +[0-9a-f]+: 58 30 c0 30 l %r3,48\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against hidden but not local var with small got access
# (no optimization)
- +[0-9a-f]+: 58 30 c0 44 l %r3,68\(%r12\)
+ +[0-9a-f]+: 58 30 c0 34 l %r3,52\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# function prolog
+[0-9a-f]+: 98 6e f0 78 lm %r6,%r14,120\(%r15\)
diff --git a/ld/testsuite/ld-s390/tlspic.rd b/ld/testsuite/ld-s390/tlspic.rd
index 20cb4bf..3d28203 100644
--- a/ld/testsuite/ld-s390/tlspic.rd
+++ b/ld/testsuite/ld-s390/tlspic.rd
@@ -21,6 +21,7 @@ Section Headers:
+\[[ 0-9]+\] .tbss +NOBITS .* 0+20 00 WAT +0 +0 +1
+\[[ 0-9]+\] .dynamic +DYNAMIC .*
+\[[ 0-9]+\] .got +PROGBITS .*
+ +\[[ 0-9]+\] .got.plt +PROGBITS .*
+\[[ 0-9]+\] .symtab .*
+\[[ 0-9]+\] .strtab .*
+\[[ 0-9]+\] .shstrtab .*
@@ -41,7 +42,7 @@ Program Headers:
Section to Segment mapping:
+Segment Sections...
+00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text
- +01 +.tdata .dynamic .got
+ +01 +.tdata .dynamic .got .got.plt
+02 +.dynamic
+03 +.tdata .tbss
@@ -96,6 +97,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* SECTION +LOCAL +DEFAULT +9
.* SECTION +LOCAL +DEFAULT +10
.* SECTION +LOCAL +DEFAULT +11
+.* SECTION +LOCAL +DEFAULT +12
.* FILE +LOCAL +DEFAULT +ABS .*
.* TLS +LOCAL +DEFAULT +8 sl1
.* TLS +LOCAL +DEFAULT +8 sl2
diff --git a/ld/testsuite/ld-s390/tlspic.sd b/ld/testsuite/ld-s390/tlspic.sd
index 6e32dea..9230f74 100644
--- a/ld/testsuite/ld-s390/tlspic.sd
+++ b/ld/testsuite/ld-s390/tlspic.sd
@@ -8,7 +8,6 @@
.*: +file format elf32-s390
Contents of section .got:
- [0-9a-f]+ [0-9a-f]+ 00000000 00000000 [0-9a-f]+ .*
[0-9a-f]+ 00000000 00000020 00000000 00000000 .*
[0-9a-f]+ 00000000 00000000 00000000 00000060 .*
[0-9a-f]+ 00000000 00000000 00000000 00000000 .*
diff --git a/ld/testsuite/ld-s390/tlspic_64.dd b/ld/testsuite/ld-s390/tlspic_64.dd
index 86fdbbd..21c6d38 100644
--- a/ld/testsuite/ld-s390/tlspic_64.dd
+++ b/ld/testsuite/ld-s390/tlspic_64.dd
@@ -15,40 +15,40 @@ Disassembly of section .text:
+[0-9a-f]+: a7 d5 00 56 bras %r13,[0-9a-f]+ <fn1\+0xb2>
# sg1@tlsgd
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 70 .long 0x00000070
+ +[0-9a-f]+: 00 00 00 .0 .long 0x000000.0
# sg2@tlsgd
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 90 .long 0x00000090
+ +[0-9a-f]+: 00 00 00 .0 .long 0x000000.0
# sl1@tlsgd
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 20 .long 0x00000020
+ +[0-9a-f]+: 00 00 00 .0 .long 0x000000.0
# sl2@tlsgd
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 30 .long 0x00000030
+ +[0-9a-f]+: 00 00 00 .0 .long 0x000000.0
# sh1@tlsgd
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 98 .long 0x00000098
+ +[0-9a-f]+: 00 00 00 .8 .long 0x000000.8
# sh2@tlsgd
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 a8 .long 0x000000a8
+ +[0-9a-f]+: 00 00 00 .8 .long 0x000000.8
# sH1@tlsgd
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 50 .long 0x00000050
+ +[0-9a-f]+: 00 00 00 .0 .long 0x000000.0
# sH2@tlsgd
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 60 .long 0x00000060
+ +[0-9a-f]+: 00 00 00 .0 .long 0x000000.0
# sl1@tlsldm
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 40 .long 0x00000040
+ +[0-9a-f]+: 00 00 00 .0 .long 0x000000.0
# sl1@dtpoff
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 20 .long 0x00000020
+ +[0-9a-f]+: 00 00 00 .0 .long 0x000000.0
# sl2@dtpoff
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
+[0-9a-f]+: 00 00 00 24 .long 0x00000024
# sh1@tlsldm
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 40 .long 0x00000040
+ +[0-9a-f]+: 00 00 00 .0 .long 0x000000.0
# sh1@dtpoff
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
+[0-9a-f]+: 00 00 00 40 .long 0x00000040
@@ -57,7 +57,7 @@ Disassembly of section .text:
+[0-9a-f]+: 00 00 00 44 .long 0x00000044
# sH1@tlsldm
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 40 .long 0x00000040
+ +[0-9a-f]+: 00 00 00 .0 .long 0x000000.0
# sH1@dtpoff
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
+[0-9a-f]+: 00 00 00 60 .long 0x00000060
@@ -66,19 +66,19 @@ Disassembly of section .text:
+[0-9a-f]+: 00 00 00 64 .long 0x00000064
# sg2@gotntpoff
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 90 .long 0x00000090
+ +[0-9a-f]+: 00 00 00 .0 .long 0x000000.0
# sl2@gotntpoff
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 30 .long 0x00000030
+ +[0-9a-f]+: 00 00 00 .0 .long 0x000000.0
# sh2@gotntpoff
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 a8 .long 0x000000a8
+ +[0-9a-f]+: 00 00 00 .8 .long 0x000000.8
# sH2@gotntpoff
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
- +[0-9a-f]+: 00 00 00 60 .long 0x00000060
+ +[0-9a-f]+: 00 00 00 .0 .long 0x000000.0
# function prolog
+[0-9a-f]+: b9 04 00 ef lgr %r14,%r15
- +[0-9a-f]+: c0 c0 [0-9a-f ]+ larl %r12,[0-9a-f]+ <_GLOBAL_OFFSET_TABLE_>
+ +[0-9a-f]+: c0 c0 [0-9a-f ]+ larl %r12,[0-9a-f]+ <.*>
+[0-9a-f]+: a7 fb ff 60 aghi %r15,-160
+[0-9a-f]+: e3 e0 e0 00 00 24 stg %r14,0\(%r14\)
# extract TCB
@@ -164,30 +164,30 @@ Disassembly of section .text:
+[0-9a-f]+: e3 33 c0 00 00 04 lg %r3,0\(%r3,%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against local var with larl got access
- +[0-9a-f]+: c0 30 [0-9a-f ]+ larl %r3,[0-9a-f]+ <\_GLOBAL\_OFFSET\_TABLE\_\+0x38>
+ +[0-9a-f]+: c0 30 [0-9a-f ]+ larl %r3,[0-9a-f]+ <.*>
+[0-9a-f]+: e3 43 c0 00 00 04 lg %r4,0\(%r3,%r12\)
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# IE against hidden and local var with larl got access
- +[0-9a-f]+: c0 30 [0-9a-f ]+ larl %r3,[0-9a-f]+ <\_GLOBAL\_OFFSET\_TABLE\_\+0x80>
+ +[0-9a-f]+: c0 30 [0-9a-f ]+ larl %r3,[0-9a-f]+ <.*>
+[0-9a-f]+: e3 43 c0 00 00 04 lg %r4,0\(%r3,%r12\)
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# IE against hidden but not local var with larl got access
- +[0-9a-f]+: c0 30 [0-9a-f ]+ larl %r3,[0-9a-f]+ <\_GLOBAL\_OFFSET\_TABLE\_\+0x88>
+ +[0-9a-f]+: c0 30 [0-9a-f ]+ larl %r3,[0-9a-f]+ <.*>
+[0-9a-f]+: e3 43 c0 00 00 04 lg %r4,0\(%r3,%r12\)
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# IE against global var with small got access (no optimization)
- +[0-9a-f]+: e3 30 c0 68 00 04 lg %r3,104\(%r12\)
+ +[0-9a-f]+: e3 30 c0 .8 00 04 lg %r3,.*\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against local var with small got access (no optimization)
- +[0-9a-f]+: e3 30 c0 38 00 04 lg %r3,56\(%r12\)
+ +[0-9a-f]+: e3 30 c0 .8 00 04 lg %r3,..\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against hidden and local var with small got access
# (no optimization)
- +[0-9a-f]+: e3 30 c0 80 00 04 lg %r3,128\(%r12\)
+ +[0-9a-f]+: e3 30 c0 .0 00 04 lg %r3,.*\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against hidden but not local var with small got access
# (no optimization)
- +[0-9a-f]+: e3 30 c0 88 00 04 lg %r3,136\(%r12\)
+ +[0-9a-f]+: e3 30 c0 .8 00 04 lg %r3,1..\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# function epilog
+[0-9a-f]+: eb 6e f0 d0 00 04 lmg %r6,%r14,208\(%r15\)
diff --git a/ld/testsuite/ld-s390/tlspic_64.rd b/ld/testsuite/ld-s390/tlspic_64.rd
index 646c611..e44bbdb 100644
--- a/ld/testsuite/ld-s390/tlspic_64.rd
+++ b/ld/testsuite/ld-s390/tlspic_64.rd
@@ -21,6 +21,7 @@ Section Headers:
+\[[ 0-9]+\] .tbss +NOBITS .* 0+20 00 WAT +0 +0 +1
+\[[ 0-9]+\] .dynamic +DYNAMIC .*
+\[[ 0-9]+\] .got +PROGBITS .*
+#...
+\[[ 0-9]+\] .symtab .*
+\[[ 0-9]+\] .strtab .*
+\[[ 0-9]+\] .shstrtab .*
@@ -96,6 +97,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* SECTION +LOCAL +DEFAULT +9
.* SECTION +LOCAL +DEFAULT +10
.* SECTION +LOCAL +DEFAULT +11
+#...
.* FILE +LOCAL +DEFAULT +ABS .*
.* TLS +LOCAL +DEFAULT +8 sl1
.* TLS +LOCAL +DEFAULT +8 sl2
diff --git a/ld/testsuite/ld-s390/tlspic_64.sd b/ld/testsuite/ld-s390/tlspic_64.sd
index 267416e..c402710 100644
--- a/ld/testsuite/ld-s390/tlspic_64.sd
+++ b/ld/testsuite/ld-s390/tlspic_64.sd
@@ -8,14 +8,13 @@
.*: +file format elf64-s390
Contents of section .got:
- [0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00000000 00000000 .*
- [0-9a-f]+ 00000000 00000000 [0-9a-f]+ [0-9a-f]+ .*
- [0-9a-f]+ 00000000 00000000 00000000 00000020 .*
- [0-9a-f]+ 00000000 00000000 00000000 00000000 .*
- [0-9a-f]+ 00000000 00000000 00000000 00000000 .*
- [0-9a-f]+ 00000000 00000000 00000000 00000060 .*
- [0-9a-f]+ 00000000 00000000 00000000 00000000 .*
- [0-9a-f]+ 00000000 00000000 00000000 00000000 .*
- [0-9a-f]+ 00000000 00000000 00000000 00000000 .*
- [0-9a-f]+ 00000000 00000000 00000000 00000000 .*
- [0-9a-f]+ 00000000 00000040 00000000 00000000 .*
+ [0-9a-f]+ 00000000 0000.... 00000000 000000.0 .*
+ [0-9a-f]+ 00000000 00000000 00000000 00000... .*
+ [0-9a-f]+ 00000000 00000000 00000000 00000... .*
+ [0-9a-f]+ 00000000 00000000 00000000 000000.0 .*
+ [0-9a-f]+ 00000000 00000000 00000000 000000.. .*
+ [0-9a-f]+ 00000000 00000000 00000000 00000... .*
+ [0-9a-f]+ 00000000 00000000 00000000 000000.. .*
+ [0-9a-f]+ 00000000 00000000 00000000 00000... .*
+ [0-9a-f]+ 00000000 000000.0 00000000 00000... .*
+#... \ No newline at end of file