101 lines · plain
1// REQUIRES: x862// RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %s -o %t.o3// RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %p/Inputs/tls-opt-iele-i686-nopic.s -o %tso.o4// RUN: ld.lld -shared %tso.o -soname=t.so -o %tso5// RUN: ld.lld --hash-style=sysv %t.o %tso -o %t16// RUN: llvm-readobj -S -r %t1 | FileCheck --check-prefix=GOTREL %s7// RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t1 | FileCheck --check-prefix=DISASM %s8 9// GOTREL: Section {10// GOTREL: Index:11// GOTREL: Name: .got12// GOTREL-NEXT: Type: SHT_PROGBITS13// GOTREL-NEXT: Flags [14// GOTREL-NEXT: SHF_ALLOC15// GOTREL-NEXT: SHF_WRITE16// GOTREL-NEXT: ]17// GOTREL-NEXT: Address: 0x40225018// GOTREL-NEXT: Offset: 0x25019// GOTREL-NEXT: Size: 820// GOTREL-NEXT: Link: 021// GOTREL-NEXT: Info: 022// GOTREL-NEXT: AddressAlignment: 423// GOTREL-NEXT: EntrySize: 024// GOTREL-NEXT: }25// GOTREL: Relocations [26// GOTREL-NEXT: Section ({{.*}}) .rel.dyn {27// GOTREL-NEXT: 0x402250 R_386_TLS_TPOFF tlsshared028// GOTREL-NEXT: 0x402254 R_386_TLS_TPOFF tlsshared129// GOTREL-NEXT: }30// GOTREL-NEXT: ]31 32// DISASM: Disassembly of section .text:33// DISASM-EMPTY:34// DISASM-NEXT: <_start>:35// DISASM-NEXT: 4011b0: movl $0xfffffff8, %ecx36// DISASM-NEXT: movl %gs:(%ecx), %eax37// DISASM-NEXT: movl $0xfffffff8, %eax38// DISASM-NEXT: movl %gs:(%eax), %eax39// DISASM-NEXT: addl $0xfffffff8, %ecx40// DISASM-NEXT: movl %gs:(%ecx), %eax41// DISASM-NEXT: movl $0xfffffffc, %ecx42// DISASM-NEXT: movl %gs:(%ecx), %eax43// DISASM-NEXT: movl $0xfffffffc, %eax44// DISASM-NEXT: movl %gs:(%eax), %eax45// DISASM-NEXT: addl $0xfffffffc, %ecx46// DISASM-NEXT: movl %gs:(%ecx), %eax47/// &.got[0]48// DISASM-NEXT: movl 0x402250, %ecx49// DISASM-NEXT: movl %gs:(%ecx), %eax50/// &.got[1]51// DISASM-NEXT: addl 0x402254, %ecx52// DISASM-NEXT: movl %gs:(%ecx), %eax53 54.type tlslocal0,@object55.section .tbss,"awT",@nobits56.globl tlslocal057.align 458tlslocal0:59 .long 060 .size tlslocal0, 461 62.type tlslocal1,@object63.section .tbss,"awT",@nobits64.globl tlslocal165.align 466tlslocal1:67 .long 068 .size tlslocal1, 469 70.section .text71.globl ___tls_get_addr72.type ___tls_get_addr,@function73___tls_get_addr:74 75.section .text76.globl _start77_start:78movl tlslocal0@indntpoff,%ecx79movl %gs:(%ecx),%eax80 81movl tlslocal0@indntpoff,%eax82movl %gs:(%eax),%eax83 84addl tlslocal0@indntpoff,%ecx85movl %gs:(%ecx),%eax86 87movl tlslocal1@indntpoff,%ecx88movl %gs:(%ecx),%eax89 90movl tlslocal1@indntpoff,%eax91movl %gs:(%eax),%eax92 93addl tlslocal1@indntpoff,%ecx94movl %gs:(%ecx),%eax95 96movl tlsshared0@indntpoff,%ecx97movl %gs:(%ecx),%eax98 99addl tlsshared1@indntpoff,%ecx100movl %gs:(%ecx),%eax101