xref: /llvm-project/llvm/test/tools/llvm-objdump/wasm/no-codesec.test (revision 8b0f47bfa4b6aa1bafa10261444c93aba5a2d31d)
1## Test that sections that use function indices (e.g. name) work without the code section
2# RUN: yaml2obj %s -o %t
3# RUN: llvm-objdump -h %t | FileCheck %s
4
5# CHECK: Sections:
6# CHECK-NEXT: Idx Name          Size     VMA      Type
7# CHECK-NEXT:   0 TYPE          00000004 0000000e
8# CHECK-NEXT:   1 FUNCTION      00000002 00000018
9# CHECK-NEXT:   2 name          00000008 00000020
10
11--- !WASM
12FileHeader:
13  Version: 0x00000001
14Sections:
15  - Type: TYPE
16    Signatures:
17      - Index: 0
18        ParamTypes: []
19        ReturnTypes: []
20  - Type: FUNCTION
21    FunctionTypes: [ 0 ]
22  - Type: CUSTOM
23    Name: name
24    FunctionNames:
25     - Index:          0
26       Name:           foo
27