28 lines · plain
1## Certain relocations types are not supported by runtime relocation code2## generated in `-shared/`-pie` binaries.3 4# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s5# RUN: not wasm-ld -pie --experimental-pic %t.o -o %t.wasm 2>&1 | FileCheck %s6 7# CHECK: wasm-ld: error: invalid runtime relocation type in data section: R_WASM_FUNCTION_INDEX_I328 9foo:10 .functype foo (i32) -> ()11 end_function12 13.globl _start14_start:15 .functype _start () -> ()16 i32.const bar@GOT17 call foo@GOT18 end_function19 20# data section containing relocation type that is not valid in a data section21.section .data,"",@22.globl bar23bar:24 .int32 025 .size bar, 426 27.reloc bar, R_WASM_FUNCTION_INDEX_I32, foo28