summaryrefslogtreecommitdiff
path: root/lld/wasm/MapFile.cpp
AgeCommit message (Collapse)Author
2025-05-25[lld] Remove unused includes (NFC) (#141421)Kazu Hirata
2025-01-02[lld][WebAssembly] Replace config-> with ctx.arg.Fangrui Song
Change the global variable reference to a member access of another variable `ctx`. In the future, we may pass through `ctx` to functions to eliminate global variables. Pull Request: https://github.com/llvm/llvm-project/pull/119835
2024-01-18[lld][WebAssembly] Move input vectors from symtab to ctx. NFC (#78640)Sam Clegg
Also convert from std::vector to SmallVector. This matches the ELF linker where these were moved into the ctx object in 9a572164d592e and converted to SmallVector in ba948c5a9c524b.
2022-09-17[lld] Don't include SetVector.h (NFC)Kazu Hirata
2022-06-19Rename parallelForEachN to just parallelForNico Weber
Patch created by running: rg -l parallelForEachN | xargs sed -i '' -c 's/parallelForEachN/parallelFor/' No behavior change. Differential Revision: https://reviews.llvm.org/D128140
2021-07-07[WebAssembly][lld] Fix segfault on .bss sections in mapfileThomas Lively
When memory is declared in the Wasm module, we rely on the implicit zero initialization behavior and do not explicitly output .bss sections. The means that they do not have associated `outputSec` entries, which was causing segfaults in the mapfile support. Fix the issue by guarding against null `outputSec` and falling back to using a zero offset. Differential Revision: https://reviews.llvm.org/D102951
2021-02-26[lld][WebAssembly] Rename methods/members to match ELF backend. NFC.Sam Clegg
Specifically: - InputChunk::outputOffset -> outSecOffset - Symbol::get/setVirtualAddress -> get/setVA - add InputChunk::getOffset helper that takes an offset These are mostly in preparation for adding support for SHF_MERGE/SHF_STRINGS but its also good to align with ELF where possible. Differential Revision: https://reviews.llvm.org/D97595
2021-02-11[lld][WebAssembly] Delay the merging of data section when dynamic linkingSam Clegg
With dynamic linking we have the current limitation that there can be only a single active data segment (since we use __memory_base as the load address and we can't do arithmetic in constant expresions). This change delays the merging of active segments until a little later in the linking process which means that the grouping of data by section, and the magic __start/__end symbols work as expected under dynamic linking. Differential Revision: https://reviews.llvm.org/D96453
2021-02-11[lld][WebAssembly] Common superclass for input globals/events/tablesAndy Wingo
This commit regroups commonalities among InputGlobal, InputEvent, and InputTable into the new InputElement. The subclasses are defined inline in the new InputElement.h. NFC. Reviewed By: sbc100 Differential Revision: https://reviews.llvm.org/D94677
2021-02-09[lld][WebAssembly] Fix segfault in map file supportThomas Lively
The code previously assumed that `getChunk` would return a non-null pointer for every symbol, but in fact it only returns non-null pointers for DefinedFunction and DefinedData symbols. This patch fixes the segfault by checking whether `getChunk` returns a null for each symbol and skipping the mapping output for any symbols for which it does. Differential Revision: https://reviews.llvm.org/D88369
2020-09-12[lld][WebAssembly] Add initial support for -Map/--print-mapSam Clegg
Differential Revision: https://reviews.llvm.org/D77187