219 changes: 105 additions & 114 deletions ld/testsuite/ld-powerpc/tlsso.r
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,36 @@ There are 19 section headers.*
Section Headers:
+\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
+\[ 0\] +NULL +0+ 0+ 0+ 0+ +0 +0 +0
+\[ 1\] \.hash +HASH +0+120 0+120 0+c8 04 +A +2 +0 +8
+\[ 2\] \.dynsym +DYNSYM +0+1e8 0+1e8 0+2e8 18 +A +3 +16 +8
+\[ 3\] \.dynstr +STRTAB +0+4d0 0+4d0 0+53 0+ +A +0 +0 +1
+\[ 4\] \.rela\.dyn +RELA +0+528 0+528 0+180 18 +A +2 +0 +8
+\[ 5\] \.rela\.plt +RELA +0+6a8 0+6a8 0+18 18 +A +2 +14 +8
+\[ 6\] \.text +PROGBITS +0+6c0 0+6c0 0+fc 0+ +AX +0 +0 +4
+\[ 7\] \.data +PROGBITS +0+107c0 0+7c0 0+ 0+ +WA +0 +0 +1
+\[ 8\] \.branch_lt +PROGBITS +0+107c0 0+7c0 0+ 0+ +WA +0 +0 +8
+\[ 9\] \.tdata +PROGBITS +0+107c0 0+7c0 0+38 0+ WAT +0 +0 +8
+\[10\] \.tbss +NOBITS +0+107f8 0+7f8 0+38 0+ WAT +0 +0 +8
+\[11\] \.dynamic +DYNAMIC +0+107f8 0+7f8 0+150 10 +WA +3 +0 +8
+\[12\] \.got +PROGBITS +0+10948 0+948 0+60 08 +WA +0 +0 +8
+\[13\] \.sbss +NOBITS +0+109a8 0+9a8 0+ 0+ +W +0 +0 +1
+\[14\] \.plt +NOBITS +0+109a8 0+9a8 0+30 18 +WA +0 +0 +8
+\[15\] \.bss +NOBITS +0+109d8 0+9a8 0+ 0+ +WA +0 +0 +1
+\[16\] \.shstrtab +STRTAB +0+ 0+9a8 0+82 0+ +0 +0 +1
+\[17\] \.symtab +SYMTAB +0+ 0+ef0 0+3f0 18 +18 +27 +8
+\[18\] \.strtab +STRTAB +0+ 0+12e0 0+86 0+ +0 +0 +1
+\[ 1\] \.hash +.*
+\[ 2\] \.dynsym +.*
+\[ 3\] \.dynstr +.*
+\[ 4\] \.rela\.dyn +.*
+\[ 5\] \.rela\.plt +.*
+\[ 6\] \.text +PROGBITS +0+5c8 0+5c8 0+fc 0+ +AX +0 +0 +4
+\[ 7\] \.tdata +PROGBITS +0+106c8 0+6c8 0+38 0+ WAT +0 +0 +8
+\[ 8\] \.tbss +NOBITS +0+10700 0+700 0+38 0+ WAT +0 +0 +8
+\[ 9\] \.dynamic +DYNAMIC +0+10700 0+700 0+150 10 +WA +3 +0 +8
+\[10\] \.data +PROGBITS +0+10850 0+850 0+ 0+ +WA +0 +0 +1
+\[11\] \.branch_lt +.*
+\[12\] \.got +PROGBITS +0+10850 0+850 0+60 08 +WA +0 +0 +8
+\[13\] \.sbss +.*
+\[14\] \.plt +.*
+\[15\] \.bss +.*
+\[16\] \.shstrtab +.*
+\[17\] \.symtab +.*
+\[18\] \.strtab +.*
#...

Elf file type is DYN \(Shared object file\)
Entry point 0x6dc
Entry point 0x[0-9a-f]+
There are 4 program headers.*

Program Headers:
+Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+LOAD +0x0+ 0x0+ 0x0+ 0x0+7bc 0x0+7bc R E 0x10000
+LOAD +0x0+7c0 0x0+107c0 0x0+107c0 0x0+1e8 0x0+218 RW +0x10000
+DYNAMIC +0x0+7f8 0x0+107f8 0x0+107f8 0x0+150 0x0+150 RW +0x8
+TLS +0x0+7c0 0x0+107c0 0x0+107c0 0x0+38 0x0+70 R +0x8
+LOAD +0x0+ 0x0+ 0x0+ 0x0+6c4 0x0+6c4 R E 0x10000
+LOAD +0x0+6c8 0x0+106c8 0x0+106c8 0x0+1e8 0x0+218 RW +0x10000
+DYNAMIC +0x0+700 0x0+10700 0x0+10700 0x0+150 0x0+150 RW +0x8
+TLS +0x0+6c8 0x0+106c8 0x0+106c8 0x0+38 0x0+70 R +0x8

Section to Segment mapping:
+Segment Sections\.\.\.
Expand All @@ -49,102 +49,93 @@ Program Headers:

Relocation section '\.rela\.dyn' at offset .* contains 16 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
0+72a +0+1200000045 R_PPC64_TPREL16 +0+60 le0 \+ 0
0+72e +0+1500000048 R_PPC64_TPREL16_HA +0+68 le1 \+ 0
0+732 +0+1500000046 R_PPC64_TPREL16_LO +0+68 le1 \+ 0
0+76a +0+90000005f R_PPC64_TPREL16_DS +0+107c0 \.tdata \+ 28
0+76e +0+900000048 R_PPC64_TPREL16_HA +0+107c0 \.tdata \+ 30
0+772 +0+900000046 R_PPC64_TPREL16_LO +0+107c0 \.tdata \+ 30
0+10950 +0+44 R_PPC64_DTPMOD64 +0+
0+10960 +0+44 R_PPC64_DTPMOD64 +0+
0+10968 +0+4e R_PPC64_DTPREL64 +0+
0+10970 +0+4e R_PPC64_DTPREL64 +0+18
0+10978 +0+1100000044 R_PPC64_DTPMOD64 +0+ gd \+ 0
0+10980 +0+110000004e R_PPC64_DTPREL64 +0+ gd \+ 0
0+10988 +0+180000004e R_PPC64_DTPREL64 +0+50 ld2 \+ 0
0+10990 +0+1d00000044 R_PPC64_DTPMOD64 +0+38 gd0 \+ 0
0+10998 +0+1d0000004e R_PPC64_DTPREL64 +0+38 gd0 \+ 0
0+109a0 +0+1e00000049 R_PPC64_TPREL64 +0+58 ie0 \+ 0
0+632 +0+90+45 R_PPC64_TPREL16 +0+60 le0 \+ 0
0+636 +0+c0+48 R_PPC64_TPREL16_HA +0+68 le1 \+ 0
0+63a +0+c0+46 R_PPC64_TPREL16_LO +0+68 le1 \+ 0
0+672 +0+20+5f R_PPC64_TPREL16_DS +0+106c8 \.tdata \+ 28
0+676 +0+20+48 R_PPC64_TPREL16_HA +0+106c8 \.tdata \+ 30
0+67a +0+20+46 R_PPC64_TPREL16_LO +0+106c8 \.tdata \+ 30
0+10858 +0+44 R_PPC64_DTPMOD64 +0+
0+10868 +0+44 R_PPC64_DTPMOD64 +0+
0+10870 +0+4e R_PPC64_DTPREL64 +0+
0+10878 +0+4e R_PPC64_DTPREL64 +0+18
0+10880 +0+80+44 R_PPC64_DTPMOD64 +0+ gd \+ 0
0+10888 +0+80+4e R_PPC64_DTPREL64 +0+ gd \+ 0
0+10890 +0+f0+4e R_PPC64_DTPREL64 +0+50 ld2 \+ 0
0+10898 +0+140+44 R_PPC64_DTPMOD64 +0+38 gd0 \+ 0
0+108a0 +0+140+4e R_PPC64_DTPREL64 +0+38 gd0 \+ 0
0+108a8 +0+150+49 R_PPC64_TPREL64 +0+58 ie0 \+ 0

Relocation section '\.rela\.plt' at offset .* contains 1 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
0+109c0 +0+1300000015 R_PPC64_JMP_SLOT +0+ __tls_get_addr \+ 0
0+108c8 +0+a0+15 R_PPC64_JMP_SLOT +0+ __tls_get_addr \+ 0

Symbol table '\.dynsym' contains 31 entries:
Symbol table '\.dynsym' contains 22 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+1: 0+120 +0 SECTION LOCAL +DEFAULT +1
+2: 0+1e8 +0 SECTION LOCAL +DEFAULT +2
+3: 0+4d0 +0 SECTION LOCAL +DEFAULT +3
+4: 0+528 +0 SECTION LOCAL +DEFAULT +4
+5: 0+6a8 +0 SECTION LOCAL +DEFAULT +5
+6: 0+6c0 +0 SECTION LOCAL +DEFAULT +6
+7: 0+107c0 +0 SECTION LOCAL +DEFAULT +7
+8: 0+107c0 +0 SECTION LOCAL +DEFAULT +8
+9: 0+107c0 +0 SECTION LOCAL +DEFAULT +9
+10: 0+107f8 +0 SECTION LOCAL +DEFAULT +10
+11: 0+107f8 +0 SECTION LOCAL +DEFAULT +11
+12: 0+10948 +0 SECTION LOCAL +DEFAULT +12
+13: 0+109a8 +0 SECTION LOCAL +DEFAULT +13
+14: 0+109a8 +0 SECTION LOCAL +DEFAULT +14
+15: 0+109d8 +0 SECTION LOCAL +DEFAULT +15
+16: 0+107f8 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+17: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+18: 0+60 +0 TLS +GLOBAL DEFAULT +10 le0
+19: 0+ +24 OBJECT +GLOBAL DEFAULT +UND __tls_get_addr
+20: 0+40 +0 TLS +GLOBAL DEFAULT +10 ld0
+21: 0+68 +0 TLS +GLOBAL DEFAULT +10 le1
+22: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+23: 0+6dc +0 NOTYPE +GLOBAL DEFAULT +6 _start
+24: 0+50 +0 TLS +GLOBAL DEFAULT +10 ld2
+25: 0+48 +0 TLS +GLOBAL DEFAULT +10 ld1
+26: 0+109a8 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+27: 0+109a8 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+28: 0+109d8 +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+29: 0+38 +0 TLS +GLOBAL DEFAULT +10 gd0
+30: 0+58 +0 TLS +GLOBAL DEFAULT +10 ie0
+[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+[0-9]+: 0+5c8 +0 SECTION LOCAL +DEFAULT +6
+[0-9]+: 0+106c8 +0 SECTION LOCAL +DEFAULT +7
+[0-9]+: 0+10700 +0 SECTION LOCAL +DEFAULT +8
+[0-9]+: 0+10850 +0 SECTION LOCAL +DEFAULT +10
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +11
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15
+[0-9]+: 0+10700 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+[0-9]+: 0+60 +0 TLS +GLOBAL DEFAULT +8 le0
+[0-9]+: 0+ +24 OBJECT +GLOBAL DEFAULT +UND __tls_get_addr
+[0-9]+: 0+40 +0 TLS +GLOBAL DEFAULT +8 ld0
+[0-9]+: 0+68 +0 TLS +GLOBAL DEFAULT +8 le1
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +6 _start
+[0-9]+: 0+50 +0 TLS +GLOBAL DEFAULT +8 ld2
+[0-9]+: 0+48 +0 TLS +GLOBAL DEFAULT +8 ld1
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+[0-9]+: 0+38 +0 TLS +GLOBAL DEFAULT +8 gd0
+[0-9]+: 0+58 +0 TLS +GLOBAL DEFAULT +8 ie0

Symbol table '\.symtab' contains 42 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+1: 0+120 +0 SECTION LOCAL +DEFAULT +1
+2: 0+1e8 +0 SECTION LOCAL +DEFAULT +2
+3: 0+4d0 +0 SECTION LOCAL +DEFAULT +3
+4: 0+528 +0 SECTION LOCAL +DEFAULT +4
+5: 0+6a8 +0 SECTION LOCAL +DEFAULT +5
+6: 0+6c0 +0 SECTION LOCAL +DEFAULT +6
+7: 0+107c0 +0 SECTION LOCAL +DEFAULT +7
+8: 0+107c0 +0 SECTION LOCAL +DEFAULT +8
+9: 0+107c0 +0 SECTION LOCAL +DEFAULT +9
+10: 0+107f8 +0 SECTION LOCAL +DEFAULT +10
+11: 0+107f8 +0 SECTION LOCAL +DEFAULT +11
+12: 0+10948 +0 SECTION LOCAL +DEFAULT +12
+13: 0+109a8 +0 SECTION LOCAL +DEFAULT +13
+14: 0+109a8 +0 SECTION LOCAL +DEFAULT +14
+15: 0+109d8 +0 SECTION LOCAL +DEFAULT +15
+16: 0+ +0 SECTION LOCAL +DEFAULT +16
+17: 0+ +0 SECTION LOCAL +DEFAULT +17
+18: 0+ +0 SECTION LOCAL +DEFAULT +18
+19: 0+ +0 TLS +LOCAL +DEFAULT +9 gd4
+20: 0+8 +0 TLS +LOCAL +DEFAULT +9 ld4
+21: 0+10 +0 TLS +LOCAL +DEFAULT +9 ld5
+22: 0+18 +0 TLS +LOCAL +DEFAULT +9 ld6
+23: 0+20 +0 TLS +LOCAL +DEFAULT +9 ie4
+24: 0+28 +0 TLS +LOCAL +DEFAULT +9 le4
+25: 0+30 +0 TLS +LOCAL +DEFAULT +9 le5
+26: 0+6c0 +0 NOTYPE +LOCAL +DEFAULT +6 \.__tls_get_addr
+27: 0+107f8 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+28: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+29: 0+60 +0 TLS +GLOBAL DEFAULT +10 le0
+30: 0+ +24 OBJECT +GLOBAL DEFAULT +UND __tls_get_addr
+31: 0+40 +0 TLS +GLOBAL DEFAULT +10 ld0
+32: 0+68 +0 TLS +GLOBAL DEFAULT +10 le1
+33: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+34: 0+6dc +0 NOTYPE +GLOBAL DEFAULT +6 _start
+35: 0+50 +0 TLS +GLOBAL DEFAULT +10 ld2
+36: 0+48 +0 TLS +GLOBAL DEFAULT +10 ld1
+37: 0+109a8 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+38: 0+109a8 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+39: 0+109d8 +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+40: 0+38 +0 TLS +GLOBAL DEFAULT +10 gd0
+41: 0+58 +0 TLS +GLOBAL DEFAULT +10 ie0
+[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +1
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +2
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +3
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +4
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +5
+[0-9]+: 0+5c8 +0 SECTION LOCAL +DEFAULT +6
+[0-9]+: 0+106c8 +0 SECTION LOCAL +DEFAULT +7
+[0-9]+: 0+10700 +0 SECTION LOCAL +DEFAULT +8
+[0-9]+: 0+10700 +0 SECTION LOCAL +DEFAULT +9
+[0-9]+: 0+10850 +0 SECTION LOCAL +DEFAULT +10
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +11
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +12
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +13
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +14
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15
+[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +16
+[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +17
+[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +18
+[0-9]+: 0+ +0 TLS +LOCAL +DEFAULT +7 gd4
+[0-9]+: 0+8 +0 TLS +LOCAL +DEFAULT +7 ld4
+[0-9]+: 0+10 +0 TLS +LOCAL +DEFAULT +7 ld5
+[0-9]+: 0+18 +0 TLS +LOCAL +DEFAULT +7 ld6
+[0-9]+: 0+20 +0 TLS +LOCAL +DEFAULT +7 ie4
+[0-9]+: 0+28 +0 TLS +LOCAL +DEFAULT +7 le4
+[0-9]+: 0+30 +0 TLS +LOCAL +DEFAULT +7 le5
+[0-9]+: [0-9a-f]+ +0 NOTYPE +LOCAL +DEFAULT +6 \.__tls_get_addr
+[0-9]+: 0+10700 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+[0-9]+: 0+60 +0 TLS +GLOBAL DEFAULT +8 le0
+[0-9]+: 0+ +24 OBJECT +GLOBAL DEFAULT +UND __tls_get_addr
+[0-9]+: 0+40 +0 TLS +GLOBAL DEFAULT +8 ld0
+[0-9]+: 0+68 +0 TLS +GLOBAL DEFAULT +8 le1
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +6 _start
+[0-9]+: 0+50 +0 TLS +GLOBAL DEFAULT +8 ld2
+[0-9]+: 0+48 +0 TLS +GLOBAL DEFAULT +8 ld1
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+[0-9]+: 0+38 +0 TLS +GLOBAL DEFAULT +8 gd0
+[0-9]+: 0+58 +0 TLS +GLOBAL DEFAULT +8 ie0
64 changes: 32 additions & 32 deletions ld/testsuite/ld-powerpc/tlsso32.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,38 @@

Disassembly of section \.text:

0+538 <_start>:
538: 38 7f 00 1c addi r3,r31,28
53c: 48 00 00 01 bl 53c .*
540: 38 7f 00 0c addi r3,r31,12
544: 48 00 00 01 bl 544 .*
548: 38 7f 00 24 addi r3,r31,36
54c: 48 01 01 95 bl 106e0 .*
550: 38 7f 00 0c addi r3,r31,12
554: 48 01 01 8d bl 106e0 .*
558: 39 23 80 20 addi r9,r3,-32736
55c: 3d 23 00 00 addis r9,r3,0
560: 81 49 80 24 lwz r10,-32732\(r9\)
564: 81 3f 00 2c lwz r9,44\(r31\)
568: 7d 49 12 2e lhzx r10,r9,r2
56c: 89 42 00 00 lbz r10,0\(r2\)
570: 3d 22 00 00 addis r9,r2,0
574: 99 49 00 00 stb r10,0\(r9\)
578: 38 7e 00 14 addi r3,r30,20
57c: 48 00 00 01 bl 57c .*
580: 38 7e 00 0c addi r3,r30,12
584: 48 00 00 01 bl 584 .*
588: 91 43 80 04 stw r10,-32764\(r3\)
58c: 3d 23 00 00 addis r9,r3,0
590: 91 49 80 08 stw r10,-32760\(r9\)
594: 81 3e 00 2c lwz r9,44\(r30\)
598: 7d 49 13 2e sthx r10,r9,r2
59c: a1 42 00 00 lhz r10,0\(r2\)
5a0: 3d 22 00 00 addis r9,r2,0
5a4: a9 49 00 00 lha r10,0\(r9\)
0+498 <_start>:
498: 38 7f 00 1c addi r3,r31,28
49c: 48 00 00 01 bl 49c .*
4a0: 38 7f 00 0c addi r3,r31,12
4a4: 48 00 00 01 bl 4a4 .*
4a8: 38 7f 00 24 addi r3,r31,36
4ac: 48 01 01 95 bl 10640 .*
4b0: 38 7f 00 0c addi r3,r31,12
4b4: 48 01 01 8d bl 10640 .*
4b8: 39 23 80 20 addi r9,r3,-32736
4bc: 3d 23 00 00 addis r9,r3,0
4c0: 81 49 80 24 lwz r10,-32732\(r9\)
4c4: 81 3f 00 2c lwz r9,44\(r31\)
4c8: 7d 49 12 2e lhzx r10,r9,r2
4cc: 89 42 00 00 lbz r10,0\(r2\)
4d0: 3d 22 00 00 addis r9,r2,0
4d4: 99 49 00 00 stb r10,0\(r9\)
4d8: 38 7e 00 14 addi r3,r30,20
4dc: 48 00 00 01 bl 4dc .*
4e0: 38 7e 00 0c addi r3,r30,12
4e4: 48 00 00 01 bl 4e4 .*
4e8: 91 43 80 04 stw r10,-32764\(r3\)
4ec: 3d 23 00 00 addis r9,r3,0
4f0: 91 49 80 08 stw r10,-32760\(r9\)
4f4: 81 3e 00 2c lwz r9,44\(r30\)
4f8: 7d 49 13 2e sthx r10,r9,r2
4fc: a1 42 00 00 lhz r10,0\(r2\)
500: 3d 22 00 00 addis r9,r2,0
504: a9 49 00 00 lha r10,0\(r9\)
Disassembly of section \.got:

00010664 <\.got>:
10664: 4e 80 00 21 blrl
10668: 00 01 05 c4 \.long 0x105c4
000105c4 <\.got>:
105c4: 4e 80 00 21 blrl
105c8: 00 01 05 24 \.long 0x10524
\.\.\.
8 changes: 4 additions & 4 deletions ld/testsuite/ld-powerpc/tlsso32.g
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.*: +file format elf32-powerpc

Contents of section \.got:
10664 4e800021 000105c4 00000000 00000000 .*
10674 00000000 00000000 00000000 00000000 .*
10684 00000000 00000000 00000000 00000000 .*
10694 00000000 .*
105c4 4e800021 00010524 00000000 00000000 .*
105d4 00000000 00000000 00000000 00000000 .*
105e4 00000000 00000000 00000000 00000000 .*
105f4 00000000 .*
248 changes: 120 additions & 128 deletions ld/testsuite/ld-powerpc/tlsso32.r
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,37 @@ There are 20 section headers.*
Section Headers:
+\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
+\[ 0\] +NULL +0+ 0+ 0+ 0+ +0 +0 +0
+\[ 1\] \.hash +HASH +0+b4 0+b4 0+dc 04 +A +2 +0 +4
+\[ 2\] \.dynsym +DYNSYM +0+190 0+190 0+240 10 +A +3 +17 +4
+\[ 3\] \.dynstr +STRTAB +0+3d0 0+3d0 0+81 0+ +A +0 +0 +1
+\[ 4\] \.rela\.dyn +RELA +0+454 0+454 0+d8 0c +A +2 +0 +4
+\[ 5\] \.rela\.plt +RELA +0+52c 0+52c 0+c 0c +A +2 +15 +4
+\[ 6\] \.text +PROGBITS +0+538 0+538 0+70 0+ +AX +0 +0 +1
+\[ 7\] \.data +PROGBITS +0+105a8 0+5a8 0+ 0+ +WA +0 +0 +1
+\[ 8\] \.tdata +PROGBITS +0+105a8 0+5a8 0+1c 0+ WAT +0 +0 +4
+\[ 9\] \.tbss +NOBITS +0+105c4 0+5c4 0+1c 0+ WAT +0 +0 +4
+\[10\] \.dynamic +DYNAMIC +0+105c4 0+5c4 0+a0 08 +WA +3 +0 +4
+\[11\] \.got +PROGBITS +0+10664 0+664 0+34 04 WAX +0 +0 +4
+\[12\] \.sdata2 +PROGBITS +0+10698 0+698 0+ 0+ +A +0 +0 +4
+\[13\] \.sdata +PROGBITS +0+10698 0+698 0+ 0+ +WA +0 +0 +4
+\[14\] \.sbss +NOBITS +0+10698 0+698 0+ 0+ +WA +0 +0 +1
+\[15\] \.plt +NOBITS +0+10698 0+698 0+54 0+ WAX +0 +0 +4
+\[16\] \.bss +NOBITS +0+106ec 0+698 0+ 0+ +WA +0 +0 +1
+\[17\] \.shstrtab +STRTAB +0+ 0+698 0+86 0+ +0 +0 +1
+\[18\] \.symtab +SYMTAB +0+ 0+a40 0+2e0 10 +19 +27 +4
+\[19\] \.strtab +STRTAB +0+ 0+d20 0+a9 0+ +0 +0 +1
+\[ 1\] \.hash +.*
+\[ 2\] \.dynsym +.*
+\[ 3\] \.dynstr +.*
+\[ 4\] \.rela\.dyn +.*
+\[ 5\] \.rela\.plt +.*
+\[ 6\] \.text +PROGBITS +0+498 0+498 0+70 0+ +AX +0 +0 +1
+\[ 7\] \.tdata +PROGBITS +0+10508 0+508 0+1c 0+ WAT +0 +0 +4
+\[ 8\] \.tbss +NOBITS +0+10524 0+524 0+1c 0+ WAT +0 +0 +4
+\[ 9\] \.dynamic +DYNAMIC +0+10524 0+524 0+a0 08 +WA +3 +0 +4
+\[10\] \.data +PROGBITS +0+105c4 0+5c4 0+ 0+ +WA +0 +0 +1
+\[11\] \.got +PROGBITS +0+105c4 0+5c4 0+34 04 WAX +0 +0 +4
+\[12\] \.sdata2 +.*
+\[13\] \.sdata +.*
+\[14\] \.sbss +.*
+\[15\] \.plt +.*
+\[16\] \.bss +.*
+\[17\] \.shstrtab +.*
+\[18\] \.symtab +.*
+\[19\] \.strtab +.*
#...

Elf file type is DYN \(Shared object file\)
Entry point 0x538
Entry point 0x[0-9a-f]+
There are 4 program headers.*

Program Headers:
+Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
+LOAD +0x0+ 0x0+ 0x0+ 0x0+5a8 0x0+5a8 R E 0x10000
+LOAD +0x0+5a8 0x0+105a8 0x0+105a8 0x0+f0 0x0+144 RWE 0x10000
+DYNAMIC +0x0+5c4 0x0+105c4 0x0+105c4 0x0+a0 0x0+a0 RW +0x4
+TLS +0x0+5a8 0x0+105a8 0x0+105a8 0x0+1c 0x0+38 R +0x4
+LOAD +0x0+ 0x0+ 0x0+ 0x0+508 0x0+508 R E 0x10000
+LOAD +0x0+508 0x0+10508 0x0+10508 0x0+f0 0x0+144 RWE 0x10000
+DYNAMIC +0x0+524 0x0+10524 0x0+10524 0x0+a0 0x0+a0 RW +0x4
+TLS +0x0+508 0x0+10508 0x0+10508 0x0+1c 0x0+38 R +0x4

Section to Segment mapping:
+Segment Sections\.\.\.
Expand All @@ -48,115 +48,107 @@ Program Headers:
+02 +\.tbss \.dynamic
+03 +\.tdata \.tbss

Relocation section '\.rela\.dyn' at offset 0x454 contains 18 entries:
Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries:
Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
0+53c +0+140a R_PPC_REL24 +0+ +__tls_get_addr \+ 0
0+544 +0+140a R_PPC_REL24 +0+ +__tls_get_addr \+ 0
0+57c +0+140a R_PPC_REL24 +0+ +__tls_get_addr \+ 0
0+584 +0+140a R_PPC_REL24 +0+ +__tls_get_addr \+ 0
0+56e +0+1345 R_PPC_TPREL16 +0+30 +le0 \+ 0
0+572 +0+1648 R_PPC_TPREL16_HA +0+34 +le1 \+ 0
0+576 +0+1646 R_PPC_TPREL16_LO +0+34 +le1 \+ 0
0+59e +0+845 R_PPC_TPREL16 +0+105a8 +\.tdata \+ 105bc
0+5a2 +0+848 R_PPC_TPREL16_HA +0+105a8 +\.tdata \+ 105c0
0+5a6 +0+846 R_PPC_TPREL16_LO +0+105a8 +\.tdata \+ 105c0
0+10674 +0+44 R_PPC_DTPMOD32 +0+
0+1067c +0+44 R_PPC_DTPMOD32 +0+
0+10680 +0+4e R_PPC_DTPREL32 +0+
0+10684 +0+1244 R_PPC_DTPMOD32 +0+ +gd \+ 0
0+10688 +0+124e R_PPC_DTPREL32 +0+ +gd \+ 0
0+1068c +0+2144 R_PPC_DTPMOD32 +0+1c +gd0 \+ 0
0+10690 +0+214e R_PPC_DTPREL32 +0+1c +gd0 \+ 0
0+10694 +0+2249 R_PPC_TPREL32 +0+2c +ie0 \+ 0
0+49c +0+c0a R_PPC_REL24 +0+ +__tls_get_addr \+ 0
0+4a4 +0+c0a R_PPC_REL24 +0+ +__tls_get_addr \+ 0
0+4dc +0+c0a R_PPC_REL24 +0+ +__tls_get_addr \+ 0
0+4e4 +0+c0a R_PPC_REL24 +0+ +__tls_get_addr \+ 0
0+4ce +0+b45 R_PPC_TPREL16 +0+30 +le0 \+ 0
0+4d2 +0+e48 R_PPC_TPREL16_HA +0+34 +le1 \+ 0
0+4d6 +0+e46 R_PPC_TPREL16_LO +0+34 +le1 \+ 0
0+4fe +0+245 R_PPC_TPREL16 +0+10508 +\.tdata \+ 1051c
0+502 +0+248 R_PPC_TPREL16_HA +0+10508 +\.tdata \+ 10520
0+506 +0+246 R_PPC_TPREL16_LO +0+10508 +\.tdata \+ 10520
0+105d4 +0+44 R_PPC_DTPMOD32 +0+
0+105dc +0+44 R_PPC_DTPMOD32 +0+
0+105e0 +0+4e R_PPC_DTPREL32 +0+
0+105e4 +0+a44 R_PPC_DTPMOD32 +0+ +gd \+ 0
0+105e8 +0+a4e R_PPC_DTPREL32 +0+ +gd \+ 0
0+105ec +0+1944 R_PPC_DTPMOD32 +0+1c +gd0 \+ 0
0+105f0 +0+194e R_PPC_DTPREL32 +0+1c +gd0 \+ 0
0+105f4 +0+1a49 R_PPC_TPREL32 +0+2c +ie0 \+ 0
Relocation section '\.rela\.plt' at offset 0x52c contains 1 entries:
Relocation section '\.rela\.plt' at offset 0x[0-9a-f]+ contains 1 entries:
Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
0+106e0 +0+1415 R_PPC_JMP_SLOT +0+ +__tls_get_addr \+ 0
0+10640 +0+c15 R_PPC_JMP_SLOT +0+ +__tls_get_addr \+ 0

Symbol table '\.dynsym' contains 36 entries:
Symbol table '\.dynsym' contains 28 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+1: 0+b4 +0 SECTION LOCAL +DEFAULT +1
+2: 0+190 +0 SECTION LOCAL +DEFAULT +2
+3: 0+3d0 +0 SECTION LOCAL +DEFAULT +3
+4: 0+454 +0 SECTION LOCAL +DEFAULT +4
+5: 0+52c +0 SECTION LOCAL +DEFAULT +5
+6: 0+538 +0 SECTION LOCAL +DEFAULT +6
+7: 0+105a8 +0 SECTION LOCAL +DEFAULT +7
+8: 0+105a8 +0 SECTION LOCAL +DEFAULT +8
+9: 0+105c4 +0 SECTION LOCAL +DEFAULT +9
+10: 0+105c4 +0 SECTION LOCAL +DEFAULT +10
+11: 0+10664 +0 SECTION LOCAL +DEFAULT +11
+12: 0+10698 +0 SECTION LOCAL +DEFAULT +12
+13: 0+10698 +0 SECTION LOCAL +DEFAULT +13
+14: 0+10698 +0 SECTION LOCAL +DEFAULT +14
+15: 0+10698 +0 SECTION LOCAL +DEFAULT +15
+16: 0+106ec +0 SECTION LOCAL +DEFAULT +16
+17: 0+105c4 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+18: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+19: 0+30 +0 TLS +GLOBAL DEFAULT +9 le0
+20: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
+21: 0+20 +0 TLS +GLOBAL DEFAULT +9 ld0
+22: 0+34 +0 TLS +GLOBAL DEFAULT +9 le1
+23: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+24: 0+538 +0 NOTYPE +GLOBAL DEFAULT +6 _start
+25: 0+106ec +0 NOTYPE +GLOBAL DEFAULT +ABS __end
+26: 0+18698 +0 OBJECT +GLOBAL DEFAULT +13 _SDA_BASE_
+27: 0+28 +0 TLS +GLOBAL DEFAULT +9 ld2
+28: 0+24 +0 TLS +GLOBAL DEFAULT +9 ld1
+29: 0+10698 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+30: 0+10698 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+31: 0+10668 +0 OBJECT +GLOBAL DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+32: 0+106ec +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+33: 0+1c +0 TLS +GLOBAL DEFAULT +9 gd0
+34: 0+2c +0 TLS +GLOBAL DEFAULT +9 ie0
+35: 0+18698 +0 OBJECT +GLOBAL DEFAULT +12 _SDA2_BASE_
+[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+[0-9]+: 0+498 +0 SECTION LOCAL +DEFAULT +6
+[0-9]+: 0+10508 +0 SECTION LOCAL +DEFAULT +7
+[0-9]+: 0+10524 +0 SECTION LOCAL +DEFAULT +8
+[0-9]+: 0+105c4 +0 SECTION LOCAL +DEFAULT +10
+[0-9]+: 0+105f8 +0 SECTION LOCAL +DEFAULT +12
+[0-9]+: 0+105f8 +0 SECTION LOCAL +DEFAULT +13
+[0-9]+: 0+105f8 +0 SECTION LOCAL +DEFAULT +14
+[0-9]+: 0+1064c +0 SECTION LOCAL +DEFAULT +16
+[0-9]+: 0+10524 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+[0-9]+: 0+30 +0 TLS +GLOBAL DEFAULT +8 le0
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
+[0-9]+: 0+20 +0 TLS +GLOBAL DEFAULT +8 ld0
+[0-9]+: 0+34 +0 TLS +GLOBAL DEFAULT +8 le1
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +6 _start
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __end
+[0-9]+: [0-9a-f]+ +0 OBJECT +GLOBAL DEFAULT +13 _SDA_BASE_
+[0-9]+: 0+28 +0 TLS +GLOBAL DEFAULT +8 ld2
+[0-9]+: 0+24 +0 TLS +GLOBAL DEFAULT +8 ld1
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+[0-9]+: 0+105c8 +0 OBJECT +GLOBAL DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+[0-9]+: 0+1c +0 TLS +GLOBAL DEFAULT +8 gd0
+[0-9]+: 0+2c +0 TLS +GLOBAL DEFAULT +8 ie0
+[0-9]+: [0-9a-f]+ +0 OBJECT +GLOBAL DEFAULT +12 _SDA2_BASE_

Symbol table '\.symtab' contains 46 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+1: 0+b4 +0 SECTION LOCAL +DEFAULT +1
+2: 0+190 +0 SECTION LOCAL +DEFAULT +2
+3: 0+3d0 +0 SECTION LOCAL +DEFAULT +3
+4: 0+454 +0 SECTION LOCAL +DEFAULT +4
+5: 0+52c +0 SECTION LOCAL +DEFAULT +5
+6: 0+538 +0 SECTION LOCAL +DEFAULT +6
+7: 0+105a8 +0 SECTION LOCAL +DEFAULT +7
+8: 0+105a8 +0 SECTION LOCAL +DEFAULT +8
+9: 0+105c4 +0 SECTION LOCAL +DEFAULT +9
+10: 0+105c4 +0 SECTION LOCAL +DEFAULT +10
+11: 0+10664 +0 SECTION LOCAL +DEFAULT +11
+12: 0+10698 +0 SECTION LOCAL +DEFAULT +12
+13: 0+10698 +0 SECTION LOCAL +DEFAULT +13
+14: 0+10698 +0 SECTION LOCAL +DEFAULT +14
+15: 0+10698 +0 SECTION LOCAL +DEFAULT +15
+16: 0+106ec +0 SECTION LOCAL +DEFAULT +16
+17: 0+ +0 SECTION LOCAL +DEFAULT +17
+18: 0+ +0 SECTION LOCAL +DEFAULT +18
+19: 0+ +0 SECTION LOCAL +DEFAULT +19
+20: 0+ +0 TLS +LOCAL +DEFAULT +8 gd4
+21: 0+4 +0 TLS +LOCAL +DEFAULT +8 ld4
+22: 0+8 +0 TLS +LOCAL +DEFAULT +8 ld5
+23: 0+c +0 TLS +LOCAL +DEFAULT +8 ld6
+24: 0+10 +0 TLS +LOCAL +DEFAULT +8 ie4
+25: 0+14 +0 TLS +LOCAL +DEFAULT +8 le4
+26: 0+18 +0 TLS +LOCAL +DEFAULT +8 le5
+27: 0+105c4 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+28: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+29: 0+30 +0 TLS +GLOBAL DEFAULT +9 le0
+30: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
+31: 0+20 +0 TLS +GLOBAL DEFAULT +9 ld0
+32: 0+34 +0 TLS +GLOBAL DEFAULT +9 le1
+33: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+34: 0+538 +0 NOTYPE +GLOBAL DEFAULT +6 _start
+35: 0+106ec +0 NOTYPE +GLOBAL DEFAULT +ABS __end
+36: 0+18698 +0 OBJECT +GLOBAL DEFAULT +13 _SDA_BASE_
+37: 0+28 +0 TLS +GLOBAL DEFAULT +9 ld2
+38: 0+24 +0 TLS +GLOBAL DEFAULT +9 ld1
+39: 0+10698 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+40: 0+10698 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+41: 0+10668 +0 OBJECT +GLOBAL DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+42: 0+106ec +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+43: 0+1c +0 TLS +GLOBAL DEFAULT +9 gd0
+44: 0+2c +0 TLS +GLOBAL DEFAULT +9 ie0
+45: 0+18698 +0 OBJECT +GLOBAL DEFAULT +12 _SDA2_BASE_
+[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +1
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +2
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +3
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +4
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +5
+[0-9]+: 0+498 +0 SECTION LOCAL +DEFAULT +6
+[0-9]+: 0+10508 +0 SECTION LOCAL +DEFAULT +7
+[0-9]+: 0+10524 +0 SECTION LOCAL +DEFAULT +8
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +9
+[0-9]+: 0+105c4 +0 SECTION LOCAL +DEFAULT +10
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +11
+[0-9]+: 0+105f8 +0 SECTION LOCAL +DEFAULT +12
+[0-9]+: 0+105f8 +0 SECTION LOCAL +DEFAULT +13
+[0-9]+: 0+105f8 +0 SECTION LOCAL +DEFAULT +14
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15
+[0-9]+: 0+1064c +0 SECTION LOCAL +DEFAULT +16
+[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +17
+[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +18
+[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +19
+[0-9]+: 0+ +0 TLS +LOCAL +DEFAULT +7 gd4
+[0-9]+: 0+4 +0 TLS +LOCAL +DEFAULT +7 ld4
+[0-9]+: 0+8 +0 TLS +LOCAL +DEFAULT +7 ld5
+[0-9]+: 0+c +0 TLS +LOCAL +DEFAULT +7 ld6
+[0-9]+: 0+10 +0 TLS +LOCAL +DEFAULT +7 ie4
+[0-9]+: 0+14 +0 TLS +LOCAL +DEFAULT +7 le4
+[0-9]+: 0+18 +0 TLS +LOCAL +DEFAULT +7 le5
+[0-9]+: 0+10524 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+[0-9]+: 0+30 +0 TLS +GLOBAL DEFAULT +8 le0
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
+[0-9]+: 0+20 +0 TLS +GLOBAL DEFAULT +8 ld0
+[0-9]+: 0+34 +0 TLS +GLOBAL DEFAULT +8 le1
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +6 _start
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __end
+[0-9]+: [0-9a-f]+ +0 OBJECT +GLOBAL DEFAULT +13 _SDA_BASE_
+[0-9]+: 0+28 +0 TLS +GLOBAL DEFAULT +8 ld2
+[0-9]+: 0+24 +0 TLS +GLOBAL DEFAULT +8 ld1
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+[0-9]+: 0+105c8 +0 OBJECT +GLOBAL DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+[0-9]+: 0+1c +0 TLS +GLOBAL DEFAULT +8 gd0
+[0-9]+: 0+2c +0 TLS +GLOBAL DEFAULT +8 ie0
+[0-9]+: [0-9a-f]+ +0 OBJECT +GLOBAL DEFAULT +12 _SDA2_BASE_
4 changes: 2 additions & 2 deletions ld/testsuite/ld-powerpc/tlsso32.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
.*: +file format elf32-powerpc

Contents of section \.tdata:
105a8 12345678 23456789 3456789a 456789ab .*
105b8 56789abc 6789abcd 789abcde .*
10508 12345678 23456789 3456789a 456789ab .*
10518 56789abc 6789abcd 789abcde .*
12 changes: 6 additions & 6 deletions ld/testsuite/ld-powerpc/tlstocso.g
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
.*: +file format elf64-powerpc

Contents of section \.got:
10890 00000000 00018890 00000000 00000000 .*
108a0 00000000 00000000 00000000 00000000 .*
108b0 00000000 00000000 00000000 00000000 .*
108c0 00000000 00000000 00000000 00000000 .*
108d0 00000000 00000000 00000000 00000000 .*
108e0 00000000 00000000 .*
10798 00000000 00018798 00000000 00000000 .*
107a8 00000000 00000000 00000000 00000000 .*
107b8 00000000 00000000 00000000 00000000 .*
107c8 00000000 00000000 00000000 00000000 .*
107d8 00000000 00000000 00000000 00000000 .*
107e8 00000000 00000000 .*
211 changes: 101 additions & 110 deletions ld/testsuite/ld-powerpc/tlstocso.r
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,36 @@ There are 19 section headers.*
Section Headers:
+\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
+\[ 0\] +NULL +0+ 0+ 0+ 0+ +0 +0 +0
+\[ 1\] \.hash +HASH +0+120 0+120 0+c8 04 +A +2 +0 +8
+\[ 2\] \.dynsym +DYNSYM +0+1e8 0+1e8 0+2e8 18 +A +3 +16 +8
+\[ 3\] \.dynstr +STRTAB +0+4d0 0+4d0 0+53 0+ +A +0 +0 +1
+\[ 4\] \.rela\.dyn +RELA +0+528 0+528 0+108 18 +A +2 +0 +8
+\[ 5\] \.rela\.plt +RELA +0+630 0+630 0+18 18 +A +2 +14 +8
+\[ 6\] \.text +PROGBITS +0+648 0+648 0+bc 0+ +AX +0 +0 +4
+\[ 7\] \.data +PROGBITS +0+10708 0+708 0+ 0+ +WA +0 +0 +1
+\[ 8\] \.branch_lt +PROGBITS +0+10708 0+708 0+ 0+ +WA +0 +0 +8
+\[ 9\] \.tdata +PROGBITS +0+10708 0+708 0+38 0+ WAT +0 +0 +8
+\[10\] \.tbss +NOBITS +0+10740 0+740 0+38 0+ WAT +0 +0 +8
+\[11\] \.dynamic +DYNAMIC +0+10740 0+740 0+150 10 +WA +3 +0 +8
+\[12\] \.got +PROGBITS +0+10890 0+890 0+58 08 +WA +0 +0 +8
+\[13\] \.sbss +NOBITS +0+108e8 0+8e8 0+ 0+ +W +0 +0 +1
+\[14\] \.plt +NOBITS +0+108e8 0+8e8 0+30 18 +WA +0 +0 +8
+\[15\] \.bss +NOBITS +0+10918 0+8e8 0+ 0+ +WA +0 +0 +1
+\[16\] \.shstrtab +STRTAB +0+ 0+8e8 0+82 0+ +0 +0 +1
+\[17\] \.symtab +SYMTAB +0+ 0+e30 0+408 18 +18 +28 +8
+\[18\] \.strtab +STRTAB +0+ 0+1238 0+8c 0+ +0 +0 +1
+\[ 1\] \.hash +.*
+\[ 2\] \.dynsym +.*
+\[ 3\] \.dynstr +.*
+\[ 4\] \.rela\.dyn +.*
+\[ 5\] \.rela\.plt +.*
+\[ 6\] \.text +PROGBITS +0+550 0+550 0+bc 0+ +AX +0 +0 +4
+\[ 7\] \.tdata +PROGBITS +0+10610 0+610 0+38 0+ WAT +0 +0 +8
+\[ 8\] \.tbss +NOBITS +0+10648 0+648 0+38 0+ WAT +0 +0 +8
+\[ 9\] \.dynamic +DYNAMIC +0+10648 0+648 0+150 10 +WA +3 +0 +8
+\[10\] \.data +PROGBITS +0+10798 0+798 0+ 0+ +WA +0 +0 +1
+\[11\] \.branch_lt +.*
+\[12\] \.got +PROGBITS +0+10798 0+798 0+58 08 +WA +0 +0 +8
+\[13\] \.sbss +.*
+\[14\] \.plt +.*
+\[15\] \.bss +.*
+\[16\] \.shstrtab +.*
+\[17\] \.symtab +.*
+\[18\] \.strtab +.*
#...

Elf file type is DYN \(Shared object file\)
Entry point 0x664
Entry point 0x[0-9a-f]+
There are 4 program headers.*

Program Headers:
+Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+LOAD +0x0+ 0x0+ 0x0+ 0x0+704 0x0+704 R E 0x10000
+LOAD +0x0+708 0x0+10708 0x0+10708 0x0+1e0 0x0+210 RW +0x10000
+DYNAMIC +0x0+740 0x0+10740 0x0+10740 0x0+150 0x0+150 RW +0x8
+TLS +0x0+708 0x0+10708 0x0+10708 0x0+38 0x0+70 R +0x8
+LOAD +0x0+ 0x0+ 0x0+ 0x0+60c 0x0+60c R E 0x10000
+LOAD +0x0+610 0x0+10610 0x0+10610 0x0+1e0 0x0+210 RW +0x10000
+DYNAMIC +0x0+648 0x0+10648 0x0+10648 0x0+150 0x0+150 RW +0x8
+TLS +0x0+610 0x0+10610 0x0+10610 0x0+38 0x0+70 R +0x8

Section to Segment mapping:
+Segment Sections\.\.\.
Expand All @@ -49,98 +49,89 @@ Program Headers:

Relocation section '\.rela\.dyn' at offset .* contains 11 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
0+6b2 +0+1200000045 R_PPC64_TPREL16 +0+60 le0 \+ 0
0+6b6 +0+1500000048 R_PPC64_TPREL16_HA +0+68 le1 \+ 0
0+6ba +0+1500000046 R_PPC64_TPREL16_LO +0+68 le1 \+ 0
0+10898 +0+1100000044 R_PPC64_DTPMOD64 +0+ gd \+ 0
0+108a0 +0+110000004e R_PPC64_DTPREL64 +0+ gd \+ 0
0+108a8 +0+1600000044 R_PPC64_DTPMOD64 +0+ ld \+ 0
0+108b8 +0+1d00000044 R_PPC64_DTPMOD64 +0+38 gd0 \+ 0
0+108c0 +0+1d0000004e R_PPC64_DTPREL64 +0+38 gd0 \+ 0
0+108c8 +0+1400000044 R_PPC64_DTPMOD64 +0+40 ld0 \+ 0
0+108d8 +0+180000004e R_PPC64_DTPREL64 +0+50 ld2 \+ 0
0+108e0 +0+1e00000049 R_PPC64_TPREL64 +0+58 ie0 \+ 0
0+5ba +0+90+45 R_PPC64_TPREL16 +0+60 le0 \+ 0
0+5be +0+c0+48 R_PPC64_TPREL16_HA +0+68 le1 \+ 0
0+5c2 +0+c0+46 R_PPC64_TPREL16_LO +0+68 le1 \+ 0
0+107a0 +0+80+44 R_PPC64_DTPMOD64 +0+ gd \+ 0
0+107a8 +0+80+4e R_PPC64_DTPREL64 +0+ gd \+ 0
0+107b0 +0+d0+44 R_PPC64_DTPMOD64 +0+ ld \+ 0
0+107c0 +0+140+44 R_PPC64_DTPMOD64 +0+38 gd0 \+ 0
0+107c8 +0+140+4e R_PPC64_DTPREL64 +0+38 gd0 \+ 0
0+107d0 +0+b0+44 R_PPC64_DTPMOD64 +0+40 ld0 \+ 0
0+107e0 +0+f0+4e R_PPC64_DTPREL64 +0+50 ld2 \+ 0
0+107e8 +0+150+49 R_PPC64_TPREL64 +0+58 ie0 \+ 0

Relocation section '\.rela\.plt' at offset .* contains 1 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
0+10900 +0+1300000015 R_PPC64_JMP_SLOT +0+ __tls_get_addr \+ 0
0+10808 +0+a0+15 R_PPC64_JMP_SLOT +0+ __tls_get_addr \+ 0

Symbol table '\.dynsym' contains 31 entries:
Symbol table '\.dynsym' contains 22 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+1: 0+120 +0 SECTION LOCAL +DEFAULT +1
+2: 0+1e8 +0 SECTION LOCAL +DEFAULT +2
+3: 0+4d0 +0 SECTION LOCAL +DEFAULT +3
+4: 0+528 +0 SECTION LOCAL +DEFAULT +4
+5: 0+630 +0 SECTION LOCAL +DEFAULT +5
+6: 0+648 +0 SECTION LOCAL +DEFAULT +6
+7: 0+10708 +0 SECTION LOCAL +DEFAULT +7
+8: 0+10708 +0 SECTION LOCAL +DEFAULT +8
+9: 0+10708 +0 SECTION LOCAL +DEFAULT +9
+10: 0+10740 +0 SECTION LOCAL +DEFAULT +10
+11: 0+10740 +0 SECTION LOCAL +DEFAULT +11
+12: 0+10890 +0 SECTION LOCAL +DEFAULT +12
+13: 0+108e8 +0 SECTION LOCAL +DEFAULT +13
+14: 0+108e8 +0 SECTION LOCAL +DEFAULT +14
+15: 0+10918 +0 SECTION LOCAL +DEFAULT +15
+16: 0+10740 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+17: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+18: 0+60 +0 TLS +GLOBAL DEFAULT +10 le0
+19: 0+ +24 OBJECT +GLOBAL DEFAULT +UND __tls_get_addr
+20: 0+40 +0 TLS +GLOBAL DEFAULT +10 ld0
+21: 0+68 +0 TLS +GLOBAL DEFAULT +10 le1
+22: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+23: 0+664 +0 NOTYPE +GLOBAL DEFAULT +6 _start
+24: 0+50 +0 TLS +GLOBAL DEFAULT +10 ld2
+25: 0+48 +0 TLS +GLOBAL DEFAULT +10 ld1
+26: 0+108e8 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+27: 0+108e8 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+28: 0+10918 +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+29: 0+38 +0 TLS +GLOBAL DEFAULT +10 gd0
+30: 0+58 +0 TLS +GLOBAL DEFAULT +10 ie0
+[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+[0-9]+: 0+550 +0 SECTION LOCAL +DEFAULT +6
+[0-9]+: 0+10610 +0 SECTION LOCAL +DEFAULT +7
+[0-9]+: 0+10648 +0 SECTION LOCAL +DEFAULT +8
+[0-9]+: 0+10798 +0 SECTION LOCAL +DEFAULT +10
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +11
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15
+[0-9]+: 0+10648 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+[0-9]+: 0+60 +0 TLS +GLOBAL DEFAULT +8 le0
+[0-9]+: 0+ +24 OBJECT +GLOBAL DEFAULT +UND __tls_get_addr
+[0-9]+: 0+40 +0 TLS +GLOBAL DEFAULT +8 ld0
+[0-9]+: 0+68 +0 TLS +GLOBAL DEFAULT +8 le1
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +6 _start
+[0-9]+: 0+50 +0 TLS +GLOBAL DEFAULT +8 ld2
+[0-9]+: 0+48 +0 TLS +GLOBAL DEFAULT +8 ld1
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+[0-9]+: 0+38 +0 TLS +GLOBAL DEFAULT +8 gd0
+[0-9]+: 0+58 +0 TLS +GLOBAL DEFAULT +8 ie0

Symbol table '\.symtab' contains 43 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+1: 0+120 +0 SECTION LOCAL +DEFAULT +1
+2: 0+1e8 +0 SECTION LOCAL +DEFAULT +2
+3: 0+4d0 +0 SECTION LOCAL +DEFAULT +3
+4: 0+528 +0 SECTION LOCAL +DEFAULT +4
+5: 0+630 +0 SECTION LOCAL +DEFAULT +5
+6: 0+648 +0 SECTION LOCAL +DEFAULT +6
+7: 0+10708 +0 SECTION LOCAL +DEFAULT +7
+8: 0+10708 +0 SECTION LOCAL +DEFAULT +8
+9: 0+10708 +0 SECTION LOCAL +DEFAULT +9
+10: 0+10740 +0 SECTION LOCAL +DEFAULT +10
+11: 0+10740 +0 SECTION LOCAL +DEFAULT +11
+12: 0+10890 +0 SECTION LOCAL +DEFAULT +12
+13: 0+108e8 +0 SECTION LOCAL +DEFAULT +13
+14: 0+108e8 +0 SECTION LOCAL +DEFAULT +14
+15: 0+10918 +0 SECTION LOCAL +DEFAULT +15
+16: 0+ +0 SECTION LOCAL +DEFAULT +16
+17: 0+ +0 SECTION LOCAL +DEFAULT +17
+18: 0+ +0 SECTION LOCAL +DEFAULT +18
+19: 0+ +0 TLS +LOCAL +DEFAULT +9 gd4
+20: 0+8 +0 TLS +LOCAL +DEFAULT +9 ld4
+21: 0+10 +0 TLS +LOCAL +DEFAULT +9 ld5
+22: 0+18 +0 TLS +LOCAL +DEFAULT +9 ld6
+23: 0+20 +0 TLS +LOCAL +DEFAULT +9 ie4
+24: 0+28 +0 TLS +LOCAL +DEFAULT +9 le4
+25: 0+30 +0 TLS +LOCAL +DEFAULT +9 le5
+26: 0+108e0 +0 NOTYPE +LOCAL +DEFAULT +12 \.Lie0
+27: 0+648 +0 NOTYPE +LOCAL +DEFAULT +6 \.__tls_get_addr
+28: 0+10740 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+29: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+30: 0+60 +0 TLS +GLOBAL DEFAULT +10 le0
+31: 0+ +24 OBJECT +GLOBAL DEFAULT +UND __tls_get_addr
+32: 0+40 +0 TLS +GLOBAL DEFAULT +10 ld0
+33: 0+68 +0 TLS +GLOBAL DEFAULT +10 le1
+34: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+35: 0+664 +0 NOTYPE +GLOBAL DEFAULT +6 _start
+36: 0+50 +0 TLS +GLOBAL DEFAULT +10 ld2
+37: 0+48 +0 TLS +GLOBAL DEFAULT +10 ld1
+38: 0+108e8 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+39: 0+108e8 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+40: 0+10918 +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+41: 0+38 +0 TLS +GLOBAL DEFAULT +10 gd0
+42: 0+58 +0 TLS +GLOBAL DEFAULT +10 ie0
+[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+[0-9]+: 0+120 +0 SECTION LOCAL +DEFAULT +1
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +2
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +3
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +4
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +5
+[0-9]+: 0+550 +0 SECTION LOCAL +DEFAULT +6
+[0-9]+: 0+10610 +0 SECTION LOCAL +DEFAULT +7
+[0-9]+: 0+10648 +0 SECTION LOCAL +DEFAULT +8
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +9
+[0-9]+: 0+10798 +0 SECTION LOCAL +DEFAULT +10
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +11
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +12
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +13
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +14
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15
+[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +16
+[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +17
+[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +18
+[0-9]+: 0+ +0 TLS +LOCAL +DEFAULT +7 gd4
+[0-9]+: 0+8 +0 TLS +LOCAL +DEFAULT +7 ld4
+[0-9]+: 0+10 +0 TLS +LOCAL +DEFAULT +7 ld5
+[0-9]+: 0+18 +0 TLS +LOCAL +DEFAULT +7 ld6
+[0-9]+: 0+20 +0 TLS +LOCAL +DEFAULT +7 ie4
+[0-9]+: 0+28 +0 TLS +LOCAL +DEFAULT +7 le4
+[0-9]+: 0+30 +0 TLS +LOCAL +DEFAULT +7 le5
+[0-9]+: [0-9a-f]+ +0 NOTYPE +LOCAL +DEFAULT +12 \.Lie0
+[0-9]+: [0-9a-f]+ +0 NOTYPE +LOCAL +DEFAULT +6 \.__tls_get_addr
+[0-9]+: 0+10648 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND gd
+[0-9]+: 0+60 +0 TLS +GLOBAL DEFAULT +8 le0
+[0-9]+: 0+ +24 OBJECT +GLOBAL DEFAULT +UND __tls_get_addr
+[0-9]+: 0+40 +0 TLS +GLOBAL DEFAULT +8 ld0
+[0-9]+: 0+68 +0 TLS +GLOBAL DEFAULT +8 le1
+[0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND ld
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +6 _start
+[0-9]+: 0+50 +0 TLS +GLOBAL DEFAULT +8 ld2
+[0-9]+: 0+48 +0 TLS +GLOBAL DEFAULT +8 ld1
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+[0-9]+: 0+38 +0 TLS +GLOBAL DEFAULT +8 gd0
+[0-9]+: 0+58 +0 TLS +GLOBAL DEFAULT +8 ie0
232 changes: 120 additions & 112 deletions ld/testsuite/ld-s390/tlsbin.dd
Original file line number Diff line number Diff line change
Expand Up @@ -18,168 +18,176 @@

Disassembly of section .text:

0+4002e4 <fn2>:
0+[0-9a-f]+ <fn2>:
# function prolog
+4002e4: 90 6e f0 18 stm %r6,%r14,24\(%r15\)
+4002e8: a7 d5 00 24 bras %r13,400330 <fn2\+0x4c>
+[0-9a-f]+: 90 6e f0 18 stm %r6,%r14,24\(%r15\)
+[0-9a-f]+: a7 d5 00 24 bras %r13,[0-9a-f]+ <fn2\+0x4c>
# _GLOBAL_OFFSET_TABLE_
+4002ec: 00 00 12 90 .long 0x00001290
+[0-9a-f]+: [0-9a-f ]+ .long 0x[0-9a-f]+
# __tls_get_addr@plt-.LT1
+4002f0: ff ff ff d8 .long 0xffffffd8
+[0-9a-f]+: [0-9a-f ]+ .long 0x[0-9a-f]+
# sG1@tlsgd
+4002f4: 00 00 00 28 .long 0x00000028
+[0-9a-f]+: 00 00 00 28 .long 0x00000028
# sG2@tlsgd
+4002f8: 00 00 00 20 .long 0x00000020
+[0-9a-f]+: 00 00 00 20 .long 0x00000020
# sg1@tlsgd
+4002fc: ff ff ff 60 .long 0xffffff60
+[0-9a-f]+: ff ff ff 60 .long 0xffffff60
# sl1@tlsgd
+400300: ff ff ff 80 .long 0xffffff80
+[0-9a-f]+: ff ff ff 80 .long 0xffffff80
# sh1@tlsgd
+400304: ff ff ff a0 .long 0xffffffa0
+[0-9a-f]+: ff ff ff a0 .long 0xffffffa0
# sl1@tlsldm
+400308: 00 00 00 00 .long 0x00000000
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
# sl1@dtpoff
+40030c: ff ff ff 80 .long 0xffffff80
+[0-9a-f]+: ff ff ff 80 .long 0xffffff80
# sl2@dtpoff
+400310: ff ff ff 84 .long 0xffffff84
+[0-9a-f]+: ff ff ff 84 .long 0xffffff84
# sh1@tlsldm
+400314: 00 00 00 00 .long 0x00000000
+[0-9a-f]+: 00 00 00 00 .long 0x00000000
# sh1@dtpoff
+400318: ff ff ff a0 .long 0xffffffa0
+[0-9a-f]+: ff ff ff a0 .long 0xffffffa0
# sh2@dtpoff
+40031c: ff ff ff a4 .long 0xffffffa4
+[0-9a-f]+: ff ff ff a4 .long 0xffffffa4
# sG2@gotntpoff
+400320: 00 00 00 20 .long 0x00000020
+[0-9a-f]+: 00 00 00 20 .long 0x00000020
# sg1@gotntpoff
+400324: ff ff ff 60 .long 0xffffff60
+[0-9a-f]+: ff ff ff 60 .long 0xffffff60
# sl1@gotntpoff
+400328: ff ff ff 80 .long 0xffffff80
+[0-9a-f]+: ff ff ff 80 .long 0xffffff80
# sh1@gotntpoff
+40032c: ff ff ff a0 .long 0xffffffa0
+[0-9a-f]+: ff ff ff a0 .long 0xffffffa0
# function prolog
+400330: 18 ef lr %r14,%r15
+400332: 58 c0 d0 00 l %r12,0\(%r13\)
+400336: a7 fa ff a0 ahi %r15,-96
+40033a: 41 cc d0 00 la %r12,0\(%r12,%r13\)
+40033e: 50 e0 e0 00 st %r14,0\(%r14\)
+[0-9a-f]+: 18 ef lr %r14,%r15
+[0-9a-f]+: 58 c0 d0 00 l %r12,0\(%r13\)
+[0-9a-f]+: a7 fa ff a0 ahi %r15,-96
+[0-9a-f]+: 41 cc d0 00 la %r12,0\(%r12,%r13\)
+[0-9a-f]+: 50 e0 e0 00 st %r14,0\(%r14\)
# Extract TCB and load branch offset
+400342: b2 4f 00 90 ear %r9,%a0
+400346: 58 70 d0 04 l %r7,4\(%r13\)
+[0-9a-f]+: b2 4f 00 90 ear %r9,%a0
+[0-9a-f]+: 58 70 d0 04 l %r7,4\(%r13\)
# GD -> IE because variable is not defined in executable
+40034a: 58 20 d0 08 l %r2,8\(%r13\)
+40034e: 58 22 c0 00 l %r2,0\(%r2,%r12\)
+400352: 41 22 90 00 la %r2,0\(%r2,%r9\)
+[0-9a-f]+: 58 20 d0 08 l %r2,8\(%r13\)
+[0-9a-f]+: 58 22 c0 00 l %r2,0\(%r2,%r12\)
+[0-9a-f]+: 41 22 90 00 la %r2,0\(%r2,%r9\)
# GD -> IE because variable is not defined in executable where
# the variable is referenced through IE too
+400356: 58 20 d0 0c l %r2,12\(%r13\)
+40035a: 58 22 c0 00 l %r2,0\(%r2,%r12\)
+40035e: 41 22 90 00 la %r2,0\(%r2,%r9\)
+[0-9a-f]+: 58 20 d0 0c l %r2,12\(%r13\)
+[0-9a-f]+: 58 22 c0 00 l %r2,0\(%r2,%r12\)
+[0-9a-f]+: 41 22 90 00 la %r2,0\(%r2,%r9\)
# GD -> LE with global variable defined in executable
+400362: 58 20 d0 10 l %r2,16\(%r13\)
+400366: 47 00 00 00 bc 0,0
+40036a: 41 22 90 00 la %r2,0\(%r2,%r9\)
+[0-9a-f]+: 58 20 d0 10 l %r2,16\(%r13\)
+[0-9a-f]+: 47 00 00 00 bc 0,0
+[0-9a-f]+: 41 22 90 00 la %r2,0\(%r2,%r9\)
# GD -> LE with local variable defined in executable
+40036e: 58 20 d0 14 l %r2,20\(%r13\)
+400372: 47 00 00 00 bc 0,0
+400376: 41 22 90 00 la %r2,0\(%r2,%r9\)
+[0-9a-f]+: 58 20 d0 14 l %r2,20\(%r13\)
+[0-9a-f]+: 47 00 00 00 bc 0,0
+[0-9a-f]+: 41 22 90 00 la %r2,0\(%r2,%r9\)
# GD -> LE with hidden variable defined in executable
+40037a: 58 20 d0 18 l %r2,24\(%r13\)
+40037e: 47 00 00 00 bc 0,0
+400382: 41 22 90 00 la %r2,0\(%r2,%r9\)
+[0-9a-f]+: 58 20 d0 18 l %r2,24\(%r13\)
+[0-9a-f]+: 47 00 00 00 bc 0,0
+[0-9a-f]+: 41 22 90 00 la %r2,0\(%r2,%r9\)
# LD -> LE
+400386: 58 20 d0 1c l %r2,28\(%r13\)
+40038a: 47 00 00 00 bc 0,0
+40038e: 41 32 90 00 la %r3,0\(%r2,%r9\)
+400392: 58 40 d0 20 l %r4,32\(%r13\)
+400396: 41 54 30 00 la %r5,0\(%r4,%r3\)
+40039a: 58 40 d0 24 l %r4,36\(%r13\)
+40039e: 41 54 30 00 la %r5,0\(%r4,%r3\)
+[0-9a-f]+: 58 20 d0 1c l %r2,28\(%r13\)
+[0-9a-f]+: 47 00 00 00 bc 0,0
+[0-9a-f]+: 41 32 90 00 la %r3,0\(%r2,%r9\)
+[0-9a-f]+: 58 40 d0 20 l %r4,32\(%r13\)
+[0-9a-f]+: 41 54 30 00 la %r5,0\(%r4,%r3\)
+[0-9a-f]+: 58 40 d0 24 l %r4,36\(%r13\)
+[0-9a-f]+: 41 54 30 00 la %r5,0\(%r4,%r3\)
# LD -> LE against hidden variables
+4003a2: 58 20 d0 28 l %r2,40\(%r13\)
+4003a6: 47 00 00 00 bc 0,0
+4003aa: 41 32 90 00 la %r3,0\(%r2,%r9\)
+4003ae: 58 40 d0 2c l %r4,44\(%r13\)
+4003b2: 41 54 30 00 la %r5,0\(%r4,%r3\)
+4003b6: 58 40 d0 30 l %r4,48\(%r13\)
+4003ba: 41 54 30 00 la %r5,0\(%r4,%r3\)
+[0-9a-f]+: 58 20 d0 28 l %r2,40\(%r13\)
+[0-9a-f]+: 47 00 00 00 bc 0,0
+[0-9a-f]+: 41 32 90 00 la %r3,0\(%r2,%r9\)
+[0-9a-f]+: 58 40 d0 2c l %r4,44\(%r13\)
+[0-9a-f]+: 41 54 30 00 la %r5,0\(%r4,%r3\)
+[0-9a-f]+: 58 40 d0 30 l %r4,48\(%r13\)
+[0-9a-f]+: 41 54 30 00 la %r5,0\(%r4,%r3\)
# IE against global var
+4003be: 58 30 d0 34 l %r3,52\(%r13\)
+4003c2: 58 33 c0 00 l %r3,0\(%r3,%r12\)
+4003c6: 58 33 90 00 l %r3,0\(%r3,%r9\)
+[0-9a-f]+: 58 30 d0 34 l %r3,52\(%r13\)
+[0-9a-f]+: 58 33 c0 00 l %r3,0\(%r3,%r12\)
+[0-9a-f]+: 58 33 90 00 l %r3,0\(%r3,%r9\)
# IE -> LE against global var defined in exec
+4003ca: 58 30 d0 38 l %r3,56\(%r13\)
+4003ce: 18 43 lr %r4,%r3
+4003d0: 07 00 bcr 0,%r0
+4003d2: 41 54 90 00 la %r5,0\(%r4,%r9\)
+[0-9a-f]+: 58 30 d0 38 l %r3,56\(%r13\)
+[0-9a-f]+: 18 43 lr %r4,%r3
+[0-9a-f]+: 07 00 bcr 0,%r0
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# IE -> LE against local var
+4003d6: 58 30 d0 3c l %r3,60\(%r13\)
+4003da: 18 43 lr %r4,%r3
+4003dc: 07 00 bcr 0,%r0
+4003de: 41 54 90 00 la %r5,0\(%r4,%r9\)
+[0-9a-f]+: 58 30 d0 3c l %r3,60\(%r13\)
+[0-9a-f]+: 18 43 lr %r4,%r3
+[0-9a-f]+: 07 00 bcr 0,%r0
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# IE -> LE against hidden var
+4003e2: 58 30 d0 40 l %r3,64\(%r13\)
+4003e6: 18 43 lr %r4,%r3
+4003e8: 07 00 bcr 0,%r0
+4003ea: 41 54 90 00 la %r5,0\(%r4,%r9\)
+[0-9a-f]+: 58 30 d0 40 l %r3,64\(%r13\)
+[0-9a-f]+: 18 43 lr %r4,%r3
+[0-9a-f]+: 07 00 bcr 0,%r0
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# IE against global var with small got access (no optimization)
+4003ee: 58 30 c0 14 l %r3,20\(%r12\)
+4003f2: 41 33 90 00 la %r3,0\(%r3,%r9\)
+[0-9a-f]+: 58 30 c0 14 l %r3,20\(%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)
+4003f6: 58 30 c0 18 l %r3,24\(%r12\)
+4003fa: 41 33 90 00 la %r3,0\(%r3,%r9\)
+[0-9a-f]+: 58 30 c0 18 l %r3,24\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against local var with small got access (no optimization)
+4003fe: 58 30 c0 10 l %r3,16\(%r12\)
+400402: 41 33 90 00 la %r3,0\(%r3,%r9\)
+[0-9a-f]+: 58 30 c0 10 l %r3,16\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against hidden var with small got access (no optimization)
+400406: 58 30 c0 1c l %r3,28\(%r12\)
+40040a: 41 33 90 00 la %r3,0\(%r3,%r9\)
+[0-9a-f]+: 58 30 c0 1c l %r3,28\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# function epilog
+40040e: 98 6e f0 78 lm %r6,%r14,120\(%r15\)
+400412: 07 fe br %r14
+[0-9a-f]+: 98 6e f0 78 lm %r6,%r14,120\(%r15\)
+[0-9a-f]+: 07 fe br %r14
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7

0+400414 <_start>:
0+[0-9a-f]+ <_start>:
# function prolog
+400414: 90 6e f0 18 stm %r6,%r14,24\(%r15\)
+400418: a7 d5 00 0c bras %r13,400430 <_start\+0x1c>
+[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
+40041c: 00 40 15 a0 .long 0x004015a0
+[0-9a-f]+: 00 40 15 e4 .long 0x004015e4
# bg6@indntpoff
+400420: ff ff ff d4 .long 0xffffffd4
+[0-9a-f]+: ff ff ff d4 .long 0xffffffd4
# bl6@indntpoff
+400424: ff ff ff f4 .long 0xfffffff4
+[0-9a-f]+: ff ff ff f4 .long 0xfffffff4
# sh6@indntpoff
+400428: ff ff ff b4 .long 0xffffffb4
+[0-9a-f]+: ff ff ff b4 .long 0xffffffb4
# sg3@indntpoff
+40042c: ff ff ff 68 .long 0xffffff68
+[0-9a-f]+: ff ff ff 68 .long 0xffffff68
# function prolog
+400430: 18 ef lr %r14,%r15
+400432: a7 fa ff a0 ahi %r15,-96
+400436: 50 e0 e0 00 st %r14,0\(%r14\)
+[0-9a-f]+: 18 ef lr %r14,%r15
+[0-9a-f]+: a7 fa ff a0 ahi %r15,-96
+[0-9a-f]+: 50 e0 e0 00 st %r14,0\(%r14\)
# Extract TCB
+40043a: b2 4f 00 90 ear %r9,%a0
+[0-9a-f]+: b2 4f 00 90 ear %r9,%a0
# IE against global var
+40043e: 58 30 d0 00 l %r3,0\(%r13\)
+400442: 58 33 c0 00 l %r3,0\(%r3,%r12\)
+400446: 41 33 90 00 la %r3,0\(%r3,%r9\)
+[0-9a-f]+: 58 30 d0 00 l %r3,0\(%r13\)
+[0-9a-f]+: 58 33 c0 00 l %r3,0\(%r3,%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE -> LE against global var defined in exec
+40044a: 58 30 d0 04 l %r3,4\(%r13\)
+40044e: 18 43 lr %r4,%r3
+400450: 07 00 bcr 0,%r0
+400452: 41 54 90 00 la %r5,0\(%r4,%r9\)
+[0-9a-f]+: 58 30 d0 04 l %r3,4\(%r13\)
+[0-9a-f]+: 18 43 lr %r4,%r3
+[0-9a-f]+: 07 00 bcr 0,%r0
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# IE -> LE against local var
+400456: 58 30 d0 08 l %r3,8\(%r13\)
+40045a: 18 43 lr %r4,%r3
+40045c: 07 00 bcr 0,%r0
+40045e: 41 54 90 00 la %r5,0\(%r4,%r9\)
+[0-9a-f]+: 58 30 d0 08 l %r3,8\(%r13\)
+[0-9a-f]+: 18 43 lr %r4,%r3
+[0-9a-f]+: 07 00 bcr 0,%r0
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# IE -> LE against hidden but not local var
+400462: 58 30 d0 0c l %r3,12\(%r13\)
+400466: 18 43 lr %r4,%r3
+400468: 07 00 bcr 0,%r0
+40046a: 41 54 90 00 la %r5,0\(%r4,%r9\)
+[0-9a-f]+: 58 30 d0 0c l %r3,12\(%r13\)
+[0-9a-f]+: 18 43 lr %r4,%r3
+[0-9a-f]+: 07 00 bcr 0,%r0
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# LE, global var defined in exec
+40046e: 58 40 d0 10 l %r4,16\(%r13\)
+400472: 41 54 90 00 la %r5,0\(%r4,%r9\)
+[0-9a-f]+: 58 40 d0 10 l %r4,16\(%r13\)
+[0-9a-f]+: 41 54 90 00 la %r5,0\(%r4,%r9\)
# function epilog
+400476: 98 6e f0 78 lm %r6,%r14,120\(%r15\)
+40047a: 07 fe br %r14
+[0-9a-f]+: 98 6e f0 78 lm %r6,%r14,120\(%r15\)
+[0-9a-f]+: 07 fe br %r14
198 changes: 98 additions & 100 deletions ld/testsuite/ld-s390/tlsbin.rd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#readelf: -Ssrl
#target: s390-*-*

There are 19 section headers, starting at offset 0x[0-9a-f]+:
There are 18 section headers, starting at offset 0x[0-9a-f]+:

Section Headers:
\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
Expand All @@ -17,35 +17,34 @@ Section Headers:
\[ 5\] .rela.dyn +.*
\[ 6\] .rela.plt +.*
\[ 7\] .plt +.*
\[ 8\] .text +PROGBITS +0+4002e4 0+2e4 0+198 00 +AX +0 +0 +4
\[ 9\] .data +.*
\[10\] .tdata +PROGBITS +0+40147c 0+47c 0+60 00 WAT +0 +0 +1
\[11\] .tbss +NOBITS +0+4014dc 0+4dc 0+40 00 WAT +0 +0 +1
\[12\] .dynamic +DYNAMIC +0+4014dc 0+4dc 0+a0 08 +WA +4 +0 +4
\[13\] .got +PROGBITS +0+40157c 0+57c 0+2c 04 +WA +0 +0 +4
\[14\] .sbss +.*
\[15\] .bss +.*
\[16\] .shstrtab +.*
\[17\] .symtab +.*
\[18\] .strtab +.*
\[ 8\] .text +PROGBITS +.*
\[ 9\] .tdata +PROGBITS +0+4014c0 0+4c0 0+60 00 WAT +0 +0 +32
\[10\] .tbss +NOBITS +0+401520 0+520 0+40 00 WAT +0 +0 +1
\[11\] .dynamic +DYNAMIC +0+401520 0+520 0+a0 08 +WA +4 +0 +4
\[12\] .got +PROGBITS +0+4015c0 0+5c0 0+2c 04 +WA +0 +0 +4
\[13\] .data +.*
\[14\] .bss +.*
\[15\] .shstrtab +.*
\[16\] .symtab +.*
\[17\] .strtab +.*
Key to Flags:
.*
.*
.*

Elf file type is EXEC \(Executable file\)
Entry point 0x400414
Entry point 0x[0-9a-f]+
There are 6 program headers, starting at offset [0-9]+

Program Headers:
Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
PHDR +0x0+34 0x0+400034 0x0+400034 0x0+c0 0x0+c0 R E 0x4
INTERP +0x0+f4 0x0+4000f4 0x0+4000f4 0x0+11 0x0+11 R +0x1
.*Requesting program interpreter.*
LOAD +0x0+ 0x0+400000 0x0+400000 0x0+47c 0x0+47c R E 0x1000
LOAD +0x0+47c 0x0+40147c 0x0+40147c 0x0+12c 0x0+12c RW 0x1000
DYNAMIC +0x0+4dc 0x0+4014dc 0x0+4014dc 0x0+a0 0x0+a0 RW 0x4
TLS +0x0+47c 0x0+40147c 0x0+40147c 0x0+60 0x0+a0 R +0x1
LOAD +0x0+ 0x0+400000 0x0+400000 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x1000
LOAD +0x0+4c0 0x0+4014c0 0x0+4014c0 0x0+12c 0x0+12c RW 0x1000
DYNAMIC +0x0+520 0x0+401520 0x0+401520 0x0+a0 0x0+a0 RW 0x4
TLS +0x0+4c0 0x0+4014c0 0x0+4014c0 0x0+60 0x0+a0 R +0x20

Section to Segment mapping:
Segment Sections...
Expand All @@ -69,88 +68,87 @@ Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entries:

Symbol table '.dynsym' contains 11 entries:
+Num: +Value Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 NOTYPE LOCAL DEFAULT UND
+1: 0+ +0 TLS +GLOBAL DEFAULT UND sG3
+2: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
+3: 0+ +0 TLS +GLOBAL DEFAULT UND sG2
+4: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT UND __tls_get_offset
+5: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS __bss_start
+6: 0+ +0 TLS +GLOBAL DEFAULT UND sG6
+7: 0+ +0 TLS +GLOBAL DEFAULT UND sG1
+8: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _edata
+9: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
+10: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _end
+[0-9]+: 0+ +0 NOTYPE LOCAL DEFAULT UND
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sG3
+[0-9]+: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sG2
+[0-9]+: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT UND __tls_get_offset
+[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS __bss_start
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sG6
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sG1
+[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _edata
+[0-9]+: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
+[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _end

Symbol table '.symtab' contains 71 entries:
Symbol table '.symtab' contains 70 entries:
+Num: +Value Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 NOTYPE LOCAL DEFAULT UND
+1: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +1
+2: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +2
+3: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +3
+4: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +4
+5: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +5
+6: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +6
+7: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +7
+8: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +8
+9: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +9
+10: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +10
+11: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +11
+12: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +12
+13: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +13
+14: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +14
+15: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +15
+16: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +16
+17: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +17
+18: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +18
+19: 0+20 +0 TLS +LOCAL DEFAULT +10 sl1
+20: 0+24 +0 TLS +LOCAL DEFAULT +10 sl2
+21: 0+28 +0 TLS +LOCAL DEFAULT +10 sl3
+22: 0+2c +0 TLS +LOCAL DEFAULT +10 sl4
+23: 0+30 +0 TLS +LOCAL DEFAULT +10 sl5
+24: 0+34 +0 TLS +LOCAL DEFAULT +10 sl6
+25: 0+38 +0 TLS +LOCAL DEFAULT +10 sl7
+26: 0+3c +0 TLS +LOCAL DEFAULT +10 sl8
+27: 0+80 +0 TLS +LOCAL DEFAULT +11 bl1
+28: 0+84 +0 TLS +LOCAL DEFAULT +11 bl2
+29: 0+88 +0 TLS +LOCAL DEFAULT +11 bl3
+30: 0+8c +0 TLS +LOCAL DEFAULT +11 bl4
+31: 0+90 +0 TLS +LOCAL DEFAULT +11 bl5
+32: 0+94 +0 TLS +LOCAL DEFAULT +11 bl6
+33: 0+98 +0 TLS +LOCAL DEFAULT +11 bl7
+34: 0+9c +0 TLS +LOCAL DEFAULT +11 bl8
+35: 0+ +0 TLS +GLOBAL DEFAULT UND sG3
+36: 0+1c +0 TLS +GLOBAL DEFAULT +10 sg8
+37: 0+7c +0 TLS +GLOBAL DEFAULT +11 bg8
+38: 0+74 +0 TLS +GLOBAL DEFAULT +11 bg6
+39: 0+68 +0 TLS +GLOBAL DEFAULT +11 bg3
+40: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
+41: 0+8 +0 TLS +GLOBAL DEFAULT +10 sg3
+42: 0+48 +0 TLS +GLOBAL HIDDEN +10 sh3
+43: 0+ +0 TLS +GLOBAL DEFAULT UND sG2
+44: 0+c +0 TLS +GLOBAL DEFAULT +10 sg4
+45: 0+10 +0 TLS +GLOBAL DEFAULT +10 sg5
+46: 0+70 +0 TLS +GLOBAL DEFAULT +11 bg5
+47: 0+58 +0 TLS +GLOBAL HIDDEN +10 sh7
+48: 0+5c +0 TLS +GLOBAL HIDDEN +10 sh8
+49: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT UND __tls_get_offset
+50: 0+ +0 TLS +GLOBAL DEFAULT +10 sg1
+51: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT +8 _start
+52: 0+4c +0 TLS +GLOBAL HIDDEN +10 sh4
+53: 0+78 +0 TLS +GLOBAL DEFAULT +11 bg7
+54: 0+50 +0 TLS +GLOBAL HIDDEN +10 sh5
+55: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS __bss_start
+56: 0+ +0 TLS +GLOBAL DEFAULT UND sG6
+57: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT +8 fn2
+58: 0+4 +0 TLS +GLOBAL DEFAULT +10 sg2
+59: 0+ +0 TLS +GLOBAL DEFAULT UND sG1
+60: 0+40 +0 TLS +GLOBAL HIDDEN +10 sh1
+61: 0+14 +0 TLS +GLOBAL DEFAULT +10 sg6
+62: 0+18 +0 TLS +GLOBAL DEFAULT +10 sg7
+63: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _edata
+64: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
+65: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _end
+66: 0+44 +0 TLS +GLOBAL HIDDEN +10 sh2
+67: 0+54 +0 TLS +GLOBAL HIDDEN +10 sh6
+68: 0+64 +0 TLS +GLOBAL DEFAULT +11 bg2
+69: 0+60 +0 TLS +GLOBAL DEFAULT +11 bg1
+70: 0+6c +0 TLS +GLOBAL DEFAULT +11 bg4
+[0-9]+: 0+ +0 NOTYPE LOCAL DEFAULT UND
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +1
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +2
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +3
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +4
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +5
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +6
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +7
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +8
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +9
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +10
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +11
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +12
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +13
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +14
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +15
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +16
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +17
+[0-9]+: 0+20 +0 TLS +LOCAL DEFAULT +9 sl1
+[0-9]+: 0+24 +0 TLS +LOCAL DEFAULT +9 sl2
+[0-9]+: 0+28 +0 TLS +LOCAL DEFAULT +9 sl3
+[0-9]+: 0+2c +0 TLS +LOCAL DEFAULT +9 sl4
+[0-9]+: 0+30 +0 TLS +LOCAL DEFAULT +9 sl5
+[0-9]+: 0+34 +0 TLS +LOCAL DEFAULT +9 sl6
+[0-9]+: 0+38 +0 TLS +LOCAL DEFAULT +9 sl7
+[0-9]+: 0+3c +0 TLS +LOCAL DEFAULT +9 sl8
+[0-9]+: 0+80 +0 TLS +LOCAL DEFAULT +10 bl1
+[0-9]+: 0+84 +0 TLS +LOCAL DEFAULT +10 bl2
+[0-9]+: 0+88 +0 TLS +LOCAL DEFAULT +10 bl3
+[0-9]+: 0+8c +0 TLS +LOCAL DEFAULT +10 bl4
+[0-9]+: 0+90 +0 TLS +LOCAL DEFAULT +10 bl5
+[0-9]+: 0+94 +0 TLS +LOCAL DEFAULT +10 bl6
+[0-9]+: 0+98 +0 TLS +LOCAL DEFAULT +10 bl7
+[0-9]+: 0+9c +0 TLS +LOCAL DEFAULT +10 bl8
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sG3
+[0-9]+: 0+1c +0 TLS +GLOBAL DEFAULT +9 sg8
+[0-9]+: 0+7c +0 TLS +GLOBAL DEFAULT +10 bg8
+[0-9]+: 0+74 +0 TLS +GLOBAL DEFAULT +10 bg6
+[0-9]+: 0+68 +0 TLS +GLOBAL DEFAULT +10 bg3
+[0-9]+: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
+[0-9]+: 0+8 +0 TLS +GLOBAL DEFAULT +9 sg3
+[0-9]+: 0+48 +0 TLS +GLOBAL HIDDEN +9 sh3
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sG2
+[0-9]+: 0+c +0 TLS +GLOBAL DEFAULT +9 sg4
+[0-9]+: 0+10 +0 TLS +GLOBAL DEFAULT +9 sg5
+[0-9]+: 0+70 +0 TLS +GLOBAL DEFAULT +10 bg5
+[0-9]+: 0+58 +0 TLS +GLOBAL HIDDEN +9 sh7
+[0-9]+: 0+5c +0 TLS +GLOBAL HIDDEN +9 sh8
+[0-9]+: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT UND __tls_get_offset
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +9 sg1
+[0-9]+: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT +8 _start
+[0-9]+: 0+4c +0 TLS +GLOBAL HIDDEN +9 sh4
+[0-9]+: 0+78 +0 TLS +GLOBAL DEFAULT +10 bg7
+[0-9]+: 0+50 +0 TLS +GLOBAL HIDDEN +9 sh5
+[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS __bss_start
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sG6
+[0-9]+: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT +8 fn2
+[0-9]+: 0+4 +0 TLS +GLOBAL DEFAULT +9 sg2
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sG1
+[0-9]+: 0+40 +0 TLS +GLOBAL HIDDEN +9 sh1
+[0-9]+: 0+14 +0 TLS +GLOBAL DEFAULT +9 sg6
+[0-9]+: 0+18 +0 TLS +GLOBAL DEFAULT +9 sg7
+[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _edata
+[0-9]+: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
+[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _end
+[0-9]+: 0+44 +0 TLS +GLOBAL HIDDEN +9 sh2
+[0-9]+: 0+54 +0 TLS +GLOBAL HIDDEN +9 sh6
+[0-9]+: 0+64 +0 TLS +GLOBAL DEFAULT +10 bg2
+[0-9]+: 0+60 +0 TLS +GLOBAL DEFAULT +10 bg1
+[0-9]+: 0+6c +0 TLS +GLOBAL DEFAULT +10 bg4
6 changes: 3 additions & 3 deletions ld/testsuite/ld-s390/tlsbin.sd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
.*: file format elf32-s390

Contents of section .got:
40157c [0-9a-f]+ 00000000 00000000 [0-9a-f]+ .@...........@..
40158c ffffff88 00000000 ffffff68 ffffffa8 ...........h....
40159c 00000000 00000000 00000000 ............
[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 ............
12 changes: 6 additions & 6 deletions ld/testsuite/ld-s390/tlsbin.td
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
.*: file format elf32-s390

Contents of section .tdata:
40147c 00000011 00000012 00000013 00000014 .*
40148c 00000015 00000016 00000017 00000018 .*
40149c 00000041 00000042 00000043 00000044 .*
4014ac 00000045 00000046 00000047 00000048 .*
4014bc 00000101 00000102 00000103 00000104 .*
4014cc 00000105 00000106 00000107 00000108 .*
[0-9a-f]+ 00000011 00000012 00000013 00000014 .*
[0-9a-f]+ 00000015 00000016 00000017 00000018 .*
[0-9a-f]+ 00000041 00000042 00000043 00000044 .*
[0-9a-f]+ 00000045 00000046 00000047 00000048 .*
[0-9a-f]+ 00000101 00000102 00000103 00000104 .*
[0-9a-f]+ 00000105 00000106 00000107 00000108 .*
288 changes: 149 additions & 139 deletions ld/testsuite/ld-s390/tlsbin_64.dd

Large diffs are not rendered by default.

210 changes: 104 additions & 106 deletions ld/testsuite/ld-s390/tlsbin_64.rd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#readelf: -Ssrl
#target: s390x-*-*

There are 19 section headers, starting at offset 0x[0-9a-f]+:
There are 18 section headers, starting at offset 0x[0-9a-f]+:

Section Headers:
\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
Expand All @@ -17,35 +17,34 @@ Section Headers:
\[ 5\] .rela.dyn +.*
\[ 6\] .rela.plt +.*
\[ 7\] .plt +.*
\[ 8\] .text +PROGBITS +0+80000458 0+458 0+28c 00 +AX +0 +0 +4
\[ 9\] .data +.*
\[10\] .tdata +PROGBITS +0+800016e8 0+6e8 0+60 00 WAT +0 +0 +1
\[11\] .tbss +NOBITS +0+80001748 0+748 0+40 00 WAT +0 +0 +1
\[12\] .dynamic +DYNAMIC +0+80001748 0+748 0+140 10 +WA +4 +0 +8
\[13\] .got +PROGBITS +0+80001888 0+888 0+78 08 +WA +0 +0 +8
\[14\] .sbss +.*
\[15\] .bss +.*
\[16\] .shstrtab +.*
\[17\] .symtab +.*
\[18\] .strtab +.*
\[ 8\] .text +PROGBITS +.*
\[ 9\] .tdata +PROGBITS +0+80001720 0+720 0+60 00 WAT +0 +0 +32
\[10\] .tbss +NOBITS +0+80001780 0+780 0+40 00 WAT +0 +0 +1
\[11\] .dynamic +DYNAMIC +0+80001780 0+780 0+140 10 +WA +4 +0 +8
\[12\] .got +PROGBITS +0+800018c0 0+8c0 0+78 08 +WA +0 +0 +8
\[13\] .data +.*
\[14\] .bss +.*
\[15\] .shstrtab +.*
\[16\] .symtab +.*
\[17\] .strtab +.*
Key to Flags:
.*
.*
.*

Elf file type is EXEC \(Executable file\)
Entry point 0x80000644
Entry point 0x[0-9a-f]+
There are 6 program headers, starting at offset [0-9]+

Program Headers:
Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
PHDR +0x0+40 0x0+80000040 0x0+80000040 0x0+150 0x0+150 R E 0x8
INTERP +0x0+190 0x0+80000190 0x0+80000190 0x0+11 0x0+11 R +0x1
.*Requesting program interpreter.*
LOAD +0x0+ 0x0+80000000 0x0+80000000 0x0+6e4 0x0+6e4 R E 0x1000
LOAD +0x0+6e8 0x0+800016e8 0x0+800016e8 0x0+218 0x0+218 RW 0x1000
DYNAMIC +0x0+748 0x0+80001748 0x0+80001748 0x0+140 0x0+140 RW 0x8
TLS +0x0+6e8 0x0+800016e8 0x0+800016e8 0x0+60 0x0+a0 R +0x1
LOAD +0x0+ 0x0+80000000 0x0+80000000 0x0+720 0x0+720 R E 0x1000
LOAD +0x0+720 0x0+80001720 0x0+80001720 0x0+218 0x0+218 RW 0x1000
DYNAMIC +0x0+780 0x0+80001780 0x0+80001780 0x0+140 0x0+140 RW 0x8
TLS +0x0+720 0x0+80001720 0x0+80001720 0x0+60 0x0+a0 R +0x20

Section to Segment mapping:
Segment Sections...
Expand All @@ -56,101 +55,100 @@ Program Headers:
04 +.tbss .dynamic *
05 +.tdata .tbss *

Relocation section '.rela.dyn' at offset 0x[0-9a-z]+ contains 4 entries:
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
[0-9a-z]+ +0+10+38 R_390_TLS_TPOFF +0+ sG3 \+ 0
[0-9a-z]+ +0+30+38 R_390_TLS_TPOFF +0+ sG2 \+ 0
[0-9a-z]+ +0+60+38 R_390_TLS_TPOFF +0+ sG6 \+ 0
[0-9a-z]+ +0+70+38 R_390_TLS_TPOFF +0+ sG1 \+ 0
[0-9a-f]+ +0+10+38 R_390_TLS_TPOFF +0+ sG3 \+ 0
[0-9a-f]+ +0+30+38 R_390_TLS_TPOFF +0+ sG2 \+ 0
[0-9a-f]+ +0+60+38 R_390_TLS_TPOFF +0+ sG6 \+ 0
[0-9a-f]+ +0+70+38 R_390_TLS_TPOFF +0+ sG1 \+ 0

Relocation section '.rela.plt' at offset 0x40+ contains 1 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
[0-9a-z]+ +0+40+b R_390_JMP_SLOT +0+80+438 __tls_get_offset \+ 0
[0-9a-f]+ +0+40+b R_390_JMP_SLOT +0+80+438 __tls_get_offset \+ 0

Symbol table '.dynsym' contains 11 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+1: 0+ +0 TLS +GLOBAL DEFAULT +UND sG3
+2: [0-9a-z]+ +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+3: 0+ +0 TLS +GLOBAL DEFAULT +UND sG2
+4: [0-9a-z]+ +0 FUNC +GLOBAL DEFAULT +UND __tls_get_offset
+5: [0-9a-z]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+6: 0+ +0 TLS +GLOBAL DEFAULT +UND sG6
+7: 0+ +0 TLS +GLOBAL DEFAULT +UND sG1
+8: [0-9a-z]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+9: [0-9a-z]+ +0 OBJECT +GLOBAL DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+10: [0-9a-z]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND sG3
+[0-9]+: [0-9a-f]+ +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND sG2
+[0-9]+: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT +UND __tls_get_offset
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND sG6
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND sG1
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+[0-9]+: [0-9a-f]+ +0 OBJECT +GLOBAL DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end

Symbol table '.symtab' contains 71 entries:
Symbol table '.symtab' contains 70 entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+1: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +1
+2: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +2
+3: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +3
+4: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +4
+5: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +5
+6: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +6
+7: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +7
+8: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +8
+9: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +9
+10: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +10
+11: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +11
+12: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +12
+13: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +13
+14: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +14
+15: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +15
+16: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +16
+17: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +17
+18: [0-9a-z]+ +0 SECTION LOCAL +DEFAULT +18
+19: 0+20 +0 TLS +LOCAL +DEFAULT +10 sl1
+20: 0+24 +0 TLS +LOCAL +DEFAULT +10 sl2
+21: 0+28 +0 TLS +LOCAL +DEFAULT +10 sl3
+22: 0+2c +0 TLS +LOCAL +DEFAULT +10 sl4
+23: 0+30 +0 TLS +LOCAL +DEFAULT +10 sl5
+24: 0+34 +0 TLS +LOCAL +DEFAULT +10 sl6
+25: 0+38 +0 TLS +LOCAL +DEFAULT +10 sl7
+26: 0+3c +0 TLS +LOCAL +DEFAULT +10 sl8
+27: 0+80 +0 TLS +LOCAL +DEFAULT +11 bl1
+28: 0+84 +0 TLS +LOCAL +DEFAULT +11 bl2
+29: 0+88 +0 TLS +LOCAL +DEFAULT +11 bl3
+30: 0+8c +0 TLS +LOCAL +DEFAULT +11 bl4
+31: 0+90 +0 TLS +LOCAL +DEFAULT +11 bl5
+32: 0+94 +0 TLS +LOCAL +DEFAULT +11 bl6
+33: 0+98 +0 TLS +LOCAL +DEFAULT +11 bl7
+34: 0+9c +0 TLS +LOCAL +DEFAULT +11 bl8
+35: 0+ +0 TLS +GLOBAL DEFAULT +UND sG3
+36: 0+1c +0 TLS +GLOBAL DEFAULT +10 sg8
+37: 0+7c +0 TLS +GLOBAL DEFAULT +11 bg8
+38: 0+74 +0 TLS +GLOBAL DEFAULT +11 bg6
+39: 0+68 +0 TLS +GLOBAL DEFAULT +11 bg3
+40: [0-9a-z]+ +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+41: 0+8 +0 TLS +GLOBAL DEFAULT +10 sg3
+42: 0+48 +0 TLS +GLOBAL HIDDEN +10 sh3
+43: 0+ +0 TLS +GLOBAL DEFAULT +UND sG2
+44: 0+c +0 TLS +GLOBAL DEFAULT +10 sg4
+45: 0+10 +0 TLS +GLOBAL DEFAULT +10 sg5
+46: 0+70 +0 TLS +GLOBAL DEFAULT +11 bg5
+47: 0+58 +0 TLS +GLOBAL HIDDEN +10 sh7
+48: 0+5c +0 TLS +GLOBAL HIDDEN +10 sh8
+49: [0-9a-z]+ +0 FUNC +GLOBAL DEFAULT +UND __tls_get_offset
+50: 0+ +0 TLS +GLOBAL DEFAULT +10 sg1
+51: [0-9a-z]+ +0 FUNC +GLOBAL DEFAULT +8 _start
+52: 0+4c +0 TLS +GLOBAL HIDDEN +10 sh4
+53: 0+78 +0 TLS +GLOBAL DEFAULT +11 bg7
+54: 0+50 +0 TLS +GLOBAL HIDDEN +10 sh5
+55: [0-9a-z]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+56: 0+ +0 TLS +GLOBAL DEFAULT +UND sG6
+57: [0-9a-z]+ +0 FUNC +GLOBAL DEFAULT +8 fn2
+58: 0+4 +0 TLS +GLOBAL DEFAULT +10 sg2
+59: 0+ +0 TLS +GLOBAL DEFAULT +UND sG1
+60: 0+40 +0 TLS +GLOBAL HIDDEN +10 sh1
+61: 0+14 +0 TLS +GLOBAL DEFAULT +10 sg6
+62: 0+18 +0 TLS +GLOBAL DEFAULT +10 sg7
+63: [0-9a-z]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+64: [0-9a-z]+ +0 OBJECT +GLOBAL DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+65: 0+80+190+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+66: 0+44 +0 TLS +GLOBAL HIDDEN +10 sh2
+67: 0+54 +0 TLS +GLOBAL HIDDEN +10 sh6
+68: 0+64 +0 TLS +GLOBAL DEFAULT +11 bg2
+69: 0+60 +0 TLS +GLOBAL DEFAULT +11 bg1
+70: 0+6c +0 TLS +GLOBAL DEFAULT +11 bg4
+[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +1
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +2
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +3
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +4
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +5
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +6
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +7
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +8
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +9
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +10
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +11
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +12
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +13
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +14
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +16
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +17
+[0-9]+: 0+20 +0 TLS +LOCAL +DEFAULT +9 sl1
+[0-9]+: 0+24 +0 TLS +LOCAL +DEFAULT +9 sl2
+[0-9]+: 0+28 +0 TLS +LOCAL +DEFAULT +9 sl3
+[0-9]+: 0+2c +0 TLS +LOCAL +DEFAULT +9 sl4
+[0-9]+: 0+30 +0 TLS +LOCAL +DEFAULT +9 sl5
+[0-9]+: 0+34 +0 TLS +LOCAL +DEFAULT +9 sl6
+[0-9]+: 0+38 +0 TLS +LOCAL +DEFAULT +9 sl7
+[0-9]+: 0+3c +0 TLS +LOCAL +DEFAULT +9 sl8
+[0-9]+: 0+80 +0 TLS +LOCAL +DEFAULT +10 bl1
+[0-9]+: 0+84 +0 TLS +LOCAL +DEFAULT +10 bl2
+[0-9]+: 0+88 +0 TLS +LOCAL +DEFAULT +10 bl3
+[0-9]+: 0+8c +0 TLS +LOCAL +DEFAULT +10 bl4
+[0-9]+: 0+90 +0 TLS +LOCAL +DEFAULT +10 bl5
+[0-9]+: 0+94 +0 TLS +LOCAL +DEFAULT +10 bl6
+[0-9]+: 0+98 +0 TLS +LOCAL +DEFAULT +10 bl7
+[0-9]+: 0+9c +0 TLS +LOCAL +DEFAULT +10 bl8
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND sG3
+[0-9]+: 0+1c +0 TLS +GLOBAL DEFAULT +9 sg8
+[0-9]+: 0+7c +0 TLS +GLOBAL DEFAULT +10 bg8
+[0-9]+: 0+74 +0 TLS +GLOBAL DEFAULT +10 bg6
+[0-9]+: 0+68 +0 TLS +GLOBAL DEFAULT +10 bg3
+[0-9]+: [0-9a-f]+ +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
+[0-9]+: 0+8 +0 TLS +GLOBAL DEFAULT +9 sg3
+[0-9]+: 0+48 +0 TLS +GLOBAL HIDDEN +9 sh3
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND sG2
+[0-9]+: 0+c +0 TLS +GLOBAL DEFAULT +9 sg4
+[0-9]+: 0+10 +0 TLS +GLOBAL DEFAULT +9 sg5
+[0-9]+: 0+70 +0 TLS +GLOBAL DEFAULT +10 bg5
+[0-9]+: 0+58 +0 TLS +GLOBAL HIDDEN +9 sh7
+[0-9]+: 0+5c +0 TLS +GLOBAL HIDDEN +9 sh8
+[0-9]+: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT +UND __tls_get_offset
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +9 sg1
+[0-9]+: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT +8 _start
+[0-9]+: 0+4c +0 TLS +GLOBAL HIDDEN +9 sh4
+[0-9]+: 0+78 +0 TLS +GLOBAL DEFAULT +10 bg7
+[0-9]+: 0+50 +0 TLS +GLOBAL HIDDEN +9 sh5
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND sG6
+[0-9]+: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT +8 fn2
+[0-9]+: 0+4 +0 TLS +GLOBAL DEFAULT +9 sg2
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND sG1
+[0-9]+: 0+40 +0 TLS +GLOBAL HIDDEN +9 sh1
+[0-9]+: 0+14 +0 TLS +GLOBAL DEFAULT +9 sg6
+[0-9]+: 0+18 +0 TLS +GLOBAL DEFAULT +9 sg7
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata
+[0-9]+: [0-9a-f]+ +0 OBJECT +GLOBAL DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+[0-9]+: [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end
+[0-9]+: 0+44 +0 TLS +GLOBAL HIDDEN +9 sh2
+[0-9]+: 0+54 +0 TLS +GLOBAL HIDDEN +9 sh6
+[0-9]+: 0+64 +0 TLS +GLOBAL DEFAULT +10 bg2
+[0-9]+: 0+60 +0 TLS +GLOBAL DEFAULT +10 bg1
+[0-9]+: 0+6c +0 TLS +GLOBAL DEFAULT +10 bg4
16 changes: 8 additions & 8 deletions ld/testsuite/ld-s390/tlsbin_64.sd
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
.*: file format elf64-s390

Contents of section .got:
80001888 [0-9a-f]+ [0-9a-f]+ 00000000 00000000 .*
80001898 00000000 00000000 [0-9a-f]+ [0-9a-f]+ .*
800018a8 ffffffff ffffff88 00000000 00000000 .*
800018b8 00000000 00000000 ffffffff ffffff68 .*
800018c8 ffffffff ffffffa8 00000000 00000000 .*
800018d8 00000000 00000000 00000000 00000000 .*
800018e8 00000000 00000000 00000000 00000000 .*
800018f8 00000000 00000000 .*
[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 .*
12 changes: 6 additions & 6 deletions ld/testsuite/ld-s390/tlsbin_64.td
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
.*: file format elf64-s390

Contents of section .tdata:
800016e8 00000011 00000012 00000013 00000014 .*
800016f8 00000015 00000016 00000017 00000018 .*
80001708 00000041 00000042 00000043 00000044 .*
80001718 00000045 00000046 00000047 00000048 .*
80001728 00000101 00000102 00000103 00000104 .*
80001738 00000105 00000106 00000107 00000108 .*
[0-9a-f]+ 00000011 00000012 00000013 00000014 .*
[0-9a-f]+ 00000015 00000016 00000017 00000018 .*
[0-9a-f]+ 00000041 00000042 00000043 00000044 .*
[0-9a-f]+ 00000045 00000046 00000047 00000048 .*
[0-9a-f]+ 00000101 00000102 00000103 00000104 .*
[0-9a-f]+ 00000105 00000106 00000107 00000108 .*
2 changes: 2 additions & 0 deletions ld/testsuite/ld-s390/tlsbinpic.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.section ".tdata", "awT", @progbits
.balign 32
.globl sg1, sg2, sg3, sg4, sg5, sg6, sg7, sg8
.globl sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8
.hidden sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8
Expand Down Expand Up @@ -30,6 +31,7 @@ sh8: .long 264
.text
.globl fn2
.type fn2,@function
.balign 64
fn2:
/* Function prolog */
stm %r6,%r14,24(%r15)
Expand Down
2 changes: 2 additions & 0 deletions ld/testsuite/ld-s390/tlsbinpic_64.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.section ".tdata", "awT", @progbits
.balign 32
.globl sg1, sg2, sg3, sg4, sg5, sg6, sg7, sg8
.globl sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8
.hidden sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8
Expand Down Expand Up @@ -30,6 +31,7 @@ sh8: .long 264
.text
.globl fn2
.type fn2,@function
.balign 64
fn2:
/* Function prolog */
stmg %r6,%r14,48(%r15)
Expand Down
228 changes: 128 additions & 100 deletions ld/testsuite/ld-s390/tlspic.dd
Original file line number Diff line number Diff line change
Expand Up @@ -9,153 +9,181 @@

Disassembly of section .text:

0+4bc <fn1>:
0+[0-9a-f]+ <fn1>:
# function prolog
+4bc: 90 6e f0 18 stm %r6,%r14,24\(%r15\)
+4c0: a7 d5 00 30 bras %r13,520 <fn1\+0x64>
+[0-9a-f]+: 90 6e f0 18 stm %r6,%r14,24\(%r15\)
+[0-9a-f]+: a7 d5 00 30 bras %r13,[0-9a-f]+ <fn1\+0x64>
# _GLOBAL_OFFSET_TABLE_-.LT1
+4c4: 00 00 12 78 .long 0x00001278
+[0-9a-f]+: [0-9a-f ]+ .long 0x[0-9a-f]+
# __tls_get_addr@plt-.LT1
+4c8: ff ff ff d8 .long 0xffffffd8
+[0-9a-f]+: [0-9a-f ]+ .long 0x[0-9a-f]+
# sg1@tlsgd
+4cc: 00 00 00 38 .long 0x00000038
+[0-9a-f]+: 00 00 00 38 .long 0x00000038
# sg2@tlsgd
+4d0: 00 00 00 48 .long 0x00000048
+[0-9a-f]+: 00 00 00 48 .long 0x00000048
# sl1@tlsgd
+4d4: 00 00 00 10 .long 0x00000010
+[0-9a-f]+: 00 00 00 10 .long 0x00000010
# sl2@tlsgd
+4d8: 00 00 00 18 .long 0x00000018
+[0-9a-f]+: 00 00 00 18 .long 0x00000018
# sh1@tlsgd
+4dc: 00 00 00 4c .long 0x0000004c
+[0-9a-f]+: 00 00 00 4c .long 0x0000004c
# sh2@tlsgd
+4e0: 00 00 00 54 .long 0x00000054
+[0-9a-f]+: 00 00 00 54 .long 0x00000054
# sH1@tlsgd
+4e4: 00 00 00 28 .long 0x00000028
+[0-9a-f]+: 00 00 00 28 .long 0x00000028
# sH2@tlsgd
+4e8: 00 00 00 30 .long 0x00000030
+[0-9a-f]+: 00 00 00 30 .long 0x00000030
# sl1@tlsldm
+4ec: 00 00 00 20 .long 0x00000020
+[0-9a-f]+: 00 00 00 20 .long 0x00000020
# sl1@dtpoff
+4f0: 00 00 00 20 .long 0x00000020
+[0-9a-f]+: 00 00 00 20 .long 0x00000020
# sl2@dtpoff
+4f4: 00 00 00 24 .long 0x00000024
+[0-9a-f]+: 00 00 00 24 .long 0x00000024
# sh1@tlsldm
+4f8: 00 00 00 20 .long 0x00000020
+[0-9a-f]+: 00 00 00 20 .long 0x00000020
# sh1@dtpoff
+4fc: 00 00 00 40 .long 0x00000040
+[0-9a-f]+: 00 00 00 40 .long 0x00000040
# sh2@dtpoff
+500: 00 00 00 44 .long 0x00000044
+[0-9a-f]+: 00 00 00 44 .long 0x00000044
# sH1@tlsldm
+504: 00 00 00 20 .long 0x00000020
+[0-9a-f]+: 00 00 00 20 .long 0x00000020
# sH1@dtpoff
+508: 00 00 00 60 .long 0x00000060
+[0-9a-f]+: 00 00 00 60 .long 0x00000060
# sH2@dtpoff
+50c: 00 00 00 64 .long 0x00000064
+[0-9a-f]+: 00 00 00 64 .long 0x00000064
# sg2@gotntpoff
+510: 00 00 00 48 .long 0x00000048
+[0-9a-f]+: 00 00 00 48 .long 0x00000048
# sl2@gotntpoff
+514: 00 00 00 18 .long 0x00000018
+[0-9a-f]+: 00 00 00 18 .long 0x00000018
# sh2@gotntpoff
+518: 00 00 00 54 .long 0x00000054
+[0-9a-f]+: 00 00 00 54 .long 0x00000054
# sH2@gotntpoff
+51c: 00 00 00 30 .long 0x00000030
+[0-9a-f]+: 00 00 00 30 .long 0x00000030
# function prolog
+520: 18 ef lr %r14,%r15
+522: 58 c0 d0 00 l %r12,0\(%r13\)
+526: a7 fa ff a0 ahi %r15,-96
+52a: 41 cc d0 00 la %r12,0\(%r12,%r13\)
+52e: 50 e0 e0 00 st %r14,0\(%r14\)
+[0-9a-f]+: 18 ef lr %r14,%r15
+[0-9a-f]+: 58 c0 d0 00 l %r12,0\(%r13\)
+[0-9a-f]+: a7 fa ff a0 ahi %r15,-96
+[0-9a-f]+: 41 cc d0 00 la %r12,0\(%r12,%r13\)
+[0-9a-f]+: 50 e0 e0 00 st %r14,0\(%r14\)
# Extract TCB and load branch offset
+532: b2 4f 00 90 ear %r9,%a0
+536: 58 70 d0 04 l %r7,4\(%r13\)
+[0-9a-f]+: b2 4f 00 90 ear %r9,%a0
+[0-9a-f]+: 58 70 d0 04 l %r7,4\(%r13\)
# GD
+53a: 58 20 d0 08 l %r2,8\(%r13\)
+53e: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+542: 41 22 90 00 la %r2,0\(%r2,%r9\)
+[0-9a-f]+: 58 20 d0 08 l %r2,8\(%r13\)
+[0-9a-f]+: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+[0-9a-f]+: 41 22 90 00 la %r2,0\(%r2,%r9\)
# GD -> IE because variable is referenced through IE too
+546: 58 20 d0 0c l %r2,12\(%r13\)
+54a: 58 22 c0 00 l %r2,0\(%r2,%r12\)
+54e: 41 22 90 00 la %r2,0\(%r2,%r9\)
+[0-9a-f]+: 58 20 d0 0c l %r2,12\(%r13\)
+[0-9a-f]+: 58 22 c0 00 l %r2,0\(%r2,%r12\)
+[0-9a-f]+: 41 22 90 00 la %r2,0\(%r2,%r9\)
# GD against local variable
+552: 58 20 d0 10 l %r2,16\(%r13\)
+556: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+55a: 41 22 90 00 la %r2,0\(%r2,%r9\)
+[0-9a-f]+: 58 20 d0 10 l %r2,16\(%r13\)
+[0-9a-f]+: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+[0-9a-f]+: 41 22 90 00 la %r2,0\(%r2,%r9\)
# GD -> IE against local variable referenced through IE too
+55e: 58 20 d0 14 l %r2,20\(%r13\)
+562: 58 22 c0 00 l %r2,0\(%r2,%r12\)
+566: 41 22 90 00 la %r2,0\(%r2,%r9\)
+[0-9a-f]+: 58 20 d0 14 l %r2,20\(%r13\)
+[0-9a-f]+: 58 22 c0 00 l %r2,0\(%r2,%r12\)
+[0-9a-f]+: 41 22 90 00 la %r2,0\(%r2,%r9\)
# GD against hidden and local variable
+56a: 58 20 d0 18 l %r2,24\(%r13\)
+56e: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+572: 41 22 90 00 la %r2,0\(%r2,%r9\)
+[0-9a-f]+: 58 20 d0 18 l %r2,24\(%r13\)
+[0-9a-f]+: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+[0-9a-f]+: 41 22 90 00 la %r2,0\(%r2,%r9\)
# GD -> IE against hidden and local variable referenced through
# IE too
+576: 58 20 d0 1c l %r2,28\(%r13\)
+57a: 58 22 c0 00 l %r2,0\(%r2,%r12\)
+57e: 41 22 90 00 la %r2,0\(%r2,%r9\)
+[0-9a-f]+: 58 20 d0 1c l %r2,28\(%r13\)
+[0-9a-f]+: 58 22 c0 00 l %r2,0\(%r2,%r12\)
+[0-9a-f]+: 41 22 90 00 la %r2,0\(%r2,%r9\)
# GD against hidden but not local variable
+582: 58 20 d0 20 l %r2,32\(%r13\)
+586: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+58a: 41 22 90 00 la %r2,0\(%r2,%r9\)
+[0-9a-f]+: 58 20 d0 20 l %r2,32\(%r13\)
+[0-9a-f]+: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+[0-9a-f]+: 41 22 90 00 la %r2,0\(%r2,%r9\)
# GD -> IE against hidden but not local variable referenced through
# IE too
+58e: 58 20 d0 24 l %r2,36\(%r13\)
+592: 58 22 c0 00 l %r2,0\(%r2,%r12\)
+596: 41 22 90 00 la %r2,0\(%r2,%r9\)
+[0-9a-f]+: 58 20 d0 24 l %r2,36\(%r13\)
+[0-9a-f]+: 58 22 c0 00 l %r2,0\(%r2,%r12\)
+[0-9a-f]+: 41 22 90 00 la %r2,0\(%r2,%r9\)
# LD
+59a: 58 20 d0 28 l %r2,40\(%r13\)
+59e: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+5a2: 41 32 90 00 la %r3,0\(%r2,%r9\)
+5a6: 58 40 d0 2c l %r4,44\(%r13\)
+5aa: 41 54 30 00 la %r5,0\(%r4,%r3\)
+5ae: 58 40 d0 30 l %r4,48\(%r13\)
+5b2: 41 54 30 00 la %r5,0\(%r4,%r3\)
+[0-9a-f]+: 58 20 d0 28 l %r2,40\(%r13\)
+[0-9a-f]+: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+[0-9a-f]+: 41 32 90 00 la %r3,0\(%r2,%r9\)
+[0-9a-f]+: 58 40 d0 2c l %r4,44\(%r13\)
+[0-9a-f]+: 41 54 30 00 la %r5,0\(%r4,%r3\)
+[0-9a-f]+: 58 40 d0 30 l %r4,48\(%r13\)
+[0-9a-f]+: 41 54 30 00 la %r5,0\(%r4,%r3\)
# LD against hidden and local variables
+5b6: 58 20 d0 34 l %r2,52\(%r13\)
+5ba: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+5be: 41 32 90 00 la %r3,0\(%r2,%r9\)
+5c2: 58 40 d0 38 l %r4,56\(%r13\)
+5c6: 41 54 30 00 la %r5,0\(%r4,%r3\)
+5ca: 58 40 d0 34 l %r4,52\(%r13\)
+5ce: 41 55 30 00 la %r5,0\(%r5,%r3\)
+[0-9a-f]+: 58 20 d0 34 l %r2,52\(%r13\)
+[0-9a-f]+: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+[0-9a-f]+: 41 32 90 00 la %r3,0\(%r2,%r9\)
+[0-9a-f]+: 58 40 d0 38 l %r4,56\(%r13\)
+[0-9a-f]+: 41 54 30 00 la %r5,0\(%r4,%r3\)
+[0-9a-f]+: 58 40 d0 34 l %r4,52\(%r13\)
+[0-9a-f]+: 41 55 30 00 la %r5,0\(%r5,%r3\)
# LD against hidden but not local variables
+5d2: 58 20 d0 40 l %r2,64\(%r13\)
+5d6: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+5da: 41 32 90 00 la %r3,0\(%r2,%r9\)
+5de: 58 30 d0 44 l %r3,68\(%r13\)
+5e2: 41 54 30 00 la %r5,0\(%r4,%r3\)
+5e6: 58 40 d0 48 l %r4,72\(%r13\)
+5ea: 41 54 30 00 la %r5,0\(%r4,%r3\)
+[0-9a-f]+: 58 20 d0 40 l %r2,64\(%r13\)
+[0-9a-f]+: 4d e7 d0 00 bas %r14,0\(%r7,%r13\)
+[0-9a-f]+: 41 32 90 00 la %r3,0\(%r2,%r9\)
+[0-9a-f]+: 58 30 d0 44 l %r3,68\(%r13\)
+[0-9a-f]+: 41 54 30 00 la %r5,0\(%r4,%r3\)
+[0-9a-f]+: 58 40 d0 48 l %r4,72\(%r13\)
+[0-9a-f]+: 41 54 30 00 la %r5,0\(%r4,%r3\)
# IE against global var
+5ee: 58 30 d0 4c l %r3,76\(%r13\)
+5f2: 58 33 c0 00 l %r3,0\(%r3,%r12\)
+5f6: 41 33 30 00 la %r3,0\(%r3,%r3\)
+[0-9a-f]+: 58 30 d0 4c l %r3,76\(%r13\)
+[0-9a-f]+: 58 33 c0 00 l %r3,0\(%r3,%r12\)
+[0-9a-f]+: 41 33 30 00 la %r3,0\(%r3,%r3\)
# IE against local var
+5fa: 58 30 d0 50 l %r3,80\(%r13\)
+5fe: 58 43 c0 00 l %r4,0\(%r3,%r12\)
+602: 41 54 30 00 la %r5,0\(%r4,%r3\)
+[0-9a-f]+: 58 30 d0 50 l %r3,80\(%r13\)
+[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 hidden and local var
+606: 58 30 d0 54 l %r3,84\(%r13\)
+60a: 58 43 c0 00 l %r4,0\(%r3,%r12\)
+60e: 41 54 30 00 la %r5,0\(%r4,%r3\)
+[0-9a-f]+: 58 30 d0 54 l %r3,84\(%r13\)
+[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 hidden but not local var
+612: 58 30 d0 58 l %r3,88\(%r13\)
+616: 58 43 c0 00 l %r4,0\(%r3,%r12\)
+61a: 41 54 30 00 la %r5,0\(%r4,%r3\)
+[0-9a-f]+: 58 30 d0 58 l %r3,88\(%r13\)
+[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)
+61e: 58 30 c0 34 l %r3,52\(%r12\)
+622: 41 33 90 00 la %r3,0\(%r3,%r9\)
+[0-9a-f]+: 58 30 c0 34 l %r3,52\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# IE against local var with small got access (no optimization)
+626: 58 30 c0 1c l %r3,28\(%r12\)
+62a: 41 33 90 00 la %r3,0\(%r3,%r9\)
+[0-9a-f]+: 58 30 c0 1c l %r3,28\(%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)
+62e: 58 30 c0 40 l %r3,64\(%r12\)
+632: 41 33 90 00 la %r3,0\(%r3,%r9\)
+[0-9a-f]+: 58 30 c0 40 l %r3,64\(%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)
+636: 58 30 c0 44 l %r3,68\(%r12\)
+63a: 41 33 90 00 la %r3,0\(%r3,%r9\)
+[0-9a-f]+: 58 30 c0 44 l %r3,68\(%r12\)
+[0-9a-f]+: 41 33 90 00 la %r3,0\(%r3,%r9\)
# function prolog
+63e: 98 6e f0 78 lm %r6,%r14,120\(%r15\)
+642: 07 fe br %r14
+[0-9a-f]+: 98 6e f0 78 lm %r6,%r14,120\(%r15\)
+[0-9a-f]+: 07 fe br %r14
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
+[0-9a-f]+: 07 07 bcr 0,%r7
211 changes: 100 additions & 111 deletions ld/testsuite/ld-s390/tlspic.rd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#readelf: -Ssrl
#target: s390-*-*

There are 18 section headers, starting at offset 0x[0-9a-f]+:
There are 17 section headers, starting at offset 0x[0-9a-f]+:

Section Headers:
\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
Expand All @@ -16,32 +16,31 @@ Section Headers:
\[ 4\] .rela.dyn +.*
\[ 5\] .rela.plt +.*
\[ 6\] .plt +.*
\[ 7\] .text +PROGBITS +0+4bc 0+4bc 0+188 00 AX 0 +0 4
\[ 8\] .data +.*
\[ 9\] .tdata +PROGBITS +0+1644 0+644 0+60 00 WAT 0 +0 1
\[10\] .tbss +NOBITS +0+16a4 0+6a4 0+20 00 WAT 0 +0 1
\[11\] .dynamic +DYNAMIC +0+16a4 0+6a4 0+98 08 WA 3 +0 4
\[12\] .got +PROGBITS +0+173c 0+73c 0+58 04 WA 0 +0 4
\[13\] .sbss +.*
\[14\] .bss +.*
\[15\] .shstrtab +.*
\[16\] .symtab +.*
\[17\] .strtab +.*
\[ 7\] .text +PROGBITS +.*
\[ 8\] .tdata +PROGBITS +0+1600 0+600 0+60 00 WAT 0 +0 32
\[ 9\] .tbss +NOBITS +0+1660 0+660 0+20 00 WAT 0 +0 1
\[10\] .dynamic +DYNAMIC +0+1660 0+660 0+98 08 WA 3 +0 4
\[11\] .got +PROGBITS +0+16f8 0+6f8 0+58 04 WA 0 +0 4
\[12\] .data +.*
\[13\] .bss +.*
\[14\] .shstrtab +.*
\[15\] .symtab +.*
\[16\] .strtab +.*
Key to Flags:
.*
.*
.*

Elf file type is DYN \(Shared object file\)
Entry point 0x4bc
Entry point 0x[0-9a-f]+
There are 4 program headers, starting at offset [0-9]+

Program Headers:
Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz Flg Align
LOAD +0x0+ 0x0+ 0x0+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x1000
LOAD +0x0+644 0x0+1644 0x0+1644 0x00150 0x00150 RW 0x1000
DYNAMIC +0x0+6a4 0x0+16a4 0x0+16a4 0x0+98 0x0+98 RW 0x4
TLS +0x0+644 0x0+1644 0x0+1644 0x0+60 0x0+80 R +0x1
LOAD +0x0+600 0x0+1600 0x0+1600 0x00150 0x00150 RW 0x1000
DYNAMIC +0x0+660 0x0+1660 0x0+1660 0x0+98 0x0+98 RW 0x4
TLS +0x0+600 0x0+1600 0x0+1600 0x0+60 0x0+80 R +0x20

Section to Segment mapping:
Segment Sections...
Expand All @@ -50,7 +49,7 @@ Program Headers:
+02 +.tbss .dynamic
+03 +.tdata .tbss

Relocation section '.rela.dyn' at offset 0x3c8 contains 14 entries:
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
Offset +Info +Type +Sym.Value Sym. Name \+ Addend
[0-9a-f]+ 0+36 R_390_TLS_DTPMOD +0+
[0-9a-f]+ 0+38 R_390_TLS_TPOFF +0+24
Expand All @@ -62,104 +61,94 @@ Relocation section '.rela.dyn' at offset 0x3c8 contains 14 entries:
[0-9a-f]+ 0+38 R_390_TLS_TPOFF +0+70
[0-9a-f]+ 0+36 R_390_TLS_DTPMOD +0+
[0-9a-f]+ 0+38 R_390_TLS_TPOFF +0+44
[0-9a-f]+ 0+1338 R_390_TLS_TPOFF +0+10 +sg5 \+ 0
[0-9a-f]+ 0+1536 R_390_TLS_DTPMOD 0+ +sg1 \+ 0
[0-9a-f]+ 0+1537 R_390_TLS_DTPOFF 0+ +sg1 \+ 0
[0-9a-f]+ 0+1838 R_390_TLS_TPOFF +0+4 +sg2 \+ 0
[0-9a-f]+ 0+a38 R_390_TLS_TPOFF +0+10 +sg5 \+ 0
[0-9a-f]+ 0+c36 R_390_TLS_DTPMOD 0+ +sg1 \+ 0
[0-9a-f]+ 0+c37 R_390_TLS_DTPOFF 0+ +sg1 \+ 0
[0-9a-f]+ 0+f38 R_390_TLS_TPOFF +0+4 +sg2 \+ 0

Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entries:
Offset +Info +Type +Sym.Value Sym. Name \+ Addend
[0-9a-f]+ 0+140b R_390_JMP_SLOT +0+ +__tls_get_offset \+ 0
[0-9a-f]+ 0+b0b R_390_JMP_SLOT +0+ +__tls_get_offset \+ 0

Symbol table '.dynsym' contains 30 entries:
Symbol table '.dynsym' contains 21 entries:
+Num: +Value Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 NOTYPE LOCAL DEFAULT UND
+1: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +1
+2: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +2
+3: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +3
+4: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +4
+5: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +5
+6: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +6
+7: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +7
+8: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +8
+9: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +9
+10: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +10
+11: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +11
+12: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +12
+13: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +13
+14: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +14
+15: 0+1c +0 TLS +GLOBAL DEFAULT +9 sg8
+16: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
+17: 0+8 +0 TLS +GLOBAL DEFAULT +9 sg3
+18: 0+c +0 TLS +GLOBAL DEFAULT +9 sg4
+19: 0+10 +0 TLS +GLOBAL DEFAULT +9 sg5
+20: 0+ +0 NOTYPE GLOBAL DEFAULT UND __tls_get_offset
+21: 0+ +0 TLS +GLOBAL DEFAULT +9 sg1
+22: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT +7 fn1
+23: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS __bss_start
+24: 0+4 +0 TLS +GLOBAL DEFAULT +9 sg2
+25: 0+14 +0 TLS +GLOBAL DEFAULT +9 sg6
+26: 0+18 +0 TLS +GLOBAL DEFAULT +9 sg7
+27: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _edata
+28: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
+29: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _end
+[0-9]+: 0+ +0 NOTYPE LOCAL DEFAULT UND
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +7
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +8
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +9
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +12
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +13
+[0-9]+: 0+1c +0 TLS +GLOBAL DEFAULT +8 sg8
+[0-9]+: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
+[0-9]+: 0+8 +0 TLS +GLOBAL DEFAULT +8 sg3
+[0-9]+: 0+c +0 TLS +GLOBAL DEFAULT +8 sg4
+[0-9]+: 0+10 +0 TLS +GLOBAL DEFAULT +8 sg5
+[0-9]+: 0+ +0 NOTYPE GLOBAL DEFAULT UND __tls_get_offset
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +8 sg1
+[0-9]+: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT +7 fn1
+[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS __bss_start
+[0-9]+: 0+4 +0 TLS +GLOBAL DEFAULT +8 sg2
+[0-9]+: 0+14 +0 TLS +GLOBAL DEFAULT +8 sg6
+[0-9]+: 0+18 +0 TLS +GLOBAL DEFAULT +8 sg7
+[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _edata
+[0-9]+: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
+[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _end

Symbol table '.symtab' contains 57 entries:
Symbol table '.symtab' contains 56 entries:
+Num: +Value Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 NOTYPE LOCAL DEFAULT UND
+1: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +1
+2: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +2
+3: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +3
+4: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +4
+5: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +5
+6: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +6
+7: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +7
+8: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +8
+9: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +9
+10: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +10
+11: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +11
+12: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +12
+13: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +13
+14: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +14
+15: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +15
+16: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +16
+17: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +17
+18: 0+20 +0 TLS +LOCAL DEFAULT +9 sl1
+19: 0+24 +0 TLS +LOCAL DEFAULT +9 sl2
+20: 0+28 +0 TLS +LOCAL DEFAULT +9 sl3
+21: 0+2c +0 TLS +LOCAL DEFAULT +9 sl4
+22: 0+30 +0 TLS +LOCAL DEFAULT +9 sl5
+23: 0+34 +0 TLS +LOCAL DEFAULT +9 sl6
+24: 0+38 +0 TLS +LOCAL DEFAULT +9 sl7
+25: 0+3c +0 TLS +LOCAL DEFAULT +9 sl8
+26: 0+60 +0 TLS +LOCAL HIDDEN +10 sH1
+27: 0+48 +0 TLS +LOCAL HIDDEN +9 sh3
+28: 0+64 +0 TLS +LOCAL HIDDEN +10 sH2
+29: 0+78 +0 TLS +LOCAL HIDDEN +10 sH7
+30: 0+58 +0 TLS +LOCAL HIDDEN +9 sh7
+31: 0+5c +0 TLS +LOCAL HIDDEN +9 sh8
+32: 0+6c +0 TLS +LOCAL HIDDEN +10 sH4
+33: 0+4c +0 TLS +LOCAL HIDDEN +9 sh4
+34: 0+68 +0 TLS +LOCAL HIDDEN +10 sH3
+35: 0+50 +0 TLS +LOCAL HIDDEN +9 sh5
+36: 0+70 +0 TLS +LOCAL HIDDEN +10 sH5
+37: 0+74 +0 TLS +LOCAL HIDDEN +10 sH6
+38: 0+7c +0 TLS +LOCAL HIDDEN +10 sH8
+39: 0+40 +0 TLS +LOCAL HIDDEN +9 sh1
+40: 0+44 +0 TLS +LOCAL HIDDEN +9 sh2
+41: 0+54 +0 TLS +LOCAL HIDDEN +9 sh6
+42: 0+1c +0 TLS +GLOBAL DEFAULT +9 sg8
+43: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
+44: 0+8 +0 TLS +GLOBAL DEFAULT +9 sg3
+45: 0+c +0 TLS +GLOBAL DEFAULT +9 sg4
+46: 0+10 +0 TLS +GLOBAL DEFAULT +9 sg5
+47: 0+ +0 NOTYPE GLOBAL DEFAULT UND __tls_get_offset
+48: 0+ +0 TLS +GLOBAL DEFAULT +9 sg1
+49: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT +7 fn1
+50: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS __bss_start
+51: 0+4 +0 TLS +GLOBAL DEFAULT +9 sg2
+52: 0+14 +0 TLS +GLOBAL DEFAULT +9 sg6
+53: 0+18 +0 TLS +GLOBAL DEFAULT +9 sg7
+54: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _edata
+55: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
+56: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _end
+[0-9]+: 0+ +0 NOTYPE LOCAL DEFAULT UND
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +1
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +2
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +3
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +4
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +5
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +6
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +7
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +8
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +9
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +10
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +11
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +12
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +13
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +14
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +15
+[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +16
+[0-9]+: 0+20 +0 TLS +LOCAL DEFAULT +8 sl1
+[0-9]+: 0+24 +0 TLS +LOCAL DEFAULT +8 sl2
+[0-9]+: 0+28 +0 TLS +LOCAL DEFAULT +8 sl3
+[0-9]+: 0+2c +0 TLS +LOCAL DEFAULT +8 sl4
+[0-9]+: 0+30 +0 TLS +LOCAL DEFAULT +8 sl5
+[0-9]+: 0+34 +0 TLS +LOCAL DEFAULT +8 sl6
+[0-9]+: 0+38 +0 TLS +LOCAL DEFAULT +8 sl7
+[0-9]+: 0+3c +0 TLS +LOCAL DEFAULT +8 sl8
+[0-9]+: 0+60 +0 TLS +LOCAL HIDDEN +9 sH1
+[0-9]+: 0+48 +0 TLS +LOCAL HIDDEN +8 sh3
+[0-9]+: 0+64 +0 TLS +LOCAL HIDDEN +9 sH2
+[0-9]+: 0+78 +0 TLS +LOCAL HIDDEN +9 sH7
+[0-9]+: 0+58 +0 TLS +LOCAL HIDDEN +8 sh7
+[0-9]+: 0+5c +0 TLS +LOCAL HIDDEN +8 sh8
+[0-9]+: 0+6c +0 TLS +LOCAL HIDDEN +9 sH4
+[0-9]+: 0+4c +0 TLS +LOCAL HIDDEN +8 sh4
+[0-9]+: 0+68 +0 TLS +LOCAL HIDDEN +9 sH3
+[0-9]+: 0+50 +0 TLS +LOCAL HIDDEN +8 sh5
+[0-9]+: 0+70 +0 TLS +LOCAL HIDDEN +9 sH5
+[0-9]+: 0+74 +0 TLS +LOCAL HIDDEN +9 sH6
+[0-9]+: 0+7c +0 TLS +LOCAL HIDDEN +9 sH8
+[0-9]+: 0+40 +0 TLS +LOCAL HIDDEN +8 sh1
+[0-9]+: 0+44 +0 TLS +LOCAL HIDDEN +8 sh2
+[0-9]+: 0+54 +0 TLS +LOCAL HIDDEN +8 sh6
+[0-9]+: 0+1c +0 TLS +GLOBAL DEFAULT +8 sg8
+[0-9]+: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
+[0-9]+: 0+8 +0 TLS +GLOBAL DEFAULT +8 sg3
+[0-9]+: 0+c +0 TLS +GLOBAL DEFAULT +8 sg4
+[0-9]+: 0+10 +0 TLS +GLOBAL DEFAULT +8 sg5
+[0-9]+: 0+ +0 NOTYPE GLOBAL DEFAULT UND __tls_get_offset
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +8 sg1
+[0-9]+: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT +7 fn1
+[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS __bss_start
+[0-9]+: 0+4 +0 TLS +GLOBAL DEFAULT +8 sg2
+[0-9]+: 0+14 +0 TLS +GLOBAL DEFAULT +8 sg6
+[0-9]+: 0+18 +0 TLS +GLOBAL DEFAULT +8 sg7
+[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _edata
+[0-9]+: [0-9a-f]+ +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
+[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _end
12 changes: 6 additions & 6 deletions ld/testsuite/ld-s390/tlspic.sd
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
.*: +file format elf32-s390

Contents of section .got:
173c [0-9a-f]+ 00000000 00000000 [0-9a-f]+ .*
174c 00000000 00000020 00000000 00000000 .*
175c 00000000 00000000 00000000 00000060 .*
176c 00000000 00000000 00000000 00000000 .*
177c 00000000 00000000 00000000 00000000 .*
178c 00000040 00000000 +.*
[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 .*
[0-9a-f]+ 00000000 00000000 00000000 00000000 .*
[0-9a-f]+ 00000040 00000000 +.*
12 changes: 6 additions & 6 deletions ld/testsuite/ld-s390/tlspic.td
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
.*: +file format elf32-s390

Contents of section .tdata:
1644 00000011 00000012 00000013 00000014 .*
1654 00000015 00000016 00000017 00000018 .*
1664 00000041 00000042 00000043 00000044 .*
1674 00000045 00000046 00000047 00000048 .*
1684 00000101 00000102 00000103 00000104 .*
1694 00000105 00000106 00000107 00000108 .*
[0-9a-f]+ 00000011 00000012 00000013 00000014 .*
[0-9a-f]+ 00000015 00000016 00000017 00000018 .*
[0-9a-f]+ 00000041 00000042 00000043 00000044 .*
[0-9a-f]+ 00000045 00000046 00000047 00000048 .*
[0-9a-f]+ 00000101 00000102 00000103 00000104 .*
[0-9a-f]+ 00000105 00000106 00000107 00000108 .*
2 changes: 2 additions & 0 deletions ld/testsuite/ld-s390/tlspic1.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.section ".tdata", "awT", @progbits
.balign 32
.globl sg1, sg2, sg3, sg4, sg5, sg6, sg7, sg8
.globl sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8
.hidden sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8
Expand Down Expand Up @@ -29,6 +30,7 @@ sh8: .long 264
.text
.globl fn1
.type fn1,@function
.balign 64
fn1:
/* Funtion prolog */
stm %r6,%r14,24(%r15)
Expand Down
Loading