[all-commits] [llvm/llvm-project] 617278: [lld][WebAssembly] Fix for shared library symbols ...
Sam Clegg via All-commits
all-commits at lists.llvm.org
Tue Jan 28 16:06:23 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 617278e7b0c937fccbf7d67d14f053c3409bc33f
https://github.com/llvm/llvm-project/commit/617278e7b0c937fccbf7d67d14f053c3409bc33f
Author: Sam Clegg <sbc at chromium.org>
Date: 2025-01-28 (Tue, 28 Jan 2025)
Changed paths:
A lld/test/wasm/shared-lazy.s
M lld/wasm/SymbolTable.cpp
Log Message:
-----------
[lld][WebAssembly] Fix for shared library symbols WRT replacing lazy symbols (#124619)
The rule here, which I'm copying from the ELF linker, is that shared
library symbols should take presence, unless the symbol has already be
extracted from the archive. e.g:
```
$ wasm-ld foo.a foo.so ref.o // .so wins
$ wasm-ld foo.a ref.o foo.so // .a wins
```
In the first case the shared library takes precedence because the lazy
symbol is replaced by the .so symbol before it is extracted from the
archive. In the second example the ref.o file causes the archive to be
exracted before the .so file is processed, so in that case the archive
file wins.
Fixes: https://github.com/emscripten-core/emscripten/issues/23501
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list