brintos

brintos / llvm-project-archived public Read only

0
0
Text · 908 B · 06d248b Raw
38 lines · plain
1# Verify that we can handle R_WASM_FUNCTION_OFFSET relocations against live but2# undefined symbols.  Test that the .debug_info and .debug_int sections are3# generated without error4#5# Based on llvm/test/MC/WebAssembly/debuginfo-relocs.s6#7# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s8# RUN: wasm-ld --import-undefined %t.o -o %t.wasm9# RUN: obj2yaml %t.wasm | FileCheck %s10 11.functype undef () -> ()12 13bar:14    .functype bar () -> ()15    end_function16 17    .globl _start18_start:19    .functype _start () -> ()20    call bar21    call undef22    end_function23 24.section .debug_int,"",@25.Ld:26  .int32 127.size .Ld, 428 29.section .debug_info,"",@30    .int32 bar31    .int32 undef32    .int32 .Ld33 34# CHECK:          Name:            .debug_int35# CHECK-NEXT:     Payload:         '01000000'36# CHECK:          Name:            .debug_info37# CHECK-NEXT:     Payload:         02000000FFFFFFFF0000000038