summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-05-11 17:08:38 +0000
committerJakub Jelinek <jakub@redhat.com>2004-05-11 17:08:38 +0000
commit8c37241be3b1baf394090269b4b67babceb83d61 (patch)
tree83cc2b841784fdfedf486e1d40f8352833c1622c /ld/testsuite/ld-x86-64
parent42edda508ef24ada777099d51f200a3b674a1724 (diff)
bfd/
* elflink.c (elf_bfd_final_link): Don't output STT_SECTION symbol into .dynsym if elf_section_data (sec)->dynindx <= 0. Adjust counting of last_local. (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt created by the linker nor !SHF_ALLOC. * elf32-i386.c (elf_i386_finish_dynamic_sections): Point DT_PLTGOT to the start of the .got.plt section instead of the .got output section. Set sh_entsize for .got section in addition to .got.plt. (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_ is at sgot->output_section->vma. * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point DT_PLTGOT to the start of the .got.plt section instead of the .got output section. (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_ is at sgot->output_section->vma. Set sh_entsize for .got section in addition to .got.plt. * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO. (bfd_section_from_phdr): Likewise. (map_sections_to_segments): Likewise. (assign_file_positions_for_segments): Likewise. (get_program_header_size): Likewise. * elflink.c (bfd_elf_size_dynamic_sections): Set elf_tdata (output_bfd)->relro from info->relro. * elf-bfd.h (struct elf_obj_tdata): Add relro field. include/ * bfdlink.h (struct bfd_link_info): Add relro, relro_start and relro_end fields. * elf/common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments. (PT_GNU_RELRO): Define. binutils/ * readelf.c (get_segment_type): Handle PT_GNU_RELRO. ld/ * genscripts.sh: Generate -z combreloc -z now -z relro scripts for binaries, -shared and -pie. * emulparams/elf_i386.sh (SEPARATE_GOTPLT): Set. * emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Set. * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Rename to... (OTHER_RELRO_SECTIONS): ... this. * ldlex.l (DATA_SEGMENT_RELRO_END): Add. * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle -z relro and -z norelro. (gld${EMULATION_NAME}_list_options): Add it to usage. (gld${EMULATION_NAME}_get_script): Return -z combreloc -z now -z relro scripts when appropriate. * scripttempl/elf.sc: Unset SEPARATE_GOTPLT if RELRO_NOW is set. Create separate .got.plt section if SEPARATE_GOTPLT. Move sections which are only written during relocation handling to the beginning of RW segment. If NO_SMALL_DATA, move .got before .data. Add DATA_SEGMENT_RELRO_END directive. Include OTHER_RELRO_SECTIONS. * ldgram.y (DATA_SEGMENT_RELRO_END): Add. * ldexp.c (exp_print_token): Handle DATA_SEGMENT_RELRO_END. (fold_unary): Likewise. (fold_binary): Handle -z relro. * ldexp.h (struct exp_data_seg): Add exp_dataseg_relro_seen and exp_dataseg_relro_adjust phases. Add relro_end field. * ldmain.c (main): Initialize link_info.relro to FALSE. * ldlang.c (lang_size_sections): Handle -z relro. ld/testsuite/ * ld-i386/tlspic.rd: Adjust for section reordering changes and removal of unneeded STT_SECTION symbols from .dynsym. * ld-i386/tlspic.dd: Likewise. * ld-i386/tlspic.sd: Likewise. * ld-i386/tlsbin.rd: Likewise. * ld-i386/tlsbinpic.s: Likewise. * ld-i386/tlsbin.dd: Likewise. * ld-i386/tlsbin.sd: Likewise. * ld-i386/tlsnopic.rd: Likewise. * ld-i386/tlsnopic1.s: Likewise. * ld-i386/combreloc.d: Likewise. * ld-i386/tlsnopic.dd: Likewise. * ld-i386/tlsnopic.sd: Likewise. * ld-x86-64/tlspic.rd: Likewise. * ld-x86-64/tlspic.dd: Likewise. * ld-x86-64/tlsbin.dd: Likewise. * ld-x86-64/tlspic.sd: Likewise. * ld-x86-64/tlsbin.sd: Likewise. * ld-x86-64/tlspic.td: Likewise. * ld-x86-64/tlsbin.td: Likewise. * ld-x86-64/tlsbin.rd: Likewise. * ld-s390/tlspic1.s: Likewise. * ld-s390/tlsbinpic.s: Likewise. * ld-s390/tlspic.rd: Likewise. * ld-s390/tlsbin.rd: Likewise. * ld-s390/tlspic.dd: Likewise. * ld-s390/tlsbin.dd: Likewise. * ld-s390/tlsbin.sd: Likewise. * ld-s390/tlsbin.td: Likewise. * ld-s390/tlspic.sd: Likewise. * ld-s390/tlspic.td: Likewise. * ld-s390/tlspic1_64.s: Likewise. * ld-s390/tlsbinpic_64.s: Likewise. * ld-s390/tlspic_64.rd: Likewise. * ld-s390/tlsbin_64.rd: Likewise. * ld-s390/tlspic_64.dd: Likewise. * ld-s390/tlsbin_64.dd: Likewise. * ld-s390/tlspic_64.sd: Likewise. * ld-s390/tlspic_64.td: Likewise. * ld-s390/tlsbin_64.td: Likewise. * ld-s390/tlsbin_64.sd: Likewise. * ld-powerpc/tlsexe32.r: Likewise. * ld-powerpc/tlsso32.r: Likewise. * ld-powerpc/tlsso32.d: Likewise. * ld-powerpc/tlsso32.g: Likewise. * ld-powerpc/tlsso32.t: Likewise. * ld-powerpc/tlsexe.r: Likewise. * ld-powerpc/tlsso.r: Likewise. * ld-powerpc/tlsso.g: Likewise. * ld-powerpc/tlsexetoc.r: Likewise. * ld-powerpc/tlstocso.r: Likewise. * ld-powerpc/tlstocso.g: Likewise. * ld-ia64/tlspic.rd: Likewise. * ld-ia64/tlspic.dd: Likewise. * ld-ia64/tlspic.sd: Likewise. * ld-ia64/tlspic.td: Likewise. * ld-ia64/tlsbin.rd: Likewise. * ld-ia64/tlsbin.sd: Likewise. * ld-ia64/tlsbin.td: Likewise. * ld-elfvsb/elfvsb.exp: XFAIL non-PIC load offset tests on s390x. * ld-shared/shared.exp: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64')
-rw-r--r--ld/testsuite/ld-x86-64/tlsbin.dd10
-rw-r--r--ld/testsuite/ld-x86-64/tlsbin.rd204
-rw-r--r--ld/testsuite/ld-x86-64/tlsbin.sd6
-rw-r--r--ld/testsuite/ld-x86-64/tlsbin.td12
-rw-r--r--ld/testsuite/ld-x86-64/tlspic.dd52
-rw-r--r--ld/testsuite/ld-x86-64/tlspic.rd230
-rw-r--r--ld/testsuite/ld-x86-64/tlspic.sd20
-rw-r--r--ld/testsuite/ld-x86-64/tlspic.td12
8 files changed, 269 insertions, 277 deletions
diff --git a/ld/testsuite/ld-x86-64/tlsbin.dd b/ld/testsuite/ld-x86-64/tlsbin.dd
index c6aef68152..58bb553870 100644
--- a/ld/testsuite/ld-x86-64/tlsbin.dd
+++ b/ld/testsuite/ld-x86-64/tlsbin.dd
@@ -24,7 +24,7 @@ Disassembly of section .text:
# GD -> IE because variable is not defined in executable
401004: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
40100b: 00 00 *
- 40100d: 48 03 05 c4 11 10 00[ ]+add 1053124\(%rip\),%rax +# 5021d8 <_GLOBAL_OFFSET_TABLE_\+0x38>
+ 40100d: 48 03 05 d4 03 10 00[ ]+add 1049556\(%rip\),%rax +# 5013e8 <.*>
# -> R_X86_64_TPOFF64 sG1
401014: 90[ ]+nop *
401015: 90[ ]+nop *
@@ -34,7 +34,7 @@ Disassembly of section .text:
# the variable is referenced through IE too
401018: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
40101f: 00 00 *
- 401021: 48 03 05 a0 11 10 00[ ]+add 1053088\(%rip\),%rax +# 5021c8 <_GLOBAL_OFFSET_TABLE_\+0x28>
+ 401021: 48 03 05 b0 03 10 00[ ]+add 1049520\(%rip\),%rax +# 5013d8 <.*>
# -> R_X86_64_TPOFF64 sG2
401028: 90[ ]+nop *
401029: 90[ ]+nop *
@@ -102,7 +102,7 @@ Disassembly of section .text:
4010b3: 00 00 *
4010b5: 90[ ]+nop *
4010b6: 90[ ]+nop *
- 4010b7: 4c 03 0d 0a 11 10 00[ ]+add 1052938\(%rip\),%r9 +# 5021c8 <_GLOBAL_OFFSET_TABLE_\+0x28>
+ 4010b7: 4c 03 0d 1a 03 10 00[ ]+add 1049370\(%rip\),%r9 +# 5013d8 <.*>
# -> R_X86_64_TPOFF64 sG2
4010be: 90[ ]+nop *
4010bf: 90[ ]+nop *
@@ -143,7 +143,7 @@ Disassembly of section .text:
401103: 90[ ]+nop *
# Direct access through %fs
# IE against global var
- 401104: 48 8b 0d b5 10 10 00[ ]+mov 1052853\(%rip\),%rcx +# 5021c0 <_GLOBAL_OFFSET_TABLE_\+0x20>
+ 401104: 48 8b 0d c5 02 10 00[ ]+mov 1049285\(%rip\),%rcx +# 5013d0 <.*>
# -> R_X86_64_TPOFF64 sG5
40110b: 90[ ]+nop *
40110c: 90[ ]+nop *
@@ -186,7 +186,7 @@ Disassembly of section .text:
401147: 00 00 *
401149: 90[ ]+nop *
40114a: 90[ ]+nop *
- 40114b: 4c 03 1d 7e 10 10 00[ ]+add 1052798\(%rip\),%r11 +# 5021d0 <_GLOBAL_OFFSET_TABLE_\+0x30>
+ 40114b: 4c 03 1d 8e 02 10 00[ ]+add 1049230\(%rip\),%r11 +# 5013e0 <.*>
# -> R_X86_64_TPOFF64 sG6
401152: 90[ ]+nop *
401153: 90[ ]+nop *
diff --git a/ld/testsuite/ld-x86-64/tlsbin.rd b/ld/testsuite/ld-x86-64/tlsbin.rd
index 9f163d9a0b..490010f854 100644
--- a/ld/testsuite/ld-x86-64/tlsbin.rd
+++ b/ld/testsuite/ld-x86-64/tlsbin.rd
@@ -5,7 +5,7 @@
#readelf: -WSsrl
#target: x86_64-*-*
-There are 18 section headers, starting at offset 0x[0-9a-f]+:
+There are 19 section headers, starting at offset 0x[0-9a-f]+:
Section Headers:
\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
@@ -18,15 +18,16 @@ Section Headers:
\[ 6\] .rela.plt +.*
\[ 7\] .plt +.*
\[ 8\] .text +PROGBITS +0+401000 0+1000 0+22a 00 +AX +0 +0 +4096
- \[ 9\] .data +.*
- \[10\] .tdata +PROGBITS +0+502000 0+2000 0+60 00 WAT +0 +0 +1
- \[11\] .tbss +NOBITS +0+502060 0+2060 0+40 00 WAT +0 +0 +1
- \[12\] .dynamic +DYNAMIC +0+502060 0+2060 0+140 10 +WA +4 +0 +8
- \[13\] .got +PROGBITS +0+5021a0 0+21a0 0+40 08 +WA +0 +0 +8
- \[14\] .bss +.*
- \[15\] .shstrtab +.*
- \[16\] .symtab +.*
- \[17\] .strtab +.*
+ \[ 9\] .tdata +PROGBITS +0+50122a 0+122a 0+60 00 WAT +0 +0 +1
+ \[10\] .tbss +NOBITS +0+50128a 0+128a 0+40 00 WAT +0 +0 +1
+ \[11\] .dynamic +DYNAMIC +0+501290 0+1290 0+140 10 +WA +4 +0 +8
+ \[12\] .got +PROGBITS +0+5013d0 0+13d0 0+20 08 +WA +0 +0 +8
+ \[13\] .got.plt +PROGBITS +0+5013f0 0+13f0 0+20 08 +WA +0 +0 +8
+ \[14\] .data +.*
+ \[15\] .bss +.*
+ \[16\] .shstrtab +.*
+ \[17\] .symtab +.*
+ \[18\] .strtab +.*
Key to Flags:
.*
.*
@@ -42,25 +43,25 @@ Program Headers:
INTERP +0x0+190 0x0+400190 0x0+400190 0x0+f 0x0+f R +0x1
.*Requesting program interpreter.*
LOAD +0x0+ 0x0+400000 0x0+400000 0x0+122a 0x0+122a R E 0x100000
- LOAD +0x0+2000 0x0+502000 0x0+502000 0x0+1e0 0x0+1e0 RW 0x100000
- DYNAMIC +0x0+2060 0x0+502060 0x0+502060 0x0+140 0x0+140 RW 0x8
- TLS +0x0+2000 0x0+502000 0x0+502000 0x0+60 0x0+a0 R +0x1
+ LOAD +0x0+122a 0x0+50122a 0x0+50122a 0x0+dd6 0x0+dd6 RW 0x100000
+ DYNAMIC +0x0+1290 0x0+501290 0x0+501290 0x0+140 0x0+140 RW 0x8
+ TLS +0x0+122a 0x0+50122a 0x0+50122a 0x0+60 0x0+a0 R +0x1
Section to Segment mapping:
Segment Sections...
00 *
01 +.interp *
02 +.interp .hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text *
- 03 +.tdata .tbss .dynamic .got *
- 04 +.tbss .dynamic *
+ 03 +.tdata .tbss .dynamic .got .got.plt *
+ 04 +.dynamic *
05 +.tdata .tbss *
Relocation section '.rela.dyn' at offset 0x358 contains 4 entries:
+Offset +Info +Type +Symbol's Value Symbol's Name \+ Addend
-0+5021c0 0+100000012 R_X86_64_TPOFF64 +0+ sG5 \+ 0
-0+5021c8 0+300000012 R_X86_64_TPOFF64 +0+ sG2 \+ 0
-0+5021d0 0+600000012 R_X86_64_TPOFF64 +0+ sG6 \+ 0
-0+5021d8 0+700000012 R_X86_64_TPOFF64 +0+ sG1 \+ 0
+0+5013d0 0+100000012 R_X86_64_TPOFF64 +0+ sG5 \+ 0
+0+5013d8 0+300000012 R_X86_64_TPOFF64 +0+ sG2 \+ 0
+0+5013e0 0+600000012 R_X86_64_TPOFF64 +0+ sG6 \+ 0
+0+5013e8 0+700000012 R_X86_64_TPOFF64 +0+ sG1 \+ 0
Relocation section '.rela.plt' at offset 0x3b8 contains 1 entries:
+Offset +Info +Type +Symbol's Value Symbol's Name \+ Addend
@@ -68,87 +69,88 @@ Relocation section '.rela.plt' at offset 0x3b8 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 sG5
- +2: 0+502060 +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
- +3: 0+ +0 TLS +GLOBAL DEFAULT UND sG2
- +4: 0+[0-9a-f]+ +0 FUNC +GLOBAL DEFAULT UND __tls_get_addr
- +5: 0+[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+[0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _edata
- +9: 0+5021a0 +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
- +10: 0+[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 sG5
+ +[0-9]+: 0+501290 +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
+ +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sG2
+ +[0-9]+: 0+[0-9a-f]+ +0 FUNC +GLOBAL DEFAULT UND __tls_get_addr
+ +[0-9]+: 0+[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+[0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _edata
+ +[0-9]+: 0+5013f0 +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+[0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _end
-Symbol table '.symtab' contains 70 entries:
+Symbol table '.symtab' contains 71 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 +10 sl1
- +19: 0+24 +0 TLS +LOCAL DEFAULT +10 sl2
- +20: 0+28 +0 TLS +LOCAL DEFAULT +10 sl3
- +21: 0+2c +0 TLS +LOCAL DEFAULT +10 sl4
- +22: 0+30 +0 TLS +LOCAL DEFAULT +10 sl5
- +23: 0+34 +0 TLS +LOCAL DEFAULT +10 sl6
- +24: 0+38 +0 TLS +LOCAL DEFAULT +10 sl7
- +25: 0+3c +0 TLS +LOCAL DEFAULT +10 sl8
- +26: 0+80 +0 TLS +LOCAL DEFAULT +11 bl1
- +27: 0+84 +0 TLS +LOCAL DEFAULT +11 bl2
- +28: 0+88 +0 TLS +LOCAL DEFAULT +11 bl3
- +29: 0+8c +0 TLS +LOCAL DEFAULT +11 bl4
- +30: 0+90 +0 TLS +LOCAL DEFAULT +11 bl5
- +31: 0+94 +0 TLS +LOCAL DEFAULT +11 bl6
- +32: 0+98 +0 TLS +LOCAL DEFAULT +11 bl7
- +33: 0+9c +0 TLS +LOCAL DEFAULT +11 bl8
- +34: 0+1c +0 TLS +GLOBAL DEFAULT +10 sg8
- +35: 0+7c +0 TLS +GLOBAL DEFAULT +11 bg8
- +36: 0+74 +0 TLS +GLOBAL DEFAULT +11 bg6
- +37: 0+ +0 TLS +GLOBAL DEFAULT UND sG5
- +38: 0+68 +0 TLS +GLOBAL DEFAULT +11 bg3
- +39: 0+502060 +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
- +40: 0+8 +0 TLS +GLOBAL DEFAULT +10 sg3
- +41: 0+48 +0 TLS +GLOBAL HIDDEN +10 sh3
- +42: 0+ +0 TLS +GLOBAL DEFAULT UND sG2
- +43: 0+c +0 TLS +GLOBAL DEFAULT +10 sg4
- +44: 0+10 +0 TLS +GLOBAL DEFAULT +10 sg5
- +45: 0+70 +0 TLS +GLOBAL DEFAULT +11 bg5
- +46: [0-9a-f]+ +0 FUNC +GLOBAL DEFAULT UND __tls_get_addr
- +47: 0+58 +0 TLS +GLOBAL HIDDEN +10 sh7
- +48: 0+5c +0 TLS +GLOBAL HIDDEN +10 sh8
- +49: 0+ +0 TLS +GLOBAL DEFAULT +10 sg1
- +50: 0+40113c +0 FUNC +GLOBAL DEFAULT +8 _start
- +51: 0+4c +0 TLS +GLOBAL HIDDEN +10 sh4
- +52: 0+78 +0 TLS +GLOBAL DEFAULT +11 bg7
- +53: 0+50 +0 TLS +GLOBAL HIDDEN +10 sh5
- +54: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS __bss_start
- +55: 0+ +0 TLS +GLOBAL DEFAULT UND sG6
- +56: 0+401000 +0 FUNC +GLOBAL DEFAULT +8 fn2
- +57: 0+4 +0 TLS +GLOBAL DEFAULT +10 sg2
- +58: 0+ +0 TLS +GLOBAL DEFAULT UND sG1
- +59: 0+40 +0 TLS +GLOBAL HIDDEN +10 sh1
- +60: 0+14 +0 TLS +GLOBAL DEFAULT +10 sg6
- +61: 0+18 +0 TLS +GLOBAL DEFAULT +10 sg7
- +62: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _edata
- +63: 0+5021a0 +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
- +64: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _end
- +65: 0+44 +0 TLS +GLOBAL HIDDEN +10 sh2
- +66: 0+54 +0 TLS +GLOBAL HIDDEN +10 sh6
- +67: 0+64 +0 TLS +GLOBAL DEFAULT +11 bg2
- +68: 0+60 +0 TLS +GLOBAL DEFAULT +11 bg1
- +69: 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-9a-f]+ +0 SECTION LOCAL DEFAULT +18 *
+ +[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+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+ +0 TLS +GLOBAL DEFAULT UND sG5
+ +[0-9]+: 0+68 +0 TLS +GLOBAL DEFAULT +10 bg3
+ +[0-9]+: 0+501290 +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-9a-f]+ +0 FUNC +GLOBAL DEFAULT UND __tls_get_addr
+ +[0-9]+: 0+58 +0 TLS +GLOBAL HIDDEN +9 sh7
+ +[0-9]+: 0+5c +0 TLS +GLOBAL HIDDEN +9 sh8
+ +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +9 sg1
+ +[0-9]+: 0+40113c +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+401000 +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+5013f0 +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
diff --git a/ld/testsuite/ld-x86-64/tlsbin.sd b/ld/testsuite/ld-x86-64/tlsbin.sd
index d3783256e1..8095b59670 100644
--- a/ld/testsuite/ld-x86-64/tlsbin.sd
+++ b/ld/testsuite/ld-x86-64/tlsbin.sd
@@ -8,7 +8,5 @@
.*: +file format elf64-x86-64
Contents of section .got:
- 5021a0 [0-9a-f]+ [0-9a-f]+ 00000000 00000000 .*
- 5021b0 00000000 00000000 [0-9a-f]+ [0-9a-f]+ .*
- 5021c0 00000000 00000000 00000000 00000000 .*
- 5021d0 00000000 00000000 00000000 00000000 .*
+ 5013d0 00000000 00000000 00000000 00000000 .*
+ 5013e0 00000000 00000000 00000000 00000000 .*
diff --git a/ld/testsuite/ld-x86-64/tlsbin.td b/ld/testsuite/ld-x86-64/tlsbin.td
index f2ba1b44e6..e0d75981f3 100644
--- a/ld/testsuite/ld-x86-64/tlsbin.td
+++ b/ld/testsuite/ld-x86-64/tlsbin.td
@@ -8,9 +8,9 @@
.*: +file format elf64-x86-64
Contents of section .tdata:
- 502000 11000000 12000000 13000000 14000000 .*
- 502010 15000000 16000000 17000000 18000000 .*
- 502020 41000000 42000000 43000000 44000000 .*
- 502030 45000000 46000000 47000000 48000000 .*
- 502040 01010000 02010000 03010000 04010000 .*
- 502050 05010000 06010000 07010000 08010000 .*
+ 50122a 11000000 12000000 13000000 14000000 .*
+ 50123a 15000000 16000000 17000000 18000000 .*
+ 50124a 41000000 42000000 43000000 44000000 .*
+ 50125a 45000000 46000000 47000000 48000000 .*
+ 50126a 01010000 02010000 03010000 04010000 .*
+ 50127a 05010000 06010000 07010000 08010000 .*
diff --git a/ld/testsuite/ld-x86-64/tlspic.dd b/ld/testsuite/ld-x86-64/tlspic.dd
index 69ccdfdf7b..f5139dcd3f 100644
--- a/ld/testsuite/ld-x86-64/tlspic.dd
+++ b/ld/testsuite/ld-x86-64/tlspic.dd
@@ -17,12 +17,12 @@ Disassembly of section .text:
+1006: 90[ ]+nop *
+1007: 90[ ]+nop *
# GD
- +1008: 66 48 8d 3d f0 11 10[ ]+lea 1053168\(%rip\),%rdi +# 102200 <_GLOBAL_OFFSET_TABLE_\+0x70>
+ +1008: 66 48 8d 3d 80 03 10[ ]+lea 1049472\(%rip\),%rdi +# 101390 <.*>
+100f: 00 *
# -> R_X86_64_DTPMOD64 sg1
+1010: 66[ ]+data16
+1011: 66[ ]+data16
- +1012: 48 e8 68 f6 ff ff[ ]+rex64 callq [0-9a-f]+ <.*>
+ +1012: 48 e8 88 f5 ff ff[ ]+rex64 callq [0-9a-f]+ <.*>
# -> R_X86_64_JUMP_SLOT __tls_get_addr
+1018: 90[ ]+nop *
+1019: 90[ ]+nop *
@@ -31,19 +31,19 @@ Disassembly of section .text:
# GD -> IE because variable is referenced through IE too
+101c: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
+1023: 00 00 *
- +1025: 48 03 05 f4 11 10 00[ ]+add 1053172\(%rip\),%rax +# 102220 <_GLOBAL_OFFSET_TABLE_\+0x90>
+ +1025: 48 03 05 84 03 10 00[ ]+add 1049476\(%rip\),%rax +# 1013b0 <.*>
# -> R_X86_64_TPOFF64 sg2
+102c: 90[ ]+nop *
+102d: 90[ ]+nop *
+102e: 90[ ]+nop *
+102f: 90[ ]+nop *
# GD against local variable
- +1030: 66 48 8d 3d 78 11 10[ ]+lea 1053048\(%rip\),%rdi +# 1021b0 <_GLOBAL_OFFSET_TABLE_\+0x20>
+ +1030: 66 48 8d 3d 08 03 10[ ]+lea 1049352\(%rip\),%rdi +# 101340 <.*>
+1037: 00 *
# -> R_X86_64_DTPMOD64 [0 0x2000000000000000]
+1038: 66[ ]+data16
+1039: 66[ ]+data16
- +103a: 48 e8 40 f6 ff ff[ ]+rex64 callq [0-9a-f]+ <.*>
+ +103a: 48 e8 60 f5 ff ff[ ]+rex64 callq [0-9a-f]+ <.*>
# -> R_X86_64_JUMP_SLOT __tls_get_addr
+1040: 90[ ]+nop *
+1041: 90[ ]+nop *
@@ -52,19 +52,19 @@ Disassembly of section .text:
# GD -> IE against local variable referenced through IE too
+1044: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
+104b: 00 00 *
- +104d: 48 03 05 6c 11 10 00[ ]+add 1053036\(%rip\),%rax +# 1021c0 <_GLOBAL_OFFSET_TABLE_\+0x30>
+ +104d: 48 03 05 fc 02 10 00[ ]+add 1049340\(%rip\),%rax +# 101350 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x24
+1054: 90[ ]+nop *
+1055: 90[ ]+nop *
+1056: 90[ ]+nop *
+1057: 90[ ]+nop *
# GD against hidden and local variable
- +1058: 66 48 8d 3d c8 11 10[ ]+lea 1053128\(%rip\),%rdi +# 102228 <_GLOBAL_OFFSET_TABLE_\+0x98>
+ +1058: 66 48 8d 3d 58 03 10[ ]+lea 1049432\(%rip\),%rdi +# 1013b8 <.*>
+105f: 00 *
# -> R_X86_64_DTPMOD64 [0 0x4000000000000000]
+1060: 66[ ]+data16
+1061: 66[ ]+data16
- +1062: 48 e8 18 f6 ff ff[ ]+rex64 callq [0-9a-f]+ <.*>
+ +1062: 48 e8 38 f5 ff ff[ ]+rex64 callq [0-9a-f]+ <.*>
# -> R_X86_64_JUMP_SLOT __tls_get_addr
+1068: 90[ ]+nop *
+1069: 90[ ]+nop *
@@ -73,19 +73,19 @@ Disassembly of section .text:
# GD -> IE against hidden and local variable referenced through IE too
+106c: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
+1073: 00 00 *
- +1075: 48 03 05 bc 11 10 00[ ]+add 1053116\(%rip\),%rax +# 102238 <_GLOBAL_OFFSET_TABLE_\+0xa8>
+ +1075: 48 03 05 4c 03 10 00[ ]+add 1049420\(%rip\),%rax +# 1013c8 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x44
+107c: 90[ ]+nop *
+107d: 90[ ]+nop *
+107e: 90[ ]+nop *
+107f: 90[ ]+nop *
# GD against hidden but not local variable
- +1080: 66 48 8d 3d 58 11 10[ ]+lea 1053016\(%rip\),%rdi +# 1021e0 <_GLOBAL_OFFSET_TABLE_\+0x50>
+ +1080: 66 48 8d 3d e8 02 10[ ]+lea 1049320\(%rip\),%rdi +# 101370 <.*>
+1087: 00 *
# -> R_X86_64_DTPMOD64 [0 0x6000000000000000]
+1088: 66[ ]+data16
+1089: 66[ ]+data16
- +108a: 48 e8 f0 f5 ff ff[ ]+rex64 callq [0-9a-f]+ <.*>
+ +108a: 48 e8 10 f5 ff ff[ ]+rex64 callq [0-9a-f]+ <.*>
# -> R_X86_64_JUMP_SLOT __tls_get_addr
+1090: 90[ ]+nop *
+1091: 90[ ]+nop *
@@ -94,16 +94,16 @@ Disassembly of section .text:
# GD -> IE against hidden but not local variable referenced through IE too
+1094: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
+109b: 00 00 *
- +109d: 48 03 05 4c 11 10 00[ ]+add 1053004\(%rip\),%rax +# 1021f0 <_GLOBAL_OFFSET_TABLE_\+0x60>
+ +109d: 48 03 05 dc 02 10 00[ ]+add 1049308\(%rip\),%rax +# 101380 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x64
+10a4: 90[ ]+nop *
+10a5: 90[ ]+nop *
+10a6: 90[ ]+nop *
+10a7: 90[ ]+nop *
# LD
- +10a8: 48 8d 3d 21 11 10 00[ ]+lea 1052961\(%rip\),%rdi +# 1021d0 <_GLOBAL_OFFSET_TABLE_\+0x40>
+ +10a8: 48 8d 3d b1 02 10 00[ ]+lea 1049265\(%rip\),%rdi +# 101360 <.*>
# -> R_X86_64_DTPMOD64 [0 0x000000000000000]
- +10af: e8 cc f5 ff ff[ ]+callq [0-9a-f]+ <.*>
+ +10af: e8 ec f4 ff ff[ ]+callq [0-9a-f]+ <.*>
# -> R_X86_64_JUMP_SLOT __tls_get_addr
+10b4: 90[ ]+nop *
+10b5: 90[ ]+nop *
@@ -116,9 +116,9 @@ Disassembly of section .text:
+10c8: 90[ ]+nop *
+10c9: 90[ ]+nop *
# LD against hidden and local variables
- +10ca: 48 8d 3d ff 10 10 00[ ]+lea 1052927\(%rip\),%rdi +# 1021d0 <_GLOBAL_OFFSET_TABLE_\+0x40>
+ +10ca: 48 8d 3d 8f 02 10 00[ ]+lea 1049231\(%rip\),%rdi +# 101360 <.*>
# -> R_X86_64_DTPMOD64 [0 0x000000000000000]
- +10d1: e8 aa f5 ff ff[ ]+callq [0-9a-f]+ <.*>
+ +10d1: e8 ca f4 ff ff[ ]+callq [0-9a-f]+ <.*>
# -> R_X86_64_JUMP_SLOT __tls_get_addr
+10d6: 90[ ]+nop *
+10d7: 90[ ]+nop *
@@ -131,9 +131,9 @@ Disassembly of section .text:
+10ea: 90[ ]+nop *
+10eb: 90[ ]+nop *
# LD against hidden but not local variables
- +10ec: 48 8d 3d dd 10 10 00[ ]+lea 1052893\(%rip\),%rdi +# 1021d0 <_GLOBAL_OFFSET_TABLE_\+0x40>
+ +10ec: 48 8d 3d 6d 02 10 00[ ]+lea 1049197\(%rip\),%rdi +# 101360 <.*>
# -> R_X86_64_DTPMOD64 [0 0x000000000000000]
- +10f3: e8 88 f5 ff ff[ ]+callq [0-9a-f]+ <.*>
+ +10f3: e8 a8 f4 ff ff[ ]+callq [0-9a-f]+ <.*>
# -> R_X86_64_JUMP_SLOT __tls_get_addr
+10f8: 90[ ]+nop *
+10f9: 90[ ]+nop *
@@ -148,7 +148,7 @@ Disassembly of section .text:
+1113: 00 00 *
+1115: 90[ ]+nop *
+1116: 90[ ]+nop *
- +1117: 48 03 0d 02 11 10 00[ ]+add 1052930\(%rip\),%rcx +# 102220 <_GLOBAL_OFFSET_TABLE_\+0x90>
+ +1117: 48 03 0d 92 02 10 00[ ]+add 1049234\(%rip\),%rcx +# 1013b0 <.*>
# -> R_X86_64_TPOFF64 sg2
+111e: 90[ ]+nop *
+111f: 90[ ]+nop *
@@ -159,7 +159,7 @@ Disassembly of section .text:
+1129: 00 00 *
+112b: 90[ ]+nop *
+112c: 90[ ]+nop *
- +112d: 4c 03 35 8c 10 10 00[ ]+add 1052812\(%rip\),%r14 +# 1021c0 <_GLOBAL_OFFSET_TABLE_\+0x30>
+ +112d: 4c 03 35 1c 02 10 00[ ]+add 1049116\(%rip\),%r14 +# 101350 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x24
+1134: 90[ ]+nop *
+1135: 90[ ]+nop *
@@ -170,7 +170,7 @@ Disassembly of section .text:
+113f: 00 00 *
+1141: 90[ ]+nop *
+1142: 90[ ]+nop *
- +1143: 48 03 0d ee 10 10 00[ ]+add 1052910\(%rip\),%rcx +# 102238 <_GLOBAL_OFFSET_TABLE_\+0xa8>
+ +1143: 48 03 0d 7e 02 10 00[ ]+add 1049214\(%rip\),%rcx +# 1013c8 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x44
+114a: 90[ ]+nop *
+114b: 90[ ]+nop *
@@ -181,7 +181,7 @@ Disassembly of section .text:
+1155: 00 00 *
+1157: 90[ ]+nop *
+1158: 90[ ]+nop *
- +1159: 48 03 0d 90 10 10 00[ ]+add 1052816\(%rip\),%rcx +# 1021f0 <_GLOBAL_OFFSET_TABLE_\+0x60>
+ +1159: 48 03 0d 20 02 10 00[ ]+add 1049120\(%rip\),%rcx +# 101380 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x64
+1160: 90[ ]+nop *
+1161: 90[ ]+nop *
@@ -189,7 +189,7 @@ Disassembly of section .text:
+1163: 90[ ]+nop *
# Direct access through %fs
# IE against global var
- +1164: 48 8b 0d 8d 10 10 00[ ]+mov 1052813\(%rip\),%rcx +# 1021f8 <_GLOBAL_OFFSET_TABLE_\+0x68>
+ +1164: 48 8b 0d 1d 02 10 00[ ]+mov 1049117\(%rip\),%rcx +# 101388 <.*>
# -> R_X86_64_TPOFF64 sg5
+116b: 90[ ]+nop *
+116c: 90[ ]+nop *
@@ -199,7 +199,7 @@ Disassembly of section .text:
+1173: 90[ ]+nop *
+1174: 90[ ]+nop *
# IE against local var
- +1175: 4c 8b 15 4c 10 10 00[ ]+mov 1052748\(%rip\),%r10 +# 1021c8 <_GLOBAL_OFFSET_TABLE_\+0x38>
+ +1175: 4c 8b 15 dc 01 10 00[ ]+mov 1049052\(%rip\),%r10 +# 101358 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x30
+117c: 90[ ]+nop *
+117d: 90[ ]+nop *
@@ -209,7 +209,7 @@ Disassembly of section .text:
+1184: 90[ ]+nop *
+1185: 90[ ]+nop *
# IE against hidden and local var
- +1186: 48 8b 15 83 10 10 00[ ]+mov 1052803\(%rip\),%rdx +# 102210 <_GLOBAL_OFFSET_TABLE_\+0x80>
+ +1186: 48 8b 15 13 02 10 00[ ]+mov 1049107\(%rip\),%rdx +# 1013a0 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x50
+118d: 90[ ]+nop *
+118e: 90[ ]+nop *
@@ -219,7 +219,7 @@ Disassembly of section .text:
+1195: 90[ ]+nop *
+1196: 90[ ]+nop *
# IE against hidden but not local var
- +1197: 48 8b 0d 7a 10 10 00[ ]+mov 1052794\(%rip\),%rcx +# 102218 <_GLOBAL_OFFSET_TABLE_\+0x88>
+ +1197: 48 8b 0d 0a 02 10 00[ ]+mov 1049098\(%rip\),%rcx +# 1013a8 <.*>
# -> R_X86_64_TPOFF64 *ABS*+0x70
+119e: 90[ ]+nop *
+119f: 90[ ]+nop *
diff --git a/ld/testsuite/ld-x86-64/tlspic.rd b/ld/testsuite/ld-x86-64/tlspic.rd
index d8190db7be..029fa682f4 100644
--- a/ld/testsuite/ld-x86-64/tlspic.rd
+++ b/ld/testsuite/ld-x86-64/tlspic.rd
@@ -5,7 +5,7 @@
#readelf: -WSsrl
#target: x86_64-*-*
-There are 17 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
@@ -17,15 +17,16 @@ Section Headers:
\[ 5\] .rela.plt +.*
\[ 6\] .plt +.*
\[ 7\] .text +PROGBITS +0+1000 0+1000 0+1ac 00 +AX +0 +0 4096
- \[ 8\] .data +.*
- \[ 9\] .tdata +PROGBITS +0+102000 0+2000 0+60 00 WAT +0 +0 +1
- \[10\] .tbss +NOBITS +0+102060 0+2060 0+20 00 WAT +0 +0 +1
- \[11\] .dynamic +DYNAMIC +0+102060 0+2060 0+130 10 +WA +3 +0 +8
- \[12\] .got +PROGBITS +0+102190 0+2190 0+b0 08 +WA +0 +0 +8
- \[13\] .bss +.*
- \[14\] .shstrtab +.*
- \[15\] .symtab +.*
- \[16\] .strtab +.*
+ \[ 8\] .tdata +PROGBITS +0+1011ac 0+11ac 0+60 00 WAT +0 +0 +1
+ \[ 9\] .tbss +NOBITS +0+10120c 0+120c 0+20 00 WAT +0 +0 +1
+ \[10\] .dynamic +DYNAMIC +0+101210 0+1210 0+130 10 +WA +3 +0 +8
+ \[11\] .got +PROGBITS +0+101340 0+1340 0+90 08 +WA +0 +0 +8
+ \[12\] .got.plt +PROGBITS +0+1013d0 0+13d0 0+20 08 +WA +0 +0 +8
+ \[13\] .data +.*
+ \[14\] .bss +.*
+ \[15\] .shstrtab +.*
+ \[16\] .symtab +.*
+ \[17\] .strtab +.*
Key to Flags:
.*
.*
@@ -38,125 +39,118 @@ 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 0x100000
- LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+240 0x0+240 RW +0x100000
- DYNAMIC +0x0+2060 0x0+102060 0x0+102060 0x0+130 0x0+130 RW +0x8
- TLS +0x0+2000 0x0+102000 0x0+102000 0x0+60 0x0+80 R +0x1
+ LOAD +0x0+11ac 0x0+1011ac 0x0+1011ac 0x0+e54 0x0+e54 RW +0x100000
+ DYNAMIC +0x0+1210 0x0+101210 0x0+101210 0x0+130 0x0+130 RW +0x8
+ TLS +0x0+11ac 0x0+1011ac 0x0+1011ac 0x0+60 0x0+80 R +0x1
Section to Segment mapping:
Segment Sections...
00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text *
- 01 +.tdata .tbss .dynamic .got *
- 02 +.tbss .dynamic *
+ 01 +.tdata .tbss .dynamic .got .got.plt *
+ 02 +.dynamic *
03 +.tdata .tbss *
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
-0+1021b0 0+10 R_X86_64_DTPMOD64 +0+
-0+1021c0 0+12 R_X86_64_TPOFF64 +0+24
-0+1021c8 0+12 R_X86_64_TPOFF64 +0+30
-0+1021d0 0+10 R_X86_64_DTPMOD64 +0+
-0+1021e0 0+10 R_X86_64_DTPMOD64 +0+
-0+1021f0 0+12 R_X86_64_TPOFF64 +0+64
-0+102210 0+12 R_X86_64_TPOFF64 +0+50
-0+102218 0+12 R_X86_64_TPOFF64 +0+70
-0+102228 0+10 R_X86_64_DTPMOD64 +0+
-0+102238 0+12 R_X86_64_TPOFF64 +0+44
-0+1021f8 0+1200000012 R_X86_64_TPOFF64 +0+10 sg5 \+ 0
-0+102200 0+1400000010 R_X86_64_DTPMOD64 +0+ sg1 \+ 0
-0+102208 0+1400000011 R_X86_64_DTPOFF64 +0+ sg1 \+ 0
-0+102220 0+1700000012 R_X86_64_TPOFF64 +0+4 sg2 \+ 0
+0+101340 0+10 R_X86_64_DTPMOD64 +0+
+0+101350 0+12 R_X86_64_TPOFF64 +0+24
+0+101358 0+12 R_X86_64_TPOFF64 +0+30
+0+101360 0+10 R_X86_64_DTPMOD64 +0+
+0+101370 0+10 R_X86_64_DTPMOD64 +0+
+0+101380 0+12 R_X86_64_TPOFF64 +0+64
+0+1013a0 0+12 R_X86_64_TPOFF64 +0+50
+0+1013a8 0+12 R_X86_64_TPOFF64 +0+70
+0+1013b8 0+10 R_X86_64_DTPMOD64 +0+
+0+1013c8 0+12 R_X86_64_TPOFF64 +0+44
+0+101388 0+a00000012 R_X86_64_TPOFF64 +0+10 sg5 \+ 0
+0+101390 0+c00000010 R_X86_64_DTPMOD64 +0+ sg1 \+ 0
+0+101398 0+c00000011 R_X86_64_DTPOFF64 +0+ sg1 \+ 0
+0+1013b0 0+f00000012 R_X86_64_TPOFF64 +0+4 sg2 \+ 0
-Relocation section '.rela.plt' at offset 0x658 contains 1 entries:
+Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entries:
+Offset +Info +Type +Symbol's Value Symbol's Name \+ Addend
-0+[0-9a-f]+ 0+1300000007 R_X86_64_JUMP_SLOT +0+ __tls_get_addr \+ 0
+0+[0-9a-f]+ 0+b00000007 R_X86_64_JUMP_SLOT +0+ __tls_get_addr \+ 0
-Symbol table '.dynsym' contains 29 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+1c +0 TLS +GLOBAL DEFAULT +9 sg8
- +15: 0+102060 +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
- +16: 0+8 +0 TLS +GLOBAL DEFAULT +9 sg3
- +17: 0+c +0 TLS +GLOBAL DEFAULT +9 sg4
- +18: 0+10 +0 TLS +GLOBAL DEFAULT +9 sg5
- +19: 0+ +0 NOTYPE GLOBAL DEFAULT UND __tls_get_addr
- +20: 0+ +0 TLS +GLOBAL DEFAULT +9 sg1
- +21: 0+1000 +0 FUNC +GLOBAL DEFAULT +7 fn1
- +22: 0+102240 +0 NOTYPE GLOBAL DEFAULT ABS __bss_start
- +23: 0+4 +0 TLS +GLOBAL DEFAULT +9 sg2
- +24: 0+14 +0 TLS +GLOBAL DEFAULT +9 sg6
- +25: 0+18 +0 TLS +GLOBAL DEFAULT +9 sg7
- +26: 0+102240 +0 NOTYPE GLOBAL DEFAULT ABS _edata
- +27: 0+102190 +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
- +28: 0+102240 +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 +13 *
+ +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +14 *
+ +[0-9]+: 0+1c +0 TLS +GLOBAL DEFAULT +8 sg8
+ +[0-9]+: 0+101210 +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_addr
+ +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +8 sg1
+ +[0-9]+: 0+1000 +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+1013d0 +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _end
-Symbol table '.symtab' contains 56 entries:
+Symbol table '.symtab' contains 57 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+20 +0 TLS +LOCAL DEFAULT +9 sl1
- +18: 0+24 +0 TLS +LOCAL DEFAULT +9 sl2
- +19: 0+28 +0 TLS +LOCAL DEFAULT +9 sl3
- +20: 0+2c +0 TLS +LOCAL DEFAULT +9 sl4
- +21: 0+30 +0 TLS +LOCAL DEFAULT +9 sl5
- +22: 0+34 +0 TLS +LOCAL DEFAULT +9 sl6
- +23: 0+38 +0 TLS +LOCAL DEFAULT +9 sl7
- +24: 0+3c +0 TLS +LOCAL DEFAULT +9 sl8
- +25: 0+60 +0 TLS +LOCAL HIDDEN +10 sH1
- +26: 0+48 +0 TLS +LOCAL HIDDEN +9 sh3
- +27: 0+64 +0 TLS +LOCAL HIDDEN +10 sH2
- +28: 0+78 +0 TLS +LOCAL HIDDEN +10 sH7
- +29: 0+58 +0 TLS +LOCAL HIDDEN +9 sh7
- +30: 0+5c +0 TLS +LOCAL HIDDEN +9 sh8
- +31: 0+6c +0 TLS +LOCAL HIDDEN +10 sH4
- +32: 0+4c +0 TLS +LOCAL HIDDEN +9 sh4
- +33: 0+68 +0 TLS +LOCAL HIDDEN +10 sH3
- +34: 0+50 +0 TLS +LOCAL HIDDEN +9 sh5
- +35: 0+70 +0 TLS +LOCAL HIDDEN +10 sH5
- +36: 0+74 +0 TLS +LOCAL HIDDEN +10 sH6
- +37: 0+7c +0 TLS +LOCAL HIDDEN +10 sH8
- +38: 0+40 +0 TLS +LOCAL HIDDEN +9 sh1
- +39: 0+44 +0 TLS +LOCAL HIDDEN +9 sh2
- +40: 0+54 +0 TLS +LOCAL HIDDEN +9 sh6
- +41: 0+1c +0 TLS +GLOBAL DEFAULT +9 sg8
- +42: 0+102060 +0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
- +43: 0+8 +0 TLS +GLOBAL DEFAULT +9 sg3
- +44: 0+c +0 TLS +GLOBAL DEFAULT +9 sg4
- +45: 0+10 +0 TLS +GLOBAL DEFAULT +9 sg5
- +46: 0+ +0 NOTYPE GLOBAL DEFAULT UND __tls_get_addr
- +47: 0+ +0 TLS +GLOBAL DEFAULT +9 sg1
- +48: 0+1000 +0 FUNC +GLOBAL DEFAULT +7 fn1
- +49: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS __bss_start
- +50: 0+4 +0 TLS +GLOBAL DEFAULT +9 sg2
- +51: 0+14 +0 TLS +GLOBAL DEFAULT +9 sg6
- +52: 0+18 +0 TLS +GLOBAL DEFAULT +9 sg7
- +53: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _edata
- +54: 0+102190 +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
- +55: [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-9a-f]+ +0 SECTION LOCAL DEFAULT +17 *
+ +[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+101210 +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_addr
+ +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +8 sg1
+ +[0-9]+: 0+1000 +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+1013d0 +0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: [0-9a-f]+ +0 NOTYPE GLOBAL DEFAULT ABS _end
diff --git a/ld/testsuite/ld-x86-64/tlspic.sd b/ld/testsuite/ld-x86-64/tlspic.sd
index a79ebadc66..831f0e5f82 100644
--- a/ld/testsuite/ld-x86-64/tlspic.sd
+++ b/ld/testsuite/ld-x86-64/tlspic.sd
@@ -8,14 +8,12 @@
.*: +file format elf64-x86-64
Contents of section .got:
- 102190 [0-9a-f]+ [0-9a-f]+ 00000000 00000000 .*
- 1021a0 00000000 00000000 [0-9a-f]+ [0-9a-f]+ .*
- 1021b0 00000000 00000000 20000000 00000000 .*
- 1021c0 00000000 00000000 00000000 00000000 .*
- 1021d0 00000000 00000000 00000000 00000000 .*
- 1021e0 00000000 00000000 60000000 00000000 .*
- 1021f0 00000000 00000000 00000000 00000000 .*
- 102200 00000000 00000000 00000000 00000000 .*
- 102210 00000000 00000000 00000000 00000000 .*
- 102220 00000000 00000000 00000000 00000000 .*
- 102230 40000000 00000000 00000000 00000000 .*
+ 101340 00000000 00000000 20000000 00000000 .*
+ 101350 00000000 00000000 00000000 00000000 .*
+ 101360 00000000 00000000 00000000 00000000 .*
+ 101370 00000000 00000000 60000000 00000000 .*
+ 101380 00000000 00000000 00000000 00000000 .*
+ 101390 00000000 00000000 00000000 00000000 .*
+ 1013a0 00000000 00000000 00000000 00000000 .*
+ 1013b0 00000000 00000000 00000000 00000000 .*
+ 1013c0 40000000 00000000 00000000 00000000 .*
diff --git a/ld/testsuite/ld-x86-64/tlspic.td b/ld/testsuite/ld-x86-64/tlspic.td
index 18ec846d4e..d3df20c934 100644
--- a/ld/testsuite/ld-x86-64/tlspic.td
+++ b/ld/testsuite/ld-x86-64/tlspic.td
@@ -8,9 +8,9 @@
.*: +file format elf64-x86-64
Contents of section .tdata:
- 102000 11000000 12000000 13000000 14000000 .*
- 102010 15000000 16000000 17000000 18000000 .*
- 102020 41000000 42000000 43000000 44000000 .*
- 102030 45000000 46000000 47000000 48000000 .*
- 102040 01010000 02010000 03010000 04010000 .*
- 102050 05010000 06010000 07010000 08010000 .*
+ 1011ac 11000000 12000000 13000000 14000000 .*
+ 1011bc 15000000 16000000 17000000 18000000 .*
+ 1011cc 41000000 42000000 43000000 44000000 .*
+ 1011dc 45000000 46000000 47000000 48000000 .*
+ 1011ec 01010000 02010000 03010000 04010000 .*
+ 1011fc 05010000 06010000 07010000 08010000 .*