blob: b3b1e8a0602772a017711e6b0d61c3d7b023fafd [file] [log] [blame]
Ryan Prichard1c33d142018-09-18 00:24:481// REQUIRES: x86
2
3// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
4// RUN: ld.lld -shared --pack-dyn-relocs=android %t.o -o %t.so
Fangrui Songb1599062019-05-01 05:49:015// RUN: llvm-readobj -r %t.so | FileCheck %s
Ryan Prichard1c33d142018-09-18 00:24:486
7// Bug 37841: Symbol::getVA must work on TLS symbols during the layout loop in
8// finalizeSections. This test uses an atypical IE access in a shared object to
9// access a local TLS symbol, because a more typical access would avoid the
10// bug.
11
12 .globl foo
13foo:
14 movq tlsvar@GOTTPOFF(%rip), %rcx
15
16 .section .tdata,"awT",@progbits
17 .space 0x1234
18tlsvar:
19 .word 42
20
21// CHECK: Section ({{.+}}) .rela.dyn {
22// CHECK-NEXT: R_X86_64_TPOFF64 - 0x1234
23// CHECK-NEXT: }