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 3 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 14 15.section .data,"",@ 16.globl foo 17foo: 18 .int32 0 19 .size foo, 4 20 21.section .bss,"",@ 22.globl bar 23bar: 24 .int32 0 25 .size bar, 4 26 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` 30