llvm-project/lld/wasm
Sam Clegg c468dc1b12 [lld][WebAssembly] Handle weakly defined symbols in shared libraries.
In the case of weakly defined symbols in shared libraries we now
generate both an import and an export.  The dynamic linker can then
choose how a winner from among all the shared libraries that define a
given symbol.

Previously any direct usage of a weakly defined symbol would use the
DSO-local definition (For example, even through there would be single
address for a weakly defined function, each DSO could end up directly
calling its local version).

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

Differential Revision: https://reviews.llvm.org/D108413
2021-08-19 19:25:49 -04:00
..
CMakeLists.txt Reland: "[lld][WebAssembly] Initial support merging string data" 2021-05-10 16:03:38 -07:00
Config.h [lld][WebAssembly] Add new `--import-undefined` option 2021-06-17 11:44:21 -07:00
Driver.cpp [WebAssembly] Fixed LLD generation of 64-bit __wasm_apply_data_relocs 2021-07-15 10:02:02 -07:00
InputChunks.cpp [WebAssembly] Support R_WASM_MEMORY_ADDR_TLS_SLEB64 for wasm64 2021-07-19 10:22:43 -07:00
InputChunks.h [lld][WebAssembly] Enable string tail merging in debug sections 2021-05-18 12:25:39 -07:00
InputElement.h [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
InputFiles.cpp [LTO] Add SelectionKind to IRSymtab and use it in ld.lld/LLVMgold 2021-07-20 13:22:00 -07:00
InputFiles.h [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
LTO.cpp [LTO][wasm][NewPM] Allow using new pass manager for wasm LTO 2020-12-01 12:22:40 -08:00
LTO.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
MapFile.cpp [WebAssembly][lld] Fix segfault on .bss sections in mapfile 2021-07-07 23:31:48 -07:00
MapFile.h [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
MarkLive.cpp [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
MarkLive.h
Options.td [lld][WebAssembly] Add new `--import-undefined` option 2021-06-17 11:44:21 -07:00
OutputSections.cpp [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
OutputSections.h [lld][WebAssembly] Enable string tail merging in debug sections 2021-05-18 12:25:39 -07:00
OutputSegment.cpp [lld][WebAssembly] Enable string tail merging in debug sections 2021-05-18 12:25:39 -07:00
OutputSegment.h [lld][WebAssembly] Refactor input chunk class hierarchy. NFC 2021-05-17 21:01:17 -07:00
Relocations.cpp [lld][WebAssembly] Error on import of TLS symbols in shared libraries 2021-07-20 12:36:03 -07:00
Relocations.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
SymbolTable.cpp [WebAssembly] Avoid unused function imports in PIC mode 2021-08-18 22:31:04 -04:00
SymbolTable.h [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
Symbols.cpp [lld][WebAssembly] Handle weakly defined symbols in shared libraries. 2021-08-19 19:25:49 -04:00
Symbols.h [lld][WebAssembly] Handle weakly defined symbols in shared libraries. 2021-08-19 19:25:49 -04:00
SyntheticSections.cpp [lld][WebAssembly] Handle weakly defined symbols in shared libraries. 2021-08-19 19:25:49 -04:00
SyntheticSections.h Fix gcc build error after D105519 2021-08-09 14:32:34 +08:00
Writer.cpp [lld][WebAssembly] Handle weakly defined symbols in shared libraries. 2021-08-19 19:25:49 -04:00
Writer.h [WebAssembly] Refactor synthetic sections and relocation processing. NFC. 2019-05-21 09:13:09 +00:00
WriterUtils.cpp [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
WriterUtils.h [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00