xref: /llvm-project/lld/test/wasm/func-attr.s (revision 220fe00a7c0f73164711f0d6cdefacef264b85dc)
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2# RUN: wasm-ld %t.o -o %t.wasm
3# RUN: obj2yaml %t.wasm | FileCheck %s
4
5        .functype       foo () -> ()
6        .functype       bar () -> ()
7        .functype       _start () -> ()
8        .globl  foo
9        .type   foo,@function
10foo:
11        .functype       foo () -> ()
12        end_function
13
14        .section        .text.bar,"",@
15        .globl  bar
16        .type   bar,@function
17bar:
18        .functype       bar () -> ()
19        end_function
20
21        .globl  _start
22        .type   _start,@function
23_start:
24        .functype       _start () -> ()
25        call    foo
26        call    bar
27        end_function
28
29        .section        .custom_section.llvm.func_attr.custom0,"",@
30        .int32  foo@FUNCINDEX
31        .int32  bar@FUNCINDEX
32
33# CHECK:       - Type:            CUSTOM
34# CHECK-NEXT:    Name:            llvm.func_attr.custom0
35# CHECK-NEXT:    Payload:         '0000000001000000'
36