llvm-capstone/lld/wasm
Dan Gohman 6cd8511e59 [WebAssembly] New-style command support
This adds support for new-style command support. In this mode, all exports
are considered command entrypoints, and the linker inserts calls to
`__wasm_call_ctors` and `__wasm_call_dtors` for all such entrypoints.

This enables support for:

 - Command entrypoints taking arguments other than strings and return values
   other than `int`.
 - Multicall executables without requiring on the use of string-based
   command-line arguments.

This new behavior is disabled when the input has an explicit call to
`__wasm_call_ctors`, indicating code not expecting new-style command
support.

This change does mean that wasm-ld no longer supports DCE-ing the
`__wasm_call_ctors` function when there are no calls to it. If there are no
calls to it, and there are ctors present, we assume it's wasm-ld's job to
insert the calls. This seems ok though, because if there are ctors present,
the program is expecting them to be called. This change affects the
init-fini-gc.ll test.
2020-09-30 19:02:40 -07:00
..
CMakeLists.txt [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
Config.h [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
Driver.cpp [WebAssembly] New-style command support 2020-09-30 19:02:40 -07:00
InputChunks.cpp [WebAssembly] wasm64: fix memory.init operand types 2020-08-10 10:15:20 -07:00
InputChunks.h [WebAssembly] New-style command support 2020-09-30 19:02:40 -07:00
InputEvent.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
InputFiles.cpp [WebAssembly] 64-bit (function) pointer fixes. 2020-07-16 14:10:22 -07:00
InputFiles.h [WebAssembly] Adding 64-bit version of R_WASM_MEMORY_ADDR_* relocs 2020-06-15 10:07:42 -07:00
InputGlobal.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
LTO.cpp [ThinLTO] Allow usage of all hardware threads in the system 2020-03-27 10:20:58 -04:00
LTO.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
MapFile.cpp [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
MapFile.h [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
MarkLive.cpp [WebAssembly] New-style command support 2020-09-30 19:02:40 -07:00
MarkLive.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Options.td [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
OutputSections.cpp [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
OutputSections.h [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
OutputSegment.h [WebAssembly] wasm64: fix memory.init operand types 2020-08-10 10:15:20 -07:00
Relocations.cpp [lld][WebAssembly] Allow globals imports via import_name/import_module 2020-09-14 20:35:03 -07:00
Relocations.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Symbols.cpp [WebAssembly] New-style command support 2020-09-30 19:02:40 -07:00
Symbols.h [WebAssembly] New-style command support 2020-09-30 19:02:40 -07:00
SymbolTable.cpp [WebAssembly] wasm64: fix memory.init operand types 2020-08-10 10:15:20 -07:00
SymbolTable.h [WebAssembly] wasm64: fix memory.init operand types 2020-08-10 10:15:20 -07:00
SyntheticSections.cpp [WebAssembly] Triple::wasm64 related cleanup 2020-07-16 12:01:10 -07:00
SyntheticSections.h [wasm] Move WasmTraits.h to BinaryFormat 2020-09-28 22:07:28 +02:00
Writer.cpp [WebAssembly] New-style command support 2020-09-30 19:02:40 -07:00
Writer.h [WebAssembly] Refactor synthetic sections and relocation processing. NFC. 2019-05-21 09:13:09 +00:00
WriterUtils.cpp [lld][WebAssembly] Emit all return types of multivalue functions 2020-08-12 13:14:15 -07:00
WriterUtils.h [WebAssembly] Adding 64-bit version of R_WASM_MEMORY_ADDR_* relocs 2020-06-15 10:07:42 -07:00