| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Reviewed By: ruiu, MaskRay
Differential Revision: https://reviews.llvm.org/D72196
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Undefined symbols in WebAssembly can come with custom `import-module`
and `import-field` attributes. However when reading symbols from
bitcode object files during LTO those curtom attributes are not
available.
Once we compile the LTO object and read in the symbol table from the
object file we have access to these custom attributes. In this case,
when undefined symbols are added and a symbol already exists in the
SymbolTable we can't simple return it, we may need to update the
symbol's attributes.
Fixes: PR43211
Differential Revision: https://reviews.llvm.org/D68959
llvm-svn: 375081
|
|
|
|
|
|
|
|
|
|
| |
Similar to D68323, but for wasm.
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D68759
llvm-svn: 374279
|
|
|
|
|
|
|
|
| |
Fixes https://github.com/emscripten-core/emscripten/issues/8879
Differential Revision: https://reviews.llvm.org/D67729
llvm-svn: 372660
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This a follow up on: https://reviews.llvm.org/D62153
Handle the case where there are multiple object files that contain
undefined references to the same function. We only generate a function
variant if the existing symbol is directly called.
See: https://github.com/emscripten-core/emscripten/issues/8995
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67015
llvm-svn: 370509
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows undefined references in input files be resolved by the
optional symbols. Previously we were doing this before input file
reading which means it was working only for command line symbols
references (i.e. -u or --export).
Also use addOptionalDataSymbol for __dso_handle and make all optional
symbols hidden by default.
Differential Revision: https://reviews.llvm.org/D65920
llvm-svn: 368310
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
style change. NFC.
llvm-svn: 365605
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This puts handling of undefined symbols in a single location. Its
also more in line with the ELF backend which only reports undefined
symbols based on relocations.
One side effect is that we no longer report undefined symbols that are
only referenced in GC'd sections.
This also fixes a crash reported in the emscripten toolchain:
https://github.com/emscripten-core/emscripten/issues/8930.
Differential Revision: https://reviews.llvm.org/D64280
llvm-svn: 365553
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should be generating one __start/__stop pair per output segment
not per input segment. The test wasn't catching this because it was
only linking a single object file.
Fixes PR41565
Differential Revision: https://reviews.llvm.org/D64148
llvm-svn: 365308
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D62886
llvm-svn: 362626
|
|
|
|
|
|
|
|
|
|
| |
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62824
llvm-svn: 362522
|
|
|
|
|
|
|
|
| |
These can still be exported via --export if needed.
Differential Revision: https://reviews.llvm.org/D62744
llvm-svn: 362276
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
not called directly.
We recently added special handling for function that are not called
directly but failed to add testing for the LTO case.
See https://reviews.llvm.org/D62153
Differential Revision: https://reviews.llvm.org/D62561
llvm-svn: 361975
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
called directly
When function signatures don't match and the undefined function is not
called directly (i.e. only has its address taken) we don't issue a
warning or create a runtime thunk for the undefined function.
Instead in this case we simply use the defined version of the function.
This is possible since checking signatures of dynamic calls happens
at runtime so any invalid usage will still result in a runtime error.
This is needed to allow C++ programs to link without generating
warnings. Its not uncommon in C++ for vtables to be populated by
function address whee the signature of the function is not known in the
compilation unit. In this case clang declares the method as void(void)
and relies on the vtable caller casting the data back to the correct
signature.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=40412
Differential Revision: https://reviews.llvm.org/D62153
llvm-svn: 361678
|
|
|
|
|
|
|
|
|
|
|
| |
The code for implementing this features is taken almost verbatim
from the ELF backend.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=41681
Differential Revision: https://reviews.llvm.org/D62380
llvm-svn: 361639
|
|
|
|
|
|
|
|
|
|
|
| |
Previously undefined symbol references were only traced if they were
seen before that definition.
Fixes https://bugs.llvm.org/show_bug.cgi?id=41878
Differential Revision: https://reviews.llvm.org/D61929
llvm-svn: 361636
|
|
|
|
|
|
|
|
|
|
| |
This is a reland of rL361235.
Fixes https://bugs.llvm.org/show_bug.cgi?id=41565
Differential Revision: https://reviews.llvm.org/D61876
llvm-svn: 361476
|
|
|
|
|
|
|
|
|
| |
This reverts commit 7804dbddccba412087a15cab8db4412939700952.
This change broke a bunch of tests of the WebAssembly waterfall.
Will hopefully reland with increased test coverage.
llvm-svn: 361273
|
|
|
|
|
|
|
|
| |
Fixes https://bugs.llvm.org/show_bug.cgi?id=41565
Differential Revision: https://reviews.llvm.org/D61876
llvm-svn: 361236
|
|
|
|
|
|
|
|
|
| |
But don't apply comdat groups when loading the LTO object files.
This is basically the same logic used by the ELF linker.
Differential Revision: https://reviews.llvm.org/D61924
llvm-svn: 360782
|
|
|
|
| |
llvm-svn: 358663
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D60431
llvm-svn: 357966
|
|
|
|
| |
llvm-svn: 357187
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D57725
llvm-svn: 353264
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This adds support for the 'event section' specified in the exception
handling proposal.
Wasm exception handling binary model spec:
https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md#changes-to-the-binary-model
Reviewers: sbc100, ruiu
Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D54875
llvm-svn: 348703
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D54758
llvm-svn: 347621
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: sbc100
Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D54688
llvm-svn: 347273
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With LTO when and undefined function (with a known signature)
in replaced by a defined bitcode function we were loosing the
signature information (since bitcode functions don't have
signatures).
With this change we preserve the original signature from the
undefined function and verify that the post LTO compiled
function has the correct signature.
This change improves the error handling in the case where
there is a signature mismatch with a function defined in
a bitcode file.
Differential Revision: https://reviews.llvm.org/D50721
llvm-svn: 343340
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This matches the behavior of the ELF linker where -u/--undefined
means symbols will get pulled in from archives but won't result
in link error if they are missing.
Also, don't actually great symbol table entries for the undefined
symbols, again matching more closely the ELF linker.
This also results in simplification of the code.
Differential Revision: https://reviews.llvm.org/D50279
llvm-svn: 338938
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D49147
llvm-svn: 338767
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D49113
llvm-svn: 337314
|
|
|
|
|
|
|
|
|
|
|
| |
Function symbols that come from bitcode have not signatures.
After LTO when the real symbols are read in we need to make
sure that we set the signature on the existing symbol.
the signature-less undefined functions.
Differential Revision: https://reviews.llvm.org/D48693
llvm-svn: 335875
|
|
|
|
|
|
|
|
|
|
| |
This caused a lot of issues on the WebAssembly waterfall.
In particular, until with the signature of `main`. We
probably want a better solution for main before we re-land.
Reverts rL335192
llvm-svn: 335355
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During symbol resolution, emit warnings for function signature
mismatches. During GC, if any mismatched symbol is marked as live
then generate an error.
This means that we only error out if the mismatch is written to the
final output. i.e. if we would generate an invalid wasm file.
Differential Revision: https://reviews.llvm.org/D48394
llvm-svn: 335192
|
|
|
|
|
|
|
|
|
|
| |
We don't start our error messages with capital letters.
Split out from https://reviews.llvm.org/D48394
Differential Revision: https://reviews.llvm.org/D48400
llvm-svn: 335186
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D47162
llvm-svn: 333570
|
|
|
|
|
|
|
|
|
|
|
| |
The DEBUG() macro is very generic so it might clash with other projects.
The renaming was done as follows:
- git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g'
- git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
Differential Revision: https://reviews.llvm.org/D44977
llvm-svn: 332351
|
|
|
|
|
|
|
|
|
| |
Since we a no longer using this function for the wasm start
section we don't actually care what its signature is.
Differential Revision: https://reviews.llvm.org/D46594
llvm-svn: 332308
|
|
|
|
|
|
|
|
| |
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D46849
llvm-svn: 332306
|