|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6 |
|
| #
757d9d22 |
| 19-Jun-2022 |
Kazu Hirata <[email protected]> |
[lld] Use value_or instead of getValueOr (NFC)
|
|
Revision tags: llvmorg-14.0.5 |
|
| #
87099a04 |
| 03-Jun-2022 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Remove unnecessary accessor methods. NFC
This is less code, and matches more closely the ELF linker.
Differential Revision: https://reviews.llvm.org/D126979
|
|
Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
| #
86c90f9b |
| 16-Nov-2020 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Add --unresolved-symbols=import-dynamic
This is a new mode for handling unresolved symbols that allows all symbols to be imported in the same that they would be in the case of `-f
[lld][WebAssembly] Add --unresolved-symbols=import-dynamic
This is a new mode for handling unresolved symbols that allows all symbols to be imported in the same that they would be in the case of `-fpie` or `-shared`, but generting an otherwise fixed/non-relocatable binary.
Code linked in this way should still be compiled with `-fPIC` so that data symbols can be resolved via imports.
This essentially allows the building of static binaries that have dynamic imports. See: https://github.com/emscripten-core/emscripten/issues/12682
As with other uses of the experimental dynamic linking ABI, this behaviour will produce a warning unless run with `--experimental-pic`.
Differential Revision: https://reviews.llvm.org/D91577
show more ...
|
| #
4c75521c |
| 24-Feb-2022 |
Sam Clegg <[email protected]> |
[MC][WebAssembly] Fix crash when relocation addend underlows U32
For the object file writer we need to allow the underflow (ar write zero), but for the final linker output we should probably generat
[MC][WebAssembly] Fix crash when relocation addend underlows U32
For the object file writer we need to allow the underflow (ar write zero), but for the final linker output we should probably generate an error (I've left that as a TODO for now).
Fixes: https://github.com/llvm/llvm-project/issues/54012
Differential Revision: https://reviews.llvm.org/D120522
show more ...
|
| #
9f903475 |
| 27-Oct-2021 |
Nico Weber <[email protected]> |
fix comment typos to cycle bots
|
| #
670944fb |
| 15-Jul-2021 |
Wouter van Oortmerssen <[email protected]> |
[WebAssembly] Support R_WASM_MEMORY_ADDR_TLS_SLEB64 for wasm64
Also fixed TLS tests swapping addr & value in store op Differential Revision: https://reviews.llvm.org/D106096
|
| #
4157b603 |
| 13-Jul-2021 |
Wouter van Oortmerssen <[email protected]> |
[WebAssembly] Fixed LLD generation of 64-bit __wasm_apply_data_relocs
Differential Revision: https://reviews.llvm.org/D105863
|
| #
1d891d44 |
| 15-Jun-2021 |
Heejin Ahn <[email protected]> |
[WebAssembly] Rename event to tag
We recently decided to change 'event' to 'tag', and 'event section' to 'tag section', out of the rationale that the section contains a generalized tag that referenc
[WebAssembly] Rename event to tag
We recently decided to change 'event' to 'tag', and 'event section' to 'tag section', out of the rationale that the section contains a generalized tag that references a type, which may be used for something other than exceptions, and the name 'event' can be confusing in the web context.
See - https://github.com/WebAssembly/exception-handling/issues/159#issuecomment-857910130 - https://github.com/WebAssembly/exception-handling/pull/161
Reviewed By: tlively
Differential Revision: https://reviews.llvm.org/D104423
show more ...
|
| #
d01e673a |
| 17-Jun-2021 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Fix crash calling weakly undefined function in PIC code
Differential Revision: https://reviews.llvm.org/D104495
|
| #
3a293cbf |
| 22-Apr-2021 |
Wouter van Oortmerssen <[email protected]> |
[WebAssembly] Fix PIC/GOT codegen for wasm64
__table_base is know 64-bit, since in LLVM it represents a function pointer offset __table_base32 is a copy in wasm32 for use in elem init expr, since no
[WebAssembly] Fix PIC/GOT codegen for wasm64
__table_base is know 64-bit, since in LLVM it represents a function pointer offset __table_base32 is a copy in wasm32 for use in elem init expr, since no truncation may be used there. New reloc R_WASM_TABLE_INDEX_REL_SLEB64 added
Differential Revision: https://reviews.llvm.org/D101784
show more ...
|
| #
45b7cf99 |
| 12-May-2021 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Enable string tail merging in debug sections
This is a followup to https://reviews.llvm.org/D97657 which applied string tail merging to data segments.
Fixes: https://bugs.llvm.or
[lld][WebAssembly] Enable string tail merging in debug sections
This is a followup to https://reviews.llvm.org/D97657 which applied string tail merging to data segments.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=48828
Differential Revision: https://reviews.llvm.org/D102436
show more ...
|
| #
5a9b25e1 |
| 14-May-2021 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Refactor input chunk class hierarchy. NFC
The main motivation for this refactor is to remove the subclass relationship between the InputSegment and MergeInputSegment and Syntentic
[lld][WebAssembly] Refactor input chunk class hierarchy. NFC
The main motivation for this refactor is to remove the subclass relationship between the InputSegment and MergeInputSegment and SyntenticMergedInputSegment so that we can use the merging classes for debug sections which are not data segments.
In the process of refactoring I also remove all the virtual functions from the class hierarchy and try to reuse techniques used in the ELF linker (see `lld/ELF/InputSections.h`).
Differential Revision: https://reviews.llvm.org/D102546
show more ...
|
| #
b49a798e |
| 11-May-2021 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Remove relocation target verification
We have this extra step in wasm-ld that doesn't exist in other lld backend which verifies the existing contents of the relocation targets. Th
[lld][WebAssembly] Remove relocation target verification
We have this extra step in wasm-ld that doesn't exist in other lld backend which verifies the existing contents of the relocation targets. This was originally intended as an extra form of double checking and an aid to compiler developers. However it has always been somewhat controversial and there have been suggestions in the past the we simply remove it.
My motivation for removing it now is that its causing me a headache when trying to fix an issue with negative addends. In the case of negative addends that final result can be wrapped/negative but this checking code would require significant modification to be able to deal with that case. For example with some test cases I'm looking at I'm seeing error like this:
``` wasm-ld: warning: /usr/local/google/home/sbc/dev/wasm/llvm-build/tools/lld/test/wasm/Output/merge-string.s.tmp.o:(.rodata_relocs): unexpected existing value for R_WASM_MEMORY_ADDR_I32: existing=FFFFFFFA expected=FFFFFFFFFFFFFFFA ```
Rather than try to refactor `calcExpectedValue` to somehow return two different types of results (32 and 64-bit) depending on the relocation type, I think we can just remove this code.
Differential Revision: https://reviews.llvm.org/D102265
show more ...
|
| #
3b8d2be5 |
| 27-Feb-2021 |
Sam Clegg <[email protected]> |
Reland: "[lld][WebAssembly] Initial support merging string data"
This change was originally landed in: 5000a1b4b9edeb9e994f2a5b36da8d48599bea49 It was reverted in: 061e071d8c9b98526f35cad55a918a4f16
Reland: "[lld][WebAssembly] Initial support merging string data"
This change was originally landed in: 5000a1b4b9edeb9e994f2a5b36da8d48599bea49 It was reverted in: 061e071d8c9b98526f35cad55a918a4f1615afd4
This change adds support for a new WASM_SEG_FLAG_STRINGS flag in the object format which works in a similar fashion to SHF_STRINGS in the ELF world.
Unlike the ELF linker this support is currently limited: - No support for SHF_MERGE (non-string merging) - Always do full tail merging ("lo" can be merged with "hello") - Only support single byte strings (p2align 0)
Like the ELF linker merging is only performed at `-O1` and above.
This fixes part of https://bugs.llvm.org/show_bug.cgi?id=48828, although crucially it doesn't not currently support debug sections because they are not represented by data segments (they are custom sections)
Differential Revision: https://reviews.llvm.org/D97657
show more ...
|
| #
061e071d |
| 10-May-2021 |
Nico Weber <[email protected]> |
Revert "[lld][WebAssembly] Initial support merging string data"
This reverts commit 5000a1b4b9edeb9e994f2a5b36da8d48599bea49. Breaks tests, see https://reviews.llvm.org/D97657#2749151
Easily repros
Revert "[lld][WebAssembly] Initial support merging string data"
This reverts commit 5000a1b4b9edeb9e994f2a5b36da8d48599bea49. Breaks tests, see https://reviews.llvm.org/D97657#2749151
Easily repros locally with `ninja check-llvm-mc-webassembly`.
show more ...
|
| #
5000a1b4 |
| 27-Feb-2021 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Initial support merging string data
This change adds support for a new WASM_SEG_FLAG_STRINGS flag in the object format which works in a similar fashion to SHF_STRINGS in the ELF w
[lld][WebAssembly] Initial support merging string data
This change adds support for a new WASM_SEG_FLAG_STRINGS flag in the object format which works in a similar fashion to SHF_STRINGS in the ELF world.
Unlike the ELF linker this support is currently limited: - No support for SHF_MERGE (non-string merging) - Always do full tail merging ("lo" can be merged with "hello") - Only support single byte strings (p2align 0)
Like the ELF linker merging is only performed at `-O1` and above.
This fixes part of https://bugs.llvm.org/show_bug.cgi?id=48828, although crucially it doesn't not currently support debug sections because they are not represented by data segments (they are custom sections)
Differential Revision: https://reviews.llvm.org/D97657
show more ...
|
| #
aa0c571a |
| 08-Mar-2021 |
Yuta Saito <[email protected]> |
[WebAssembly] Add new relocation for location relative data
This `R_WASM_MEMORY_ADDR_SELFREL_I32` relocation represents an offset between its relocating address and the symbol address. It's very sim
[WebAssembly] Add new relocation for location relative data
This `R_WASM_MEMORY_ADDR_SELFREL_I32` relocation represents an offset between its relocating address and the symbol address. It's very similar to `R_X86_64_PC32` but restricted to be used for only data segments.
``` S + A - P ```
A: Represents the addend used to compute the value of the relocatable field. P: Represents the place of the storage unit being relocated. S: Represents the value of the symbol whose index resides in the relocation entry.
Proposal: https://github.com/WebAssembly/tool-conventions/issues/162
Differential Revision: https://reviews.llvm.org/D96659
show more ...
|
| #
14ffbb84 |
| 26-Feb-2021 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Rename methods/members to match ELF backend. NFC.
Specifically:
- InputChunk::outputOffset -> outSecOffset - Symbol::get/setVirtualAddress -> get/setVA - add InputChunk::getOffse
[lld][WebAssembly] Rename methods/members to match ELF backend. NFC.
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
show more ...
|
| #
70f3c6e9 |
| 10-Feb-2021 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Delay the merging of data section when dynamic linking
With dynamic linking we have the current limitation that there can be only a single active data segment (since we use __memo
[lld][WebAssembly] Delay the merging of data section when dynamic linking
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
show more ...
|
| #
53e3b81f |
| 05-Jan-2021 |
Andy Wingo <[email protected]> |
[lld][WebAssembly] Add support for handling table symbols
This commit adds table symbol support in a partial way, while still including some special cases for the __indirect_function_table symbol. N
[lld][WebAssembly] Add support for handling table symbols
This commit adds table symbol support in a partial way, while still including some special cases for the __indirect_function_table symbol. No change in tests.
Differential Revision: https://reviews.llvm.org/D94075
show more ...
|
| #
8b8088ac |
| 02-Dec-2020 |
Eric Leese <[email protected]> |
[lld] Use -1 as tombstone value for discarded code ranges
Under existing behavior discarded functions are relocated to have the start pc 0. This causes problems when debugging as they typically over
[lld] Use -1 as tombstone value for discarded code ranges
Under existing behavior discarded functions are relocated to have the start pc 0. This causes problems when debugging as they typically overlap the first function and lldb symbol resolution frequently chooses a discarded function instead of the correct one. Using the value -1 or -2 (depending on which DWARF section we are writing) is sufficient to prevent lldb from resolving to these symbols.
Reviewed By: MaskRay, yurydelendik, sbc100
Differential Revision: https://reviews.llvm.org/D91803
show more ...
|
| #
16f02431 |
| 12-Nov-2020 |
Wouter van Oortmerssen <[email protected]> |
[WebAssembly] Added R_WASM_FUNCTION_OFFSET_I64 for use with DWARF DW_AT_low_pc
Needed for wasm64, see discussion in https://reviews.llvm.org/D91203
Differential Revision: https://reviews.llvm.org/D
[WebAssembly] Added R_WASM_FUNCTION_OFFSET_I64 for use with DWARF DW_AT_low_pc
Needed for wasm64, see discussion in https://reviews.llvm.org/D91203
Differential Revision: https://reviews.llvm.org/D91395
show more ...
|
| #
a28a4662 |
| 11-Nov-2020 |
Sam Clegg <[email protected]> |
[WebAssembly] Add new relocation type for TLS data symbols
These relocations represent offsets from the __tls_base symbol.
Previously we were just using normal MEMORY_ADDR relocations and relying o
[WebAssembly] Add new relocation type for TLS data symbols
These relocations represent offsets from the __tls_base symbol.
Previously we were just using normal MEMORY_ADDR relocations and relying on the linker to select a segment-offset rather and absolute value in Symbol::getVirtualAddress(). Using an explicit relocation type allows allow us to clearly distinguish absolute from relative relocations based on the relocation information alone.
One place this is useful is being able to reject absolute relocation in the PIC case, but still accept TLS relocations.
Differential Revision: https://reviews.llvm.org/D91276
show more ...
|
| #
9d1409df |
| 30-Oct-2020 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Give better warnings on bad relocation sites
Differential Revision: https://reviews.llvm.org/D90443
|
| #
b8c2d60d |
| 26-Oct-2020 |
Wouter van Oortmerssen <[email protected]> |
[WebAssembly] Improved LLD error messages in case of mixed wasm32/wasm64 object files
Differential Revision: https://reviews.llvm.org/D90428
|