| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 326896
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43727
llvm-svn: 326282
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, one function adds all types of undefined symbols. That
doesn't fit to the wasm's undefined symbol semantics well because
different types of undefined symbols are very different in wasm.
As a result, separate control flows merge in this addUndefined function
and then separate again for each type. That wasn't easy to read.
This patch separates the function into three functions. Now it is pretty
clear what we are doing for each undefined symbol type.
Differential Revision: https://reviews.llvm.org/D43697
llvm-svn: 326271
|
|
|
|
| |
llvm-svn: 326013
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43526
llvm-svn: 325953
|
|
|
|
|
|
|
|
| |
Because it's a waste of time to handle --mllvm before --version.
Differential Revision: https://reviews.llvm.org/D43527
llvm-svn: 325952
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43525
llvm-svn: 325948
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change modified lld to in response the llvm change which
moved to a more explicit symbol table in the object format.
Based on patches by Nicholas Wilson:
1. https://reviews.llvm.org/D41955
2. https://reviews.llvm.org/D42585
The primary difference that we see in the test output is that
for relocatable (-r) output we now have symbol table which
replaces exports/imports and globals.
See: https://github.com/WebAssembly/tool-conventions/issues/38
Differential Revision: https://reviews.llvm.org/D43264
llvm-svn: 325861
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Purely a rename in preparation for adding new global symbol type.
We want to use GlobalSymbol to represent real wasm globals and
DataSymbol for pointers to things in linear memory (what ELF would
call STT_OBJECT).
This reduces the size the patch to add the explicit symbol table
which is coming soon!
Differential Revision: https://reviews.llvm.org/D43476
llvm-svn: 325645
|
|
|
|
| |
llvm-svn: 325624
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43408
llvm-svn: 325406
|
|
|
|
|
|
|
|
|
|
|
|
| |
These were duplicating (incorrectly) some of the logic for
handling conflicts, but since they are only ever added right
at the start we can assume no existing symbols.
Also rename these methods for clarity.
Differential Revision: https://reviews.llvm.org/D43252
llvm-svn: 325045
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is similar to _end (See https://linux.die.net/man/3/edata for more)
but using our own unique name since our use cases will most likely be
different and we want to keep our options open WRT to memory layout.
This change will allow is to remove the DataSize from the linking
metadata section which is currently being used by emscripten to derive
the end of the data.
Differential Revision: https://reviews.llvm.org/D42867
llvm-svn: 324443
|
|
|
|
|
|
|
|
|
|
|
|
| |
Group all synthetic symbols in the in single struct to match
the ELF linker.
This change is part of a larger change to add more linker
symbols such as `_end` and `_edata`.
Differential Revision: https://reviews.llvm.org/D42866
llvm-svn: 324157
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this initial version we only GC symbols with `hidden` visibility since
other symbols we export to the embedder.
We could potentially modify this the future and only use symbols
explicitly passed via `--export` as GC roots.
This version of the code only does GC of data and code. GC for the
types section is coming soon.
Differential Revision: https://reviews.llvm.org/D42511
llvm-svn: 323842
|
|
|
|
|
|
|
|
|
|
| |
This was added to mimic ELF, but maintaining it has cost
and we currently don't have any use for it outside of the
test code.
Differential Revision: https://reviews.llvm.org/D42324
llvm-svn: 323154
|
|
|
|
|
|
|
|
|
|
|
|
| |
Its much easier to export it via setHidden(false), now that
that is a thing.
As a side effect the start function is not longer always exports first
(becuase its being exported just like all the other function).
Differential Revision: https://reviews.llvm.org/D42321
llvm-svn: 323025
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D42327
llvm-svn: 323024
|
|
|
|
|
|
|
|
|
|
|
| |
This code was needed back when we were not able to write
out the synthetic symbol for main.
Add tests to make sure we can handle this now.
Differential Revision: https://reviews.llvm.org/D42322
llvm-svn: 323020
|
|
|
|
|
|
|
|
|
| |
This is an immutable exported global representing
the start of the heap area. It is a page aligned.
Differential Revision: https://reviews.llvm.org/D42030
llvm-svn: 322609
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is used by __cxa_ataxit to determine the currently
executing DLL. Once we fully support DLLs this will need
to be set to some address within the DLL.
The ELF linker added support for this symbol here:
https://reviews.llvm.org/D33856
Differential Revision: https://reviews.llvm.org/D42024
llvm-svn: 322606
|
|
|
|
|
|
|
|
|
|
| |
This is useful for emscripten or other tools that want to
selectively exports symbols without necessarily changing the
source code.
Differential Revision: https://reviews.llvm.org/D42003
llvm-svn: 322408
|
|
|
|
|
|
|
|
|
|
|
| |
This change create a new synthetic function in the final
output binary which calls the static constructors in sequence.
See: https://github.com/WebAssembly/tool-conventions/issues/25
Differential Revision: https://reviews.llvm.org/D41893
llvm-svn: 322388
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows libraries to supply a list of symbols which are
allowed to be undefined at link time (i.e. result in imports).
This method replaces the existing mechanism (-allow-undefined-file)
used by the clang driver to allow undefined symbols in libc.
For more on motivation for this see:
https://github.com/WebAssembly/tool-conventions/issues/35
In the long run we hope to remove this features and instead
include this information in the object format itself.
Differential Revision: https://reviews.llvm.org/D41922
llvm-svn: 322320
|
|
|
|
| |
llvm-svn: 320436
|
|
|
|
| |
llvm-svn: 320433
|
|
|
|
| |
llvm-svn: 320394
|
|
|
|
|
|
| |
Also fix variable naming style.
llvm-svn: 320393
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Also remove resulting unneeded function.
Differential Revision: https://reviews.llvm.org/D40990
llvm-svn: 320118
|
|
|
|
| |
llvm-svn: 320007
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D40771
llvm-svn: 319805
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 319512
|
|
|
|
|
|
|
|
| |
Patch by Nicholas Wilson
Differential Revision: https://reviews.llvm.org/D40691
llvm-svn: 319506
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 319238
|
|
|
|
| |
llvm-svn: 319236
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D40571
llvm-svn: 319221
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D40540
llvm-svn: 319211
|
|
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
|