1 # Verify that we can handle R_WASM_FUNCTION_OFFSET relocations against live but
2 # undefined symbols. Test that the .debug_info and .debug_int sections are
3 # generated without error
5 # Based on llvm/test/MC/WebAssembly/debuginfo-relocs.s
7 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
8 # RUN: wasm-ld --import-undefined %t.o -o %t.wasm
9 # RUN: obj2yaml %t.wasm | FileCheck %s
11 .functype undef () -> ()
14 .functype bar () -> ()
19 .functype _start () -> ()
24 .section .debug_int,"",@
29 .section .debug_info,"",@
34 # CHECK: Name: .debug_int
35 # CHECK-NEXT: Payload: '01000000'
36 # CHECK: Name: .debug_info
37 # CHECK-NEXT: Payload: 02000000FFFFFFFF00000000