[all-commits] [llvm/llvm-project] 22b7b8: [lld][WebAssembly] Report undefined symbols in -sh...
Sam Clegg via All-commits
all-commits at lists.llvm.org
Fri Jul 12 13:27:13 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 22b7b84860d39da71964c9b329937f2ee1d875ba
https://github.com/llvm/llvm-project/commit/22b7b84860d39da71964c9b329937f2ee1d875ba
Author: Sam Clegg <sbc at chromium.org>
Date: 2024-07-12 (Fri, 12 Jul 2024)
Changed paths:
M lld/test/wasm/Inputs/ret32.s
A lld/test/wasm/dylink.s
M lld/test/wasm/emit-relocs.s
A lld/test/wasm/no-shlib-sigcheck.s
M lld/test/wasm/pie.s
M lld/test/wasm/shared-needed.s
M lld/test/wasm/shared.s
M lld/test/wasm/shared64.s
M lld/test/wasm/signature-mismatch.s
M lld/test/wasm/tag-section.ll
A lld/test/wasm/undef-shared.s
M lld/test/wasm/undefined-data.s
M lld/test/wasm/unresolved-symbols.s
M lld/wasm/Config.h
M lld/wasm/Driver.cpp
M lld/wasm/InputFiles.cpp
M lld/wasm/InputFiles.h
M lld/wasm/MarkLive.cpp
M lld/wasm/Options.td
M lld/wasm/Relocations.cpp
M lld/wasm/SymbolTable.cpp
M lld/wasm/SymbolTable.h
M lld/wasm/Symbols.cpp
M lld/wasm/Symbols.h
M lld/wasm/SyntheticSections.cpp
M lld/wasm/Writer.cpp
M llvm/lib/Object/WasmObjectFile.cpp
Log Message:
-----------
[lld][WebAssembly] Report undefined symbols in -shared/-pie builds (#75242)
Previously we would ignore all undefined symbols when using
`-shared` or `-pie`. All undefined symbols would be treated as imports
regardless of whether those symbols we defined in any shared library.
With this change we now track symbol in shared libraries and report
undefined symbols in the main program by default.
The old behavior is still available via the
`--unresolved-symbols=import-dynamic` command line flag.
This rationale for allowing this type of breaking change is that `-pie`
and `-shared` are both still experimental will warn as such, unless
`--experimental-pic` is passed.
As part of this change the linker now models shared library symbols
via new SharedFunctionSymbol and SharedDataSymbol types.
I've also added a new `--no-shlib-sigcheck` option that bypassed the
checking of functions signature in shared libraries. This is
specifically required by emscripten the case where the imports/exports
of shared libraries have been modified by via JS type legalization (this
is only needed when targeting old JS engines where bigint is not yet
available
See https://github.com/emscripten-core/emscripten/issues/18198
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