| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
parallelForEach is not reentrant. We use parallelForEach to call
each section's writeTo(), so calling the same function within writeTo()
is not safe.
Fixes https://bugs.llvm.org/show_bug.cgi?id=41508
Differential Revision: https://reviews.llvm.org/D60757
llvm-svn: 358547
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D60492
llvm-svn: 358090
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D60431
llvm-svn: 357966
|
|
|
|
|
|
|
|
|
|
|
|
| |
R_WASM_TABLE_INDEX_REL_SLEB
This should have been part of rL357710 but was overlooked because
in our test code the function in question was also used in other
relocations that caused it to be added to the table anyway.
Differential Revision: https://reviews.llvm.org/D60296
llvm-svn: 357737
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
See https://github.com/WebAssembly/tool-conventions/pull/106
Differential Revision: https://reviews.llvm.org/D59907
llvm-svn: 357710
|
|
|
|
|
|
|
|
|
|
| |
See https://reviews.llvm.org/D59860
The initial version of this change effected more than just the
error message. This version is scoped down to only effect the error
itself.
llvm-svn: 357328
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Makes it a linker error if the "atomics" feature is used but the user
does not opt in to shared memory or if "atomics" is disallowed but the
user does opt in to shared memory. Also check that an appropriate max
memory size is supplied if shared memory is used.
Reviewers: sbc100, aheejin
Subscribers: dschuff, jgravelle-google, sunfish, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59281
llvm-svn: 357310
|
|
|
|
|
|
| |
utilities. NFC
llvm-svn: 357269
|
|
|
|
|
|
| |
This reverts commit 0805ec5f7b5c80474352531a99e721c30e73e77f.
llvm-svn: 357225
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also Revert "[WebAssembly] Fix typo from rL357143"
This reverts commit 0805ec5f7b5c80474352531a99e721c30e73e77f and
a9958fc30d0c6d4c140be892c5a824b827d2eb5d
(rL357143 and rL357144)
They cause failures with address-taken extern (JS) functions
in emscripten.
llvm-svn: 357224
|
|
|
|
| |
llvm-svn: 357187
|
|
|
|
| |
llvm-svn: 357144
|
|
|
|
|
|
|
|
| |
This message now matches the equivalent message in the ELF linker.
Differential Revision: https://reviews.llvm.org/D59860
llvm-svn: 357143
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change implements lowering of references global symbols in PIC
mode.
This change implements lowering of global references in PIC mode using a
new @GOT reference type. @GOT references can be used with function or
data symbol names combined with the get_global instruction. In this case
the linker will insert the wasm global that stores the address of the
symbol (either in memory for data symbols or in the wasm table for
function symbols).
For now I'm continuing to use the R_WASM_GLOBAL_INDEX_LEB relocation
type for this type of reference which means that this relocation type
can refer to either a global or a function or data symbol. We could
choose to introduce specific relocation types for GOT entries in the
future. See the current dynamic linking proposal:
https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md
Differential Revision: https://reviews.llvm.org/D54647
llvm-svn: 357022
|
|
|
|
|
|
|
|
|
| |
Do not pipe binary data between processes in lit tests this time,
since it turns out that can break on Windows.
This reverts commit 84c8652fc3085155d0f9c355455e5a797c6d9db6.
llvm-svn: 356975
|
|
|
|
|
|
| |
This reverts commit 5991328c96b6146999cfa74ede42901f8c01f2fa.
llvm-svn: 356932
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Adds --check-features and --no-check-features. The default for now is
to enable the checking, but this might change in the future.
Also adds --features=foo,bar for precisely controlling the features
used in the output binary.
Depends on D59173.
Reviewers: sbc100, aheejin
Subscribers: dschuff, jgravelle-google, sunfish, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59274
llvm-svn: 356805
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Implements a new target features section in assembly and object files
that records what features are used, required, and disallowed in
WebAssembly objects. The linker uses this information to ensure that
all objects participating in a link are feature-compatible and records
the set of used features in the output binary for use by optimizers
and other tools later in the toolchain.
The "atomics" feature is always required or disallowed to prevent
linking code with stripped atomics into multithreaded binaries. Other
features are marked used if they are enabled globally or on any
function in a module.
Future CLs will add linker flags for ignoring feature compatibility
checks and for specifying the set of allowed features, implement using
the presence of the "atomics" feature to control the type of memory
and segments in the linked binary, and add front-end flags for
relaxing the linkage policy for atomics.
Reviewers: aheejin, sbc100, dschuff
Subscribers: jgravelle-google, hiraditya, sunfish, mgrang, jfb, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59173
llvm-svn: 356610
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
symbols.
For these types of relocations an absolute memory address is
required which is not possible for undefined data symbols. For symbols
that can be undefined at link time (i.e. external data symbols in
shared libraries) a different type of relocation (i.e. via a GOT) will
be needed.
Differential Revision: https://reviews.llvm.org/D59337
llvm-svn: 356310
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds basic support for shared library dependencies
via the dylink section.
See https://github.com/WebAssembly/tool-conventions/pull/77
Differential Revision: https://reviews.llvm.org/D59237
llvm-svn: 356102
|
|
|
|
|
|
|
|
|
|
|
|
| |
When linking shared libraries, we import a mutable wasm global
to represent the address of each undefined data symbol.
This is a step towards supporting dynamic linking and shared
libraries.
Differential Revision: https://reviews.llvm.org/D59270
llvm-svn: 355988
|
|
|
|
|
|
|
|
|
|
|
| |
This matches the ELF does. Update the comment in ELF/Symbols.h and
duplicate it in wasm/Symbols.h
This a followup on rL355580 and rL355577.
Differential Revision: https://reviews.llvm.org/D59075
llvm-svn: 355737
|
|
|
|
|
|
|
|
| |
Turns own that IsUsedInRegularObject is set for lazy (archive) symbols.
Differential Revision: https://reviews.llvm.org/D59074
llvm-svn: 355580
|
|
|
|
|
|
|
|
| |
Fixes https://bugs.llvm.org/show_bug.cgi?id=40654
Differential Revision: https://reviews.llvm.org/D59012
llvm-svn: 355577
|
|
|
|
|
|
|
|
|
|
|
|
| |
static init/fini
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D58864
llvm-svn: 355263
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D58806
llvm-svn: 355240
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In the clang UI, replaces -mthread-model posix with -matomics as the
source of truth on threading. In the backend, replaces
-thread-model=posix with the atomics target feature, which is now
collected on the WebAssemblyTargetMachine along with all other used
features. These collected features will also be used to emit the
target features section in the future.
The default configuration for the backend is thread-model=posix and no
atomics, which was previously an invalid configuration. This change
makes the default valid because the thread model is ignored.
A side effect of this change is that objects are never emitted with
passive segments. It will instead be up to the linker to decide
whether sections should be active or passive based on whether atomics
are used in the final link.
Reviewers: aheejin, sbc100, dschuff
Subscribers: mehdi_amini, jgravelle-google, hiraditya, sunfish, steven_wu, dexonsmith, rupprecht, jfb, jdoerfert, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D58742
llvm-svn: 355112
|
|
|
|
|
|
|
|
|
| |
The code for encoding the symbols signature into its name
was not actually being used in the final version of this change.
Differential Revision: https://reviews.llvm.org/D58482
llvm-svn: 354539
|
|
|
|
| |
llvm-svn: 354535
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we could emit a warning and generate a potentially invalid
wasm module (due to call sites and functions having conflicting
signatures). Now, rather than create invalid binaries we handle such
cases by creating stub functions containing unreachable, effectively
turning these into runtime errors rather than validation failures.
Differential Revision: https://reviews.llvm.org/D57909
llvm-svn: 354528
|
|
|
|
|
|
|
|
|
|
| |
Also add to the docs.
This is refactor in preparation for https://reviews.llvm.org/D57909
Differential Revision: https://reviews.llvm.org/D57920
llvm-svn: 353478
|
|
|
|
|
|
|
|
|
|
|
|
| |
import names in the .o format
Add a flag to allow symbols to have a wasm import name which differs from the
linker symbol name, allowing the linker to link code using the import_module
attribute.
Differential Revision: https://reviews.llvm.org/D57632
llvm-svn: 353473
|
|
|
|
|
|
|
|
|
|
|
|
| |
This flag means that symbol should be exported in the final binary.
The reason for this change is to allow source level annotations to
trigger a given symbol to be exported:
https://github.com/emscripten-core/emscripten/issues/7702
Differential Revision: https://reviews.llvm.org/D57869
llvm-svn: 353364
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D57725
llvm-svn: 353264
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch fixes clang-tidy warnings on wasm-only files.
The list of checks used is:
`-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming,modernize-*`
(LLVM's default .clang-tidy list is the same except it does not have
`modernize-*`.)
The list of fixes are:
- Variable names start with an uppercase letter
- Function names start with a lowercase letter
- Use `auto` when you use casts so the type is evident
Reviewers: sbc100
Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D57499
llvm-svn: 353076
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D57698
llvm-svn: 353066
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes: https://bugs.llvm.org/show_bug.cgi?id=37168
This is only a first pass at supporting these custom import
modules. In the long run we most likely want to treat these
kinds of symbols very differently. For example, it should not
be possible to resolve such as symbol at static link type.
Differential Revision: https://reviews.llvm.org/D45796
llvm-svn: 352828
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D57555
llvm-svn: 352825
|
|
|
|
|
|
|
|
|
| |
Previously we were never setting this which means it was always being
set to Default (-O2/-Os).
Differential Revision: https://reviews.llvm.org/D57422
llvm-svn: 352667
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the way we create the symbol table to be closer to how its done
on ELF. Now the output symbol table matches the internal symtab order
and includes local and undefined symbols.
Fixes PR40204
Differential Revision: https://reviews.llvm.org/D56947
llvm-svn: 352645
|
|
|
|
|
|
|
|
|
|
| |
Summary: Fixes PR40219
Subscribers: dschuff, mehdi_amini, inglorion, jgravelle-google, aheejin, sunfish, steven_wu, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D57420
llvm-svn: 352575
|
|
|
|
|
|
|
|
|
|
| |
Summary: Fixes PR40494
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D57370
llvm-svn: 352554
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to reflect the new license.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351636
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D56874
llvm-svn: 351488
|
|
|
|
| |
llvm-svn: 351412
|
|
|
|
|
|
|
| |
This reverts commit 71eaf61c6c121c8c3bcaf3490557e92cf81599cb. One of
the lld tests was breaking, so revert this change until it is fixed.
llvm-svn: 351409
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: sbc100, aheejin, dschuff
Subscribers: jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D56807
llvm-svn: 351400
|
|
|
|
|
|
|
|
|
|
|
| |
This change bumps for version number of the wasm object file
metadata.
See https://github.com/WebAssembly/tool-conventions/pull/92
Differential Revision: https://reviews.llvm.org/D56762
llvm-svn: 351287
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Associated with D56338.
Reviewers: aheejin, aardappel
Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D56339
llvm-svn: 350610
|