-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lld][WebAssembly] Ignore local symbols when parsing lazy object file…
…s. (#104876) This was broken back in #78658 when we transitioned away from archive indexes to parsing lazy object files. Fixes: #94077 Fixes: emscripten-core/emscripten#22008
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Test that local symbols in archive files are ignored. | ||
# RUN: split-file %s %t | ||
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t/foo.o %t/foo.s | ||
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t/main.o %t/main.s | ||
# RUN: rm -f %t/libfoo.a | ||
# RUN: llvm-ar rcs %t/libfoo.a %t/foo.o | ||
# RUN: not wasm-ld %t/libfoo.a %t/main.o -o out.wasm 2>&1 | FileCheck %s | ||
|
||
#--- main.s | ||
|
||
.functype foo () -> () | ||
|
||
.globl _start | ||
_start: | ||
.functype _start () -> () | ||
call foo | ||
# CHECK: main.o: undefined symbol: foo | ||
end_function | ||
|
||
#--- foo.s | ||
|
||
foo: | ||
.functype foo () -> () | ||
end_function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters