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.
This commit is contained in:
Maamoun Tarsha 2019-01-14 16:00:14 +00:00 committed by Nick Clifton
parent d63f2be21b
commit 5a12586d44
19 changed files with 136 additions and 104 deletions

View File

@ -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.

View File

@ -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. */

View File

@ -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

View File

@ -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

View File

@ -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=

View File

@ -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>

View File

@ -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
}

View File

@ -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

View File

@ -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

View File

@ -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 ............

View File

@ -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

View File

@ -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

View File

@ -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 .*
#...

View File

@ -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
# sg2@tlsgd
+[0-9a-f]+: 00 00 00 48 .long 0x00000048
# sl1@tlsgd
+[0-9a-f]+: 00 00 00 10 .long 0x00000010
# sl2@tlsgd
+[0-9a-f]+: 00 00 00 18 .long 0x00000018
# sh1@tlsgd
+[0-9a-f]+: 00 00 00 4c .long 0x0000004c
# sh2@tlsgd
+[0-9a-f]+: 00 00 00 54 .long 0x00000054
# sH1@tlsgd
+[0-9a-f]+: 00 00 00 28 .long 0x00000028
# sg2@tlsgd
+[0-9a-f]+: 00 00 00 38 .long 0x00000038
# sl1@tlsgd
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
# sl2@tlsgd
+[0-9a-f]+: 00 00 00 08 .long 0x00000008
# sh1@tlsgd
+[0-9a-f]+: 00 00 00 3c .long 0x0000003c
# sh2@tlsgd
+[0-9a-f]+: 00 00 00 44 .long 0x00000044
# sH1@tlsgd
+[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\)

View File

@ -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

View File

@ -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 .*

View File

@ -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\)

View File

@ -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

View File

@ -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... .*
#...