llvm-capstone/lld/wasm
Sam Clegg 6f5c5cbe5f [lld][WebAssembly] Fix for debug relocations against undefined function symbols
This is very similar to https://reviews.llvm.org/D103557 but applies to
symbols which are undefined at link time rather than compile time.

We already have code that handles symbols which were defined at link
time but dead stripped by `--gc-sections` (See
`test/wasm/debug-removed-fn.ll`). In that case the symbols are not live
(!isLive()).  However, we can also have live symbols (which are
references by the program) but which are undefined at link time and are
imported by the linker.

In the test case here the symbol `undef` is used but is not defined
in the program but is imported by the linker due to the
`--import-undefined` flag.

Fixes: https://github.com/emscripten-core/emscripten/issues/15528

Differential Revision: https://reviews.llvm.org/D114921
2021-12-02 08:36:28 -08:00
..
CMakeLists.txt
Config.h [lld][WebAssembly] Initialize bss segments using memory.fill 2021-10-28 17:15:08 -07:00
Driver.cpp [NFC] Inclusive language: Remove instances of master in URLs 2021-11-05 08:48:41 -05:00
InputChunks.cpp fix comment typos to cycle bots 2021-10-27 09:53:08 -04:00
InputChunks.h [WebAssembly] Add explict TLS symbol flag 2021-09-09 10:03:30 -04:00
InputElement.h [WebAssembly] Remove WasmTagType 2021-10-05 17:11:22 -07:00
InputFiles.cpp [lld][WebAssembly] Fix for debug relocations against undefined function symbols 2021-12-02 08:36:28 -08:00
InputFiles.h [lld][WebAssembly] Handle duplicate archive member names in ThinLTO 2021-10-28 11:48:04 -07:00
LTO.cpp [Support] Improve Caching conformance with Support library behavior 2021-11-04 13:00:44 -07:00
LTO.h
MapFile.cpp
MapFile.h
MarkLive.cpp
MarkLive.h
Options.td fix comment typos to cycle bots 2021-10-27 09:53:08 -04:00
OutputSections.cpp [lld][WebAssembly] Initialize bss segments using memory.fill 2021-10-28 17:15:08 -07:00
OutputSections.h [lld][WebAssembly] Cleanup output of --verbose 2021-09-10 11:35:50 -04:00
OutputSegment.cpp
OutputSegment.h [lld][WebAssembly] Initialize bss segments using memory.fill 2021-10-28 17:15:08 -07:00
Relocations.cpp fix comment typos to cycle bots 2021-10-27 09:53:08 -04:00
Relocations.h
Symbols.cpp [lld][WebAssembly] Handle TLS variables in Symbol::getVA. NFC 2021-10-29 10:45:30 -07:00
Symbols.h fix comment typos to cycle bots 2021-10-27 09:53:08 -04:00
SymbolTable.cpp [lld] Rename addCombinedLTOObjects to match ELF driver. NFC 2021-10-28 11:46:19 -07:00
SymbolTable.h [lld] Rename addCombinedLTOObjects to match ELF driver. NFC 2021-10-28 11:46:19 -07:00
SyntheticSections.cpp [lld][WebAssembly] Generate TLS relocation code also when linking statically 2021-10-29 13:26:35 -07:00
SyntheticSections.h [NFC] Inclusive language: Remove instances of master in URLs 2021-11-05 08:48:41 -05:00
Writer.cpp [lld][WebAssembly] Generate TLS relocation code also when linking statically 2021-10-29 13:26:35 -07:00
Writer.h
WriterUtils.cpp [WebAssembly] Remove WasmTagType 2021-10-05 17:11:22 -07:00
WriterUtils.h [WebAssembly] Remove WasmTagType 2021-10-05 17:11:22 -07:00