1 ; RUN: llvm-as -o %t.bc %s
2 ; RUN: not wasm-ld --export=missing -o %t.wasm %t.bc 2>&1 | FileCheck -check-prefix=CHECK-ERROR %s
3 ; RUN: wasm-ld --export=hidden_function -o %t.wasm %t.bc
4 ; RUN: obj2yaml %t.wasm | FileCheck %s
6 target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128"
7 target triple = "wasm32-unknown-unknown"
9 define hidden i32 @hidden_function() local_unnamed_addr {
14 define void @_start() local_unnamed_addr {
19 ; CHECK-ERROR: error: symbol exported via --export not found: missing
21 ; CHECK: - Type: EXPORT
22 ; CHECK-NEXT: Exports:
23 ; CHECK-NEXT: - Name: memory
24 ; CHECK-NEXT: Kind: MEMORY
25 ; CHECK-NEXT: Index: 0
26 ; CHECK-NEXT: - Name: hidden_function
27 ; CHECK-NEXT: Kind: FUNCTION
28 ; CHECK-NEXT: Index: 0
29 ; CHECK-NEXT: - Name: _start
30 ; CHECK-NEXT: Kind: FUNCTION
31 ; CHECK-NEXT: Index: 1
32 ; CHECK-NEXT: - Type: CODE