1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s 2# RUN: not wasm-ld -o %t.wasm %t.o 2>&1 | FileCheck %s -check-prefix=UNDEF 3# RUN: wasm-ld --allow-undefined -o %t.wasm %t.o 4# RUN: not wasm-ld --shared -o %t.wasm %t.o 2>&1 | FileCheck %s -check-prefix=SHARED 5 6.globl _start 7_start: 8 .functype _start () -> (i32) 9 i32.load data_external 10 end_function 11 12.size data_external, 4 13 14# UNDEF: error: {{.*}}undefined-data.s.tmp.o: undefined symbol: data_external 15# SHARED: error: {{.*}}undefined-data.s.tmp.o: relocation R_WASM_MEMORY_ADDR_LEB cannot be used against symbol data_external; recompile with -fPIC 16