1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/start.s -o %t.start.o
2 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
3 # RUN: wasm-ld --export-all --import-table -o %t.wasm %t.start.o %t.o
4 # RUN: obj2yaml %t.wasm | FileCheck %s
6 .globl require_function_table
7 require_function_table:
8 .functype require_function_table () -> ()
10 call_indirect () -> ()
13 # Verify the --import-table flag creates a table import
15 # CHECK: - Type: IMPORT
16 # CHECK-NEXT: Imports:
17 # CHECK-NEXT: - Module: env
18 # CHECK-NEXT: Field: __indirect_function_table
19 # CHECK-NEXT: Kind: TABLE
21 # CHECK-NEXT: Index: 0
22 # CHECK-NEXT: ElemType: FUNCREF
24 # CHECK-NEXT: Minimum: 0x1