29 lines · plain
1# RUN: llvm-mc -triple=wasm32 %s | FileCheck --check-prefix=PRINT %s2# RUN: llvm-mc -filetype=obj -triple=wasm32 %s | llvm-readobj -r - | FileCheck %s3 4get_addr_func:5 .functype get_addr_func () -> (i32)6 i32.const 07 nop # 4 NOPs in addition to one zero in i32.const 0 for a canonical 5 byte relocatable [S]LEB.8 nop9 nop10 nop11 end_function12 13# PRINT: .reloc get_addr_func+2, R_WASM_MEMORY_ADDR_SLEB, function_index_data+114# CHECK: Section ({{.*}}) CODE {15# CHECK-NEXT: 0x4 R_WASM_MEMORY_ADDR_SLEB function_index_data 116# CHECK-NEXT: }17.reloc get_addr_func + 2, R_WASM_MEMORY_ADDR_SLEB, function_index_data + 118 19.section .data,"",@20function_index_data:21 .int32 022.size function_index_data, 423 24# PRINT: .reloc function_index_data, R_WASM_FUNCTION_INDEX_I32, get_addr_func25# CHECK: Section ({{.*}}) DATA {26# CHECK-NEXT: 0x6 R_WASM_FUNCTION_INDEX_I32 get_addr_func27# CHECK-NEXT: }28.reloc function_index_data, R_WASM_FUNCTION_INDEX_I32, get_addr_func29