|
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, llvmorg-14.0.5 |
|
| #
025b3096 |
| 04-Jun-2022 |
Fangrui Song <[email protected]> |
Revert D126950 "[lld][WebAssembly] Retain data segments referenced via __start/__stop"
This reverts commit dcf3368e33c3a01bd21b692d3be5dc1ecee587f4.
It breaks -DLLVM_ENABLE_ASSERTIONS=on builds. In
Revert D126950 "[lld][WebAssembly] Retain data segments referenced via __start/__stop"
This reverts commit dcf3368e33c3a01bd21b692d3be5dc1ecee587f4.
It breaks -DLLVM_ENABLE_ASSERTIONS=on builds. In addition, the description is incorrect about ld.lld behavior. For wasm, there should be justification to add the new mode.
show more ...
|
| #
dcf3368e |
| 04-Jun-2022 |
Yuta Saito <[email protected]> |
[lld][WebAssembly] Retain data segments referenced via __start/__stop
As well as ELF linker does, retain all data segments named X referenced through `__start_X` or `__stop_X`.
For example, `FOO_MD
[lld][WebAssembly] Retain data segments referenced via __start/__stop
As well as ELF linker does, retain all data segments named X referenced through `__start_X` or `__stop_X`.
For example, `FOO_MD` should not be stripped in the below case, but it's currently mis-stripped
```llvm @FOO_MD = global [4 x i8] c"bar\00", section "foo_md", align 1 @__start_foo_md = external constant i8* @__stop_foo_md = external constant i8* @llvm.used = appending global [1 x i8*] [i8* bitcast (i32 ()* @foo_md_size to i8*)], section "llvm.metadata"
define i32 @foo_md_size() { entry: ret i32 sub ( i32 ptrtoint (i8** @__stop_foo_md to i32), i32 ptrtoint (i8** @__start_foo_md to i32) ) } ```
This fixes https://github.com/llvm/llvm-project/issues/55839
Reviewed By: sbc100
Differential Revision: https://reviews.llvm.org/D126950
show more ...
|
|
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 |
|
| #
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 ...
|
|
Revision tags: 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 |
|
| #
a56e5749 |
| 11-Feb-2021 |
Andy Wingo <[email protected]> |
[lld][WebAssembly] Common superclass for input globals/events/tables
This commit regroups commonalities among InputGlobal, InputEvent, and InputTable into the new InputElement. The subclasses are d
[lld][WebAssembly] Common superclass for input globals/events/tables
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
show more ...
|
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3 |
|
| #
5c016489 |
| 28-Jan-2021 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Update comments mentioning legacy function names. NFC
The __wasm_apply_relocs function was split into two separate functions as part of https://reviews.llvm.org/D93066 but these c
[lld][WebAssembly] Update comments mentioning legacy function names. NFC
The __wasm_apply_relocs function was split into two separate functions as part of https://reviews.llvm.org/D93066 but these comments were not correctly updated at the time.
Differential Revision: https://reviews.llvm.org/D95623
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2 |
|
| #
63393828 |
| 14-Jan-2021 |
Andy Wingo <[email protected]> |
[WebAssembly] Add support for table linking to wasm-ld
This patch adds support to wasm-ld for linking multiple table references together, in a manner similar to wasm globals. The indirect function t
[WebAssembly] Add support for table linking to wasm-ld
This patch adds support to wasm-ld for linking multiple table references together, in a manner similar to wasm globals. The indirect function table is synthesized as needed.
To manage the transitional period in which the compiler doesn't yet produce TABLE_NUMBER relocations and doesn't residualize table symbols, the linker will detect object files which have table imports or definitions, but no table symbols. In that case it will synthesize symbols for the defined and imported tables.
As a change, relocatable objects are now written with table symbols, which can cause symbol renumbering in some of the tests. If no object file requires an indirect function table, none will be written to the file. Note that for legacy ObjFile inputs, this test is conservative: as we don't have relocs for each use of the indirecy function table, we just assume that any incoming indirect function table should be propagated to the output.
Differential Revision: https://reviews.llvm.org/D91870
show more ...
|
| #
187d771d |
| 15-Jan-2021 |
Derek Schuff <[email protected]> |
Revert "[WebAssembly] Add support for table linking to wasm-ld"
This reverts commit 38dfce706f796dc109ea495dd69a8cb4c8fa819d. CI discovered a bug where the table is exported twice: see D91870
|
| #
38dfce70 |
| 14-Jan-2021 |
Andy Wingo <[email protected]> |
[WebAssembly] Add support for table linking to wasm-ld
This patch adds support to wasm-ld for linking multiple table references together, in a manner similar to wasm globals. The indirect function t
[WebAssembly] Add support for table linking to wasm-ld
This patch adds support to wasm-ld for linking multiple table references together, in a manner similar to wasm globals. The indirect function table is synthesized as needed.
To manage the transitional period in which the compiler doesn't yet produce TABLE_NUMBER relocations and doesn't residualize table symbols, the linker will detect object files which have table imports or definitions, but no table symbols. In that case it will synthesize symbols for the defined and imported tables.
As a change, relocatable objects are now written with table symbols, which can cause symbol renumbering in some of the tests. If no object file requires an indirect function table, none will be written to the file. Note that for legacy ObjFile inputs, this test is conservative: as we don't have relocs for each use of the indirecy function table, we just assume that any incoming indirect function table should be propagated to the output.
Differential Revision: https://reviews.llvm.org/D91870
show more ...
|
|
Revision tags: llvmorg-11.1.0-rc1 |
|
| #
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 ...
|
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
| #
e52881a2 |
| 10-Dec-2020 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Split __wasm_apply_relocs function in two
We have two types of relocations that we apply on startup: 1. Relocations that apply to wasm globals 2. Relocations that apply to wasm me
[lld][WebAssembly] Split __wasm_apply_relocs function in two
We have two types of relocations that we apply on startup: 1. Relocations that apply to wasm globals 2. Relocations that apply to wasm memory
The first set of relocations use only the `__memory_base` import to update a set of internal globals. Because wasm globals are thread local these need to run on each thread. Memory relocations, like static constructors, must only be run once.
To ensure global relocations run on all threads and because the only depend on the immutable `__memory_base` import we can run them during the WebAssembly start functions, instead of waiting until the post-instantiation __wasm_call_ctors.
Differential Revision: https://reviews.llvm.org/D93066
show more ...
|
| #
19949708 |
| 10-Dec-2020 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Delay creation of internal __wasm_memory_init function
This also allows for its creation to be conditional so it is completely elided when not needed.
Differential Revision: http
[lld][WebAssembly] Delay creation of internal __wasm_memory_init function
This also allows for its creation to be conditional so it is completely elided when not needed.
Differential Revision: https://reviews.llvm.org/D93035
show more ...
|
| #
4701cb41 |
| 06-Dec-2020 |
Fangrui Song <[email protected]> |
[lld] Delete unused declarations
Notes:
* runMSVCLinker: remnant of r338615 * wasm markSymbol: remnant of r374275 * wasm addDataAddressGlobal: accidentally added by r372779 * MachO Writer::createSy
[lld] Delete unused declarations
Notes:
* runMSVCLinker: remnant of r338615 * wasm markSymbol: remnant of r374275 * wasm addDataAddressGlobal: accidentally added by r372779 * MachO Writer::createSymtabContents: accidentally added by D76839
show more ...
|
| #
701fa0b5 |
| 02-Dec-2020 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Fix malformed output with -pie + --shared-memory
The conditional guarding createInitMemoryFunction was incorrect and didn't match that guarding the creation of the associated symb
[lld][WebAssembly] Fix malformed output with -pie + --shared-memory
The conditional guarding createInitMemoryFunction was incorrect and didn't match that guarding the creation of the associated symbol.
Rather that reproduce the same conditions in multiple places we can simply use the presence of the associated symbol.
Also, add an assertion that would have caught this bug.
Also, add a new test for this flag combination.
This is part of an ongoing effort to enable dynamic linking with threads in emscripten.
See https://github.com/emscripten-core/emscripten/issues/3494
Differential Revision: https://reviews.llvm.org/D92520
show more ...
|
|
Revision tags: llvmorg-11.0.1-rc1 |
|
| #
48ddf5e1 |
| 23-Nov-2020 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Ensure stub symbols always get address 0
Without this extra flag we can't distingish between stub functions and functions that happen to have address 0 (relative to __table_base).
[lld][WebAssembly] Ensure stub symbols always get address 0
Without this extra flag we can't distingish between stub functions and functions that happen to have address 0 (relative to __table_base).
Adding this flag bit the base symbol class actually avoids growing the SymbolUnion struct which would not be true if we added it to the FunctionSymbol subclass (due to bitbacking).
The previous approach of setting it's table index to zero worked for normal static relocations but not for `-fPIC` code.
See https://github.com/emscripten-core/emscripten/issues/12819
Differential Revision: https://reviews.llvm.org/D92038
show more ...
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6 |
|
| #
950ae430 |
| 01-Oct-2020 |
Dan Gohman <[email protected]> |
[WebAssembly] GC constructor functions in otherwise unused archive objects
This allows `__wasilibc_populate_libpreopen` to be GC'd in more cases where it isn't needed, including when linked from Rus
[WebAssembly] GC constructor functions in otherwise unused archive objects
This allows `__wasilibc_populate_libpreopen` to be GC'd in more cases where it isn't needed, including when linked from Rust's libstd.
Differential Revision: https://reviews.llvm.org/D85062
show more ...
|
| #
6cd8511e |
| 01-Oct-2020 |
Dan Gohman <[email protected]> |
[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_ct
[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.
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init |
|
| #
cc1b9b68 |
| 10-Jul-2020 |
Wouter van Oortmerssen <[email protected]> |
[WebAssembly] 64-bit (function) pointer fixes.
Accounting for the fact that Wasm function indices are 32-bit, but in wasm64 we want uniform 64-bit pointers. Includes reloc types for 64-bit table ind
[WebAssembly] 64-bit (function) pointer fixes.
Accounting for the fact that Wasm function indices are 32-bit, but in wasm64 we want uniform 64-bit pointers. Includes reloc types for 64-bit table indices.
Differential Revision: https://reviews.llvm.org/D83729
show more ...
|
|
Revision tags: llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
| #
ad2e12a3 |
| 10-Oct-2019 |
Sam Clegg <[email protected]> |
[lld][WebAssembly] Refactor markLive.cpp. NFC
This pattern matches the ELF implementation add if also useful as part of a planned change where running `mark` more than once is needed.
Differential
[lld][WebAssembly] Refactor markLive.cpp. NFC
This pattern matches the ELF implementation add if also useful as part of a planned change where running `mark` more than once is needed.
Differential Revision: https://reviews.llvm.org/D68749
llvm-svn: 374275
show more ...
|
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4 |
|
| #
09768c5d |
| 04-Sep-2019 |
Thomas Lively <[email protected]> |
[WebAssembly] Initialize memory in start function
Summary: - `__wasm_init_memory` is now the WebAssembly start function instead of being called from `__wasm_call_ctors` or called directly by the
[WebAssembly] Initialize memory in start function
Summary: - `__wasm_init_memory` is now the WebAssembly start function instead of being called from `__wasm_call_ctors` or called directly by the runtime. - Adds a new synthetic data symbol `__wasm_init_memory_flag` that is atomically incremented from zero to one by the thread responsible for initializing memory. - All threads now unconditionally perform data.drop on all passive segments. - Removes --passive-segments and --active-segments flags and controls segment type based on --shared-memory instead. The deleted flags were only present to ameliorate the upgrade path in Emscripten.
Reviewers: sbc100, aheejin
Subscribers: dschuff, jgravelle-google, sunfish, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65783
llvm-svn: 370965
show more ...
|
|
Revision tags: llvmorg-9.0.0-rc3 |
|
| #
7cb9c8a5 |
| 29-Aug-2019 |
Dan Gohman <[email protected]> |
[WebAssembly] Implement NO_STRIP
This patch implements support for the NO_STRIP flag, which will allow __attribute__((used)) to be implemented.
This accompanies https://reviews.llvm.org/D62542, whi
[WebAssembly] Implement NO_STRIP
This patch implements support for the NO_STRIP flag, which will allow __attribute__((used)) to be implemented.
This accompanies https://reviews.llvm.org/D62542, which moves to setting the NO_STRIP flag, and will continue to set EXPORTED for Emscripten targets for compatibility.
Differential Revision: https://reviews.llvm.org/D66968
llvm-svn: 370416
show more ...
|
|
Revision tags: llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init |
|
| #
33fdf82d |
| 16-Jul-2019 |
Fangrui Song <[email protected]> |
[WebAssembly] Rename variale references in comments after VariableName -> variableName change
llvm-svn: 366192
|
| #
136d27ab |
| 11-Jul-2019 |
Rui Ueyama <[email protected]> |
[Coding style change][lld] Rename variables for non-ELF ports
This patch does the same thing as r365595 to other subdirectories, which completes the naming style change for the entire lld directory.
[Coding style change][lld] Rename variables for non-ELF ports
This patch does the same thing as r365595 to other subdirectories, which completes the naming style change for the entire lld directory.
With this, the naming style conversion is complete for lld.
Differential Revision: https://reviews.llvm.org/D64473
llvm-svn: 365730
show more ...
|
|
Revision tags: llvmorg-8.0.1, llvmorg-8.0.1-rc4 |
|
| #
6004d9a1 |
| 03-Jul-2019 |
Thomas Lively <[email protected]> |
[WebAssembly] Add option to emit passive segments
Summary: Adds `--passive-segments` and `--active-segments` flags to control what kind of segments are emitted. For now the default is always to emit
[WebAssembly] Add option to emit passive segments
Summary: Adds `--passive-segments` and `--active-segments` flags to control what kind of segments are emitted. For now the default is always to emit active segments so this is not a breaking change, but in the future the default will be changed to passive segments when shared memory is requested and active segments otherwise. When passive segments are emitted, corresponding memory.init and data.drop instructions are emitted in a `__wasm_init_memory` function that is automatically called at the beginning of `__wasm_call_ctors`.
Reviewers: sbc100, aheejin, dschuff
Subscribers: azakai, dschuff, jgravelle-google, sunfish, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59343
llvm-svn: 365088
show more ...
|
|
Revision tags: llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2 |
|
| #
fd54fa5d |
| 07-Jun-2019 |
Sam Clegg <[email protected]> |
[WebAssembly] Fix for discarded init functions
When a function is excluded via comdat we shouldn't add it to the final list of init functions.
Differential Revision: https://reviews.llvm.org/D62983
[WebAssembly] Fix for discarded init functions
When a function is excluded via comdat we shouldn't add it to the final list of init functions.
Differential Revision: https://reviews.llvm.org/D62983
llvm-svn: 362769
show more ...
|
|
Revision tags: llvmorg-8.0.1-rc1 |
|
| #
09137be7 |
| 04-Apr-2019 |
Sam Clegg <[email protected]> |
[WebAssembly] Apply data relocations at runtime in shared objects
See: https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md
Data section relocations in wasm shared librarie
[WebAssembly] Apply data relocations at runtime in shared objects
See: https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md
Data section relocations in wasm shared libraries are applied by the library itself at static constructor time. This change adds a new synthetic function that applies relocations to relevant memory locations on startup.
Differential Revision: https://reviews.llvm.org/D59278
llvm-svn: 357715
show more ...
|