[X86][MC,LLD][NFC] Rename R_X86_64_REX2_GOTPCRELX (#116737)
[llvm-project.git] / lld / test / wasm / relocation-bad-tls.s
blob63522ebd8c979ba22e87d455f0a980d53ce64474
1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2 # RUN: not wasm-ld --shared-memory %t.o -o %t.wasm 2>&1 | FileCheck %s
4 .globl _start
5 _start:
6 .functype _start () -> ()
7 i32.const foo@TLSREL
8 i32.const bar@TLSREL
9 i32.const baz@TLSREL
10 drop
11 drop
12 drop
13 end_function
15 .section .data,"",@
16 .globl foo
17 foo:
18 .int32 0
19 .size foo, 4
21 .section .bss,"",@
22 .globl bar
23 bar:
24 .int32 0
25 .size bar, 4
27 # CHECK: relocation R_WASM_MEMORY_ADDR_TLS_SLEB cannot be used against `foo` in non-TLS section: .data
28 # CHECK: relocation R_WASM_MEMORY_ADDR_TLS_SLEB cannot be used against `bar` in non-TLS section: .bss
29 # CHECK: relocation R_WASM_MEMORY_ADDR_TLS_SLEB cannot be used against an undefined symbol `baz`