llvm-project/lld/wasm
Sam Clegg 19cedd3cd3 [lld][WebAssembly] Fix for string merging + negative addends
Don't include the relocation addend when calculating the
virtual address of a symbol.  Instead just pass the symbol's
offset and add the addend afterwards.

Without this fix we hit the `offset is outside the section`
error in MergeInputSegment::getSegmentPiece.

This fixes a real world error we were are seeing in emscripten.

Differential Revision: https://reviews.llvm.org/D102271
2021-05-11 17:47:57 -07:00
..
CMakeLists.txt Reland: "[lld][WebAssembly] Initial support merging string data" 2021-05-10 16:03:38 -07:00
Config.h [lld][WebAssembly] Add `--export-if-defined` 2021-04-29 10:58:45 -07:00
Driver.cpp Reland: "[lld][WebAssembly] Initial support merging string data" 2021-05-10 16:03:38 -07:00
InputChunks.cpp [lld][WebAssembly] Remove relocation target verification 2021-05-11 12:05:14 -07:00
InputChunks.h Reland: "[lld][WebAssembly] Initial support merging string data" 2021-05-10 16:03:38 -07:00
InputElement.h [lld][WebAssembly] Common superclass for input globals/events/tables 2021-02-11 14:54:45 +01:00
InputFiles.cpp [lld][WebAssembly] Fix for string merging + negative addends 2021-05-11 17:47:57 -07:00
InputFiles.h [lld][WebAssembly] Remove relocation target verification 2021-05-11 12:05:14 -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 [lld][WebAssembly] Rename methods/members to match ELF backend. NFC. 2021-02-26 17:05:59 -08:00
MapFile.h [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
MarkLive.cpp [lld][WebAssembly] Common superclass for input globals/events/tables 2021-02-11 14:54:45 +01: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 `--export-if-defined` 2021-04-29 10:58:45 -07:00
OutputSections.cpp [lld][WebAssembly] Rename methods/members to match ELF backend. NFC. 2021-02-26 17:05:59 -08:00
OutputSections.h [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
OutputSegment.cpp Reland: "[lld][WebAssembly] Initial support merging string data" 2021-05-10 16:03:38 -07:00
OutputSegment.h Reland: "[lld][WebAssembly] Initial support merging string data" 2021-05-10 16:03:38 -07:00
Relocations.cpp [lld][WebAssembly] Disallow exporting of TLS symbols 2021-05-10 09:58:44 -07:00
Relocations.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
SymbolTable.cpp [lld][WebAssembly] -Bsymbolic creates indirect function table if needed 2021-03-04 09:28:21 +01:00
SymbolTable.h [lld][WebAssembly] -Bsymbolic creates indirect function table if needed 2021-03-04 09:28:21 +01:00
Symbols.cpp [lld][WebAssembly] Fix for string merging + negative addends 2021-05-11 17:47:57 -07:00
Symbols.h [lld][WebAssembly] Fix for string merging + negative addends 2021-05-11 17:47:57 -07:00
SyntheticSections.cpp Reland: "[lld][WebAssembly] Initial support merging string data" 2021-05-10 16:03:38 -07:00
SyntheticSections.h [WebAssembly][lld] Preassign table number 0 to indirect function table for MVP inputs 2021-02-12 20:20:19 +01:00
Writer.cpp Reland: "[lld][WebAssembly] Initial support merging string data" 2021-05-10 16:03:38 -07:00
Writer.h [WebAssembly] Refactor synthetic sections and relocation processing. NFC. 2019-05-21 09:13:09 +00:00
WriterUtils.cpp [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
WriterUtils.h [lld][WebAssembly] Common superclass for input globals/events/tables 2021-02-11 14:54:45 +01:00