3 ## In this test R_X86_64_GOTTPOFF is a IE relocation (static TLS model),
4 ## test check we add STATIC_TLS flag for -shared.
6 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
7 # RUN: ld.lld %t.o -o %t.so -shared
8 # RUN: llvm-readobj --dynamic-table %t.so | FileCheck %s
9 # RUN: ld.lld %t.o -o %t -pie
10 # RUN: llvm-readobj --dynamic-table %t | FileCheck %s --check-prefix=EXE
12 # CHECK: DynamicSection [
13 # CHECK: FLAGS STATIC_TLS
15 # EXE-NOT: FLAGS STATIC_TLS
17 .section ".tdata", "awT", @progbits
21 movq var@GOTTPOFF
(%rip
), %rax
# R_X86_64_GOTTPOFF
22 movl
%fs:0(%rax
), %eax