This is a preparetory change for function gc which also
requires relocations to be copied in ranges like this.
Differential Revision: https://reviews.llvm.org/D41313
llvm-svn: 320948
Since imports are undefined symbols we know we can
find all of them my looking at the symbol table alone.
(i.e. imports cannot be have local binding).
This will be strictly faster and also allows us
to to remove a method from Symbol class
Differential Revision: https://reviews.llvm.org/D41304
llvm-svn: 320847
Without this the LLVM_BUILD_LLVM_DYLIB+DLLVM_LINK_LLVM_DYLIB build
break.
Also remove unneeded lldCore from wasm/CMakeLists.txt
Differential Revision: https://reviews.llvm.org/D41194
llvm-svn: 320610
Create the indirect function table based on symbols rather
than just duplicating the input entries. This has the
effect of de-duplicating the table.
This is a followup to the equivalent change made for globals:
https://reviews.llvm.org/D40859
Partially based on a patch by Nicholas Wilson:
https://reviews.llvm.org/D40845
Differential Revision: https://reviews.llvm.org/D40989
llvm-svn: 320428
This adds a `--no-entry` argument to wasm LLD used to
suppress the default `_start` entry point.
Patch by Nicholas Wilson!
Differential Revision: https://reviews.llvm.org/D40725
llvm-svn: 320167
Adds a new argument to wasm-lld, `--undefined`, with
similar semantics to the ELF linker. It pulls in symbols
from files contained within a `.a` archive, forcing them
to be included even if the translation unit would not
otherwise be pulled in.
Patch by Nicholas Wilson
Differential Revision: https://reviews.llvm.org/D40724
llvm-svn: 320004
This change cleans up the way wasm exports and globals
are generated, particualrly for -r/--relocatable where
globals need to be created and exported in order for
output relocations which reference them.
Remove the need for a per file GlobalIndexOffset and
instead set the output index for each symbol directly.
This simplifies the code in several places.
Differential Revision: https://reviews.llvm.org/D40859
llvm-svn: 320001
This patch is to rename check CHECK and make it a C macro, so that
we can evaluate the second argument lazily.
Differential Revision: https://reviews.llvm.org/D40915
llvm-svn: 319974
This file contained only a single function that was only
really needed in one place, so just inline it.
Differential Revision: https://reviews.llvm.org/D40870
llvm-svn: 319876
This line was mistakenly deleted in rL319813
Add a test for stackpointer relocations.
Differential Revision: https://reviews.llvm.org/D40847
llvm-svn: 319828
This is part of larger change to add synthetic symbols
for section start/end points and init/fini_array:
https://reviews.llvm.org/D40760
Allows synthetic global symbols to have an explicitly set
virtual address.
Differential Revision: https://reviews.llvm.org/D40843
llvm-svn: 319813
This is a small change I split of from a larger one
that simplifies the condition that need to be checked
when decided if we need to emit relocation and all the
things they depend on (symbols, etc).
Differential Revision: https://reviews.llvm.org/D40825
llvm-svn: 319789
This change allows checking of function signatures but
does not yes enable it by default. In this mode, linking
two objects that were compiled with a different signatures
for the same function will produce a link error.
New options for enabling and disabling this feature have been
added: (--check-signatures/--no-check-signatures).
Differential Revision: https://reviews.llvm.org/D40371
llvm-svn: 319396
std::set is pretty slow. We generally prefer llvm::StringSet if we don't
need an sorted set.
Differential Revision: https://reviews.llvm.org/D40579
llvm-svn: 319371
These should get initialized in by Driver.cpp based on
command line options.
Also, sort entries.
Differential Revision: https://reviews.llvm.org/D40570
llvm-svn: 319219
This linker backend is still a work in progress but is
enough to link simple programs including linking against
library archives.
Differential Revision: https://reviews.llvm.org/D34851
llvm-svn: 318539