|
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 |
|
| #
5413bf1b |
| 20-Jun-2022 |
Kazu Hirata <[email protected]> |
Don't use Optional::hasValue (NFC)
|
| #
757d9d22 |
| 19-Jun-2022 |
Kazu Hirata <[email protected]> |
[lld] Use value_or instead of getValueOr (NFC)
|
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
46776f75 |
| 05-Apr-2022 |
Martin Storsjö <[email protected]> |
Fix warnings about variables that are set but only used in debug mode
Add void casts to mark the variables used, next to the places where they are used in assert or `LLVM_DEBUG()` expressions.
Diff
Fix warnings about variables that are set but only used in debug mode
Add void casts to mark the variables used, next to the places where they are used in assert or `LLVM_DEBUG()` expressions.
Differential Revision: https://reviews.llvm.org/D123117
show more ...
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3 |
|
| #
9504ab32 |
| 10-Mar-2022 |
Sam Clegg <[email protected]> |
[WebAssembly] Second phase of implemented extended const proposal
This change continues to lay the ground work for supporting extended const expressions in the linker.
The included test covers obje
[WebAssembly] Second phase of implemented extended const proposal
This change continues to lay the ground work for supporting extended const expressions in the linker.
The included test covers object file reading and writing and the YAML representation.
Differential Revision: https://reviews.llvm.org/D121349
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc2 |
|
| #
1cf6ebc0 |
| 01-Mar-2022 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Improve error reporting for bad ar archive members
Show the name of of the archive in the error message as well as the name of the object within it.
Differential Revision: https:
[lld][WebAssembly] Improve error reporting for bad ar archive members
Show the name of of the archive in the error message as well as the name of the object within it.
Differential Revision: https://reviews.llvm.org/D120689
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 ...
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init |
|
| #
875ee937 |
| 27-Jan-2022 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Handle TLS symbols in older object file
In older versions of llvm (e.g. llvm 13), symbols were not individually flagged as TLS. In this case, the indent was to implicitly mark an
[lld][WebAssembly] Handle TLS symbols in older object file
In older versions of llvm (e.g. llvm 13), symbols were not individually flagged as TLS. In this case, the indent was to implicitly mark any symbols defined in TLS segments as TLS. However, we were not performing this implicit conversion if the segment was explicitly marked as TLS
As it happens, llvm 13 was branched between the addition of the segment flag and the addition of the symbol flag. See:
- segment flag added: https://reviews.llvm.org/D102202 - symbol flag added: https://reviews.llvm.org/D109426
Testing this is tricky because the assembler will imply the TLS status of the symbol based on the segment its declared in, so we are forced to use a yaml file here.
Fixes: https://github.com/emscripten-core/emscripten/issues/15891
Differential Revision: https://reviews.llvm.org/D118414
show more ...
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
83d59e05 |
| 20-Jan-2022 |
Alexandre Ganea <[email protected]> |
Re-land [LLD] Remove global state in lldCommon
Move all variables at file-scope or function-static-scope into a hosting structure (lld::CommonLinkerContext) that lives at lldMain()-scope. Drivers wi
Re-land [LLD] Remove global state in lldCommon
Move all variables at file-scope or function-static-scope into a hosting structure (lld::CommonLinkerContext) that lives at lldMain()-scope. Drivers will inherit from this structure and add their own global state, in the same way as for the existing COFFLinkerContext.
See discussion in https://lists.llvm.org/pipermail/llvm-dev/2021-June/151184.html
The previous land f860fe362282ed69b9d4503a20e5d20b9a041189 caused issues in https://lab.llvm.org/buildbot/#/builders/123/builds/8383, fixed by 22ee510dac9440a74b2e5b3fe3ff13ccdbf55af3.
Differential Revision: https://reviews.llvm.org/D108850
show more ...
|
| #
e6b15394 |
| 16-Jan-2022 |
Alexandre Ganea <[email protected]> |
Revert [LLD] Remove global state in lldCommon
It seems to be causing issues on https://lab.llvm.org/buildbot/#/builders/123/builds/8383
|
| #
f860fe36 |
| 16-Jan-2022 |
Alexandre Ganea <[email protected]> |
[LLD] Remove global state in lldCommon
Move all variables at file-scope or function-static-scope into a hosting structure (lld::CommonLinkerContext) that lives at lldMain()-scope. Drivers will inher
[LLD] Remove global state in lldCommon
Move all variables at file-scope or function-static-scope into a hosting structure (lld::CommonLinkerContext) that lives at lldMain()-scope. Drivers will inherit from this structure and add their own global state, in the same way as for the existing COFFLinkerContext.
See discussion in https://lists.llvm.org/pipermail/llvm-dev/2021-June/151184.html
Differential Revision: https://reviews.llvm.org/D108850
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc2 |
|
| #
6f5c5cbe |
| 02-Dec-2021 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Fix for debug relocations against undefined function symbols
This is very similar to https://reviews.llvm.org/D103557 but applies to symbols which are undefined at link time rathe
[lld][WebAssembly] Fix for debug relocations against undefined function symbols
This is very similar to https://reviews.llvm.org/D103557 but applies to symbols which are undefined at link time rather than compile time.
We already have code that handles symbols which were defined at link time but dead stripped by `--gc-sections` (See `test/wasm/debug-removed-fn.ll`). In that case the symbols are not live (!isLive()). However, we can also have live symbols (which are references by the program) but which are undefined at link time and are imported by the linker.
In the test case here the symbol `undef` is used but is not defined in the program but is imported by the linker due to the `--import-undefined` flag.
Fixes: https://github.com/emscripten-core/emscripten/issues/15528
Differential Revision: https://reviews.llvm.org/D114921
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
fad05465 |
| 29-Oct-2021 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Handle TLS variables in Symbol::getVA. NFC
In the shared memory case we can always assume that TLS addresses are relative to __tls_base. In the non-shared memory case TLS variabl
[lld][WebAssembly] Handle TLS variables in Symbol::getVA. NFC
In the shared memory case we can always assume that TLS addresses are relative to __tls_base. In the non-shared memory case TLS variables are absolute, just like normal data addresses.
This simplifies the code in calcNewValue so that TLS relocations no longer need special handling.
Differential Revision: https://reviews.llvm.org/D112831
show more ...
|
| #
28848e9e |
| 28-Oct-2021 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Handle duplicate archive member names in ThinLTO
This entire change, including the test case, comes almost verbatim from the ELF driver.
Fixes: https://github.com/emscripten-core
[lld][WebAssembly] Handle duplicate archive member names in ThinLTO
This entire change, including the test case, comes almost verbatim from the ELF driver.
Fixes: https://github.com/emscripten-core/emscripten/issues/12763
Differential Revision: https://reviews.llvm.org/D112723
show more ...
|
| #
9f903475 |
| 27-Oct-2021 |
Nico Weber <[email protected]> |
fix comment typos to cycle bots
|
| #
9261ee32 |
| 29-Sep-2021 |
Heejin Ahn <[email protected]> |
[WebAssembly] Make EH work with dynamic linking
This makes Wasm EH work with dynamic linking. So far we were only able to handle destructors, which do not use any tags or LSDA info.
1. This uses `T
[WebAssembly] Make EH work with dynamic linking
This makes Wasm EH work with dynamic linking. So far we were only able to handle destructors, which do not use any tags or LSDA info.
1. This uses `TargetExternalSymbol` for `GCC_except_tableN` symbols, which points to the address of per-function LSDA info. It is more convenient to use than `MCSymbol` because it can take additional target flags.
2. When lowering `wasm_lsda` intrinsic, if PIC is enabled, make the symbol relative to `__memory_base` and generate the `add` node. If PIC is disabled, continue to use the absolute address.
3. Make tag symbols (`__cpp_exception` and `__c_longjmp`) undefined in the backend, because it is hard to make it work with dynamic linking's loading order. Instead, we make all tag symbols undefined in the LLVM backend and import it from JS.
4. Add support for undefined tags to the linker.
Companion patches: - https://github.com/WebAssembly/binaryen/pull/4223 - https://github.com/emscripten-core/emscripten/pull/15266
Reviewed By: sbc100
Differential Revision: https://reviews.llvm.org/D111388
show more ...
|
| #
3ec1760d |
| 02-Oct-2021 |
Heejin Ahn <[email protected]> |
[WebAssembly] Remove WasmTagType
This removes `WasmTagType`. `WasmTagType` contained an attribute and a signature index: ``` struct WasmTagType { uint8_t Attribute; uint32_t SigIndex; }; ```
Cu
[WebAssembly] Remove WasmTagType
This removes `WasmTagType`. `WasmTagType` contained an attribute and a signature index: ``` struct WasmTagType { uint8_t Attribute; uint32_t SigIndex; }; ```
Currently the attribute field is not used and reserved for future use, and always 0. And that this class contains `SigIndex` as its property is a little weird in the place, because the tag type's signature index is not an inherent property of a tag but rather a reference to another section that changes after linking. This makes tag handling in the linker also weird that tag-related methods are taking both `WasmTagType` and `WasmSignature` even though `WasmTagType` contains a signature index. This is because the signature index changes in linking so it doesn't have any info at this point. This instead moves `SigIndex` to `struct WasmTag` itself, as we did for `struct WasmFunction` in D111104.
In this CL, in lib/MC and lib/Object, this now treats tag types in the same way as function types. Also in YAML, this removes `struct Tag`, because now it only contains the tag index. Also tags set `SigIndex` in `WasmImport` union, as functions do.
I think this makes things simpler and makes tag handling more in line with function handling. These two shares similar properties in that both of them have signatures, but they are kind of nominal so having the same signature doesn't mean they are the same element.
Also a drive-by fix: the reserved 'attirubute' part's encoding changed from uleb32 to uint8 a while ago. This was fixed in lib/MC and lib/Object but not in YAML. This doesn't change object files because the field's value is always 0 and its encoding is the same for the both encoding.
This is effectively NFC; I didn't mark it as such just because it changed YAML test results.
Reviewed By: sbc100, tlively
Differential Revision: https://reviews.llvm.org/D111086
show more ...
|
| #
c0039de2 |
| 04-Oct-2021 |
Sam Clegg <[email protected]> |
[Object][WebAssemlby] Report function types (signatures). NFC
This simplifies the code in a number of ways and avoids having to track functions and their types separately.
Differential Revision: ht
[Object][WebAssemlby] Report function types (signatures). NFC
This simplifies the code in a number of ways and avoids having to track functions and their types separately.
Differential Revision: https://reviews.llvm.org/D111104
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3 |
|
| #
3a7bcba3 |
| 10-Sep-2021 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Cleanup output of --verbose
Remove some unnecessary logging from wasm-ld when running under `--verbose`. Unlike `-debug` this logging is available in release builds. This change
[lld][WebAssembly] Cleanup output of --verbose
Remove some unnecessary logging from wasm-ld when running under `--verbose`. Unlike `-debug` this logging is available in release builds. This change makes it little more minimal/readable.
Also, avoid compiling the `debugWrite` function in releaase builds where it does nothing. This should remove a lot debug strings from the binary, and avoid having to construct unused debug strings at runtime.
Differential Revision: https://reviews.llvm.org/D109583
show more ...
|
| #
44177e5f |
| 08-Sep-2021 |
Sam Clegg <[email protected]> |
[WebAssembly] Add explict TLS symbol flag
As before we maintain backwards compat with older object files by also infering the TLS flag based on the name of the segment.
This change is was split out
[WebAssembly] Add explict TLS symbol flag
As before we maintain backwards compat with older object files by also infering the TLS flag based on the name of the segment.
This change is was split out from https://reviews.llvm.org/D108877.
Differential Revision: https://reviews.llvm.org/D109426
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init |
|
| #
db5e0786 |
| 20-Jul-2021 |
Fangrui Song <[email protected]> |
[LTO] Add SelectionKind to IRSymtab and use it in ld.lld/LLVMgold
In PGO, a C++ external linkage function `foo` has a private counter `__profc_foo` and a private `__profd_foo` in a `comdat nodedupli
[LTO] Add SelectionKind to IRSymtab and use it in ld.lld/LLVMgold
In PGO, a C++ external linkage function `foo` has a private counter `__profc_foo` and a private `__profd_foo` in a `comdat nodeduplicate`.
A `__attribute__((weak))` function `foo` has a weak hidden counter `__profc_foo` and a private `__profd_foo` in a `comdat nodeduplicate`.
In `ld.lld a.o b.o`, say a.o defines an external linkage `foo` and b.o defines a weak `foo`. Currently we treat `comdat nodeduplicate` as `comdat any`, ld.lld will incorrectly consider `b.o:__profc_foo` non-prevailing. In the worst case when `b.o:__profd_foo` is retained and `b.o:__profc_foo` isn't, there will be dangling reference causing an `undefined hidden symbol` error.
Add SelectionKind to `Comdat` in IRSymtab and let linkers ignore nodeduplicate comdat.
Differential Revision: https://reviews.llvm.org/D106228
show more ...
|
| #
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
|
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2 |
|
| #
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 ...
|
| #
c1a59fa5 |
| 01-Jun-2021 |
Sam Clegg <[email protected]> |
[lld][WebAssemlby] Fix for string merging of -dwarf-5 sections
We were mistakenly treating `.debug_str_offsets` as a string mergable section when it is not (it contains integers not strings). This
[lld][WebAssemlby] Fix for string merging of -dwarf-5 sections
We were mistakenly treating `.debug_str_offsets` as a string mergable section when it is not (it contains integers not strings). This is an indication that we really should find a way to store flags for custom sections.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=48828 Fixes: https://bugs.chromium.org/p/chromium/issues/detail?id=1172217
Differential Revision: https://reviews.llvm.org/D103486
show more ...
|
|
Revision tags: llvmorg-12.0.1-rc1 |
|
| #
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 ...
|