brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · ad67e79 Raw
42 lines · plain
1// REQUIRES: x862// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o3// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/tls-opt-gdie.s -o %tso.o4// RUN: ld.lld -shared %tso.o -soname=so -o %t.so5// RUN: ld.lld %t.o %t.so -o %t16// RUN: llvm-readelf -S %t1 | FileCheck --check-prefix=SEC --implicit-check-not=.plt %s7// RUN: llvm-readobj -r %t1 | FileCheck --check-prefix=RELOC %s8// RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t1 | FileCheck --check-prefix=DISASM %s9 10// SEC: .got PROGBITS 00000000002023a8 0003a8 000010 00 WA 0 0 811 12//RELOC:      Relocations [13//RELOC-NEXT:   Section (5) .rela.dyn {14//RELOC-NEXT:     0x2023A8 R_X86_64_TPOFF64 tlsshared0 0x015//RELOC-NEXT:     0x2023B0 R_X86_64_TPOFF64 tlsshared1 0x016//RELOC-NEXT:   }17//RELOC-NEXT: ]18 19// 0x2023A8 - (2012d1+7) = 430420// 0x2023B0 - (2012e1+7) = 429621// DISASM:      Disassembly of section .text:22// DISASM-EMPTY:23// DISASM-NEXT: <_start>:24// DISASM-NEXT:               movq %fs:0, %rax25// DISASM-NEXT: 2012d1:       addq 4304(%rip), %rax26// DISASM-NEXT:               movq %fs:0, %rax27// DISASM-NEXT: 2012e1:       addq 4296(%rip), %rax28 29.section .text30.globl _start31_start:32 .byte 0x6633 leaq tlsshared0@tlsgd(%rip),%rdi34 .word 0x666635 rex6436 call __tls_get_addr@plt37 .byte 0x6638 leaq tlsshared1@tlsgd(%rip),%rdi39 .word 0x666640 rex6441 call __tls_get_addr@plt42