57 lines · plain
1# RUN: split-file %s %t2# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %t/a.s -o %t1.o3# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %t/b.s -o %t2.o4# RUN: wasm-ld -o %t.wasm %t1.o %t2.o5# RUN: obj2yaml %t.wasm | FileCheck %s6 7# Ensure two custom funct_attr sections are concatenated together.8 9# CHECK: - Type: CUSTOM10# CHECK-NEXT: Name: llvm.func_attr.custom011# CHECK-NEXT: Payload: '000000000100000003000000'12 13#--- a.s14 15# Function index 3 (after linking)16 .functype baz () -> ()17# Function index 118 .functype foo () -> ()19# Function index 220 .functype bar () -> ()21 .functype _start () -> ()22 .globl foo23 .type foo,@function24foo:25 .functype foo () -> ()26 end_function27 28 .globl bar29 .type bar,@function30bar:31 .functype bar () -> ()32 end_function33 34 .globl _start35 .type _start,@function36_start:37 .functype _start () -> ()38 call foo39 call bar40 call baz41 end_function42 43 .section .custom_section.llvm.func_attr.custom0,"",@44 .int32 foo@FUNCINDEX45 .int32 bar@FUNCINDEX46 47#--- b.s48 .functype baz () -> ()49 .globl baz50 .type baz,@function51baz:52 .functype baz () -> ()53 end_function54 55 .section .custom_section.llvm.func_attr.custom0,"",@56 .int32 baz@FUNCINDEX57