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 4# 5# Based on llvm/test/MC/WebAssembly/debuginfo-relocs.s 6# 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 10 11.functype undef () -> () 12 13bar: 14 .functype bar () -> () 15 end_function 16 17 .globl _start 18_start: 19 .functype _start () -> () 20 call bar 21 call undef 22 end_function 23 24.section .debug_int,"",@ 25.Ld: 26 .int32 1 27.size .Ld, 4 28 29.section .debug_info,"",@ 30 .int32 bar 31 .int32 undef 32 .int32 .Ld 33 34# CHECK: Name: .debug_int 35# CHECK-NEXT: Payload: '01000000' 36# CHECK: Name: .debug_info 37# CHECK-NEXT: Payload: 02000000FFFFFFFF00000000 38