1 Test that --export will also fetch lazy symbols from archives
3 RUN: llc -filetype=obj %S/Inputs/start.ll -o %t.o
4 RUN: llc -filetype=obj %S/Inputs/archive1.ll -o %t.a1.o
5 RUN: llc -filetype=obj %S/Inputs/archive2.ll -o %t.a2.o
7 RUN: llvm-ar rcs %t.a %t.a1.o %t.a2.o
8 RUN: wasm-ld --export-dynamic --export=archive2_symbol -o %t.wasm %t.a %t.o
9 RUN: obj2yaml %t.wasm | FileCheck %s
10 RUN: wasm-ld --export-dynamic -o %t.wasm %t.a %t.o
11 RUN: obj2yaml %t.wasm | FileCheck %s -check-prefix=NOEXPORT
14 CHECK-NEXT: - Name: memory
15 CHECK-NEXT: Kind: MEMORY
17 CHECK-NEXT: - Name: __heap_base
18 CHECK-NEXT: Kind: GLOBAL
20 CHECK-NEXT: - Name: __data_end
21 CHECK-NEXT: Kind: GLOBAL
23 CHECK-NEXT: - Name: foo
24 CHECK-NEXT: Kind: FUNCTION
26 CHECK-NEXT: - Name: bar
27 CHECK-NEXT: Kind: FUNCTION
29 CHECK-NEXT: - Name: archive2_symbol
30 CHECK-NEXT: Kind: FUNCTION
32 CHECK-NEXT: - Name: _start
33 CHECK-NEXT: Kind: FUNCTION
35 CHECK-NEXT: - Type: CODE
38 NOEXPORT-NEXT: - Name: memory
39 NOEXPORT-NEXT: Kind: MEMORY
40 NOEXPORT-NEXT: Index: 0
41 NOEXPORT-NEXT: - Name: __heap_base
42 NOEXPORT-NEXT: Kind: GLOBAL
43 NOEXPORT-NEXT: Index: 1
44 NOEXPORT-NEXT: - Name: __data_end
45 NOEXPORT-NEXT: Kind: GLOBAL
46 NOEXPORT-NEXT: Index: 2
47 NOEXPORT-NEXT: - Name: _start
48 NOEXPORT-NEXT: Kind: FUNCTION
49 NOEXPORT-NEXT: Index: 1
50 NOEXPORT-NEXT: - Type: CODE