1 Optional linker-synthetic symbols are only created if they are undefined
3 This test is for a regression where an explicit --export of an lazy archive
4 symbol caused an undefined reference to an optional symbol to occur *after*
5 the optional symbols were created.
7 RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/start.s -o %t.o
8 RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/optional-symbol.s -o %t.a1.o
10 RUN: llvm-ar rcs %t.a %t.a1.o
11 RUN: wasm-ld --export=get_optional %t.o %t.a -o %t.wasm
12 RUN: obj2yaml %t.wasm | FileCheck %s
15 CHECK-NEXT: - Index: 0
16 CHECK-NEXT: Name: _start
17 CHECK-NEXT: - Index: 1
18 CHECK-NEXT: Name: get_optional