[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / x86-64-static-tls-model.s
blob0908462b40b0329d1a5328633b4995ba00f6b77a
1 # REQUIRES: x86
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
18 .globl var
19 var:
21 movq var@GOTTPOFF(%rip), %rax # R_X86_64_GOTTPOFF
22 movl %fs:0(%rax), %eax