| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
But only produce a warning (for now) unless --fatal-warnings
is passed.
Differential Revision: https://reviews.llvm.org/D46484
llvm-svn: 331574
|
|
|
|
|
|
|
|
|
| |
This reduces the number of lookups to one per COMDAT group, rather than
one per symbol in a COMDAT group.
Differential Revision: https://reviews.llvm.org/D44344
llvm-svn: 327523
|
|
|
|
|
|
|
|
|
|
| |
Previously we created __wasm_call_ctors with null InputFunction, and
added the InputFunction later. Now we create the SyntheticFunction with
null body, and set the body later.
Differential Revision: https://reviews.llvm.org/D44206
llvm-svn: 327149
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43966
llvm-svn: 326509
|
|
|
|
| |
llvm-svn: 326382
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43910
llvm-svn: 326379
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
The profailing style in lld seem to be to not include such empty lines.
Clang-tidy/clang-format seem to handle this just fine.
Differential Revision: https://reviews.llvm.org/D43528
llvm-svn: 325629
|
|
|
|
|
|
|
|
|
|
|
| |
I think if statements that end with return is easier to read than
cascaded if-else-if-else-if statements because it makes clear that
execution of a function terminates there. This patch also adds more
blank lines to separate code blocks to meaningful pieces.
Differential Revision: https://reviews.llvm.org/D43517
llvm-svn: 325625
|
|
|
|
| |
llvm-svn: 325614
|
|
|
|
|
|
|
|
| |
Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D43496
llvm-svn: 325613
|
|
|
|
|
|
|
|
| |
Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D43492
llvm-svn: 325598
|
|
|
|
|
|
|
|
|
| |
We already have isa<> for this, and these methods were simply
duplicating those redundantly.
Differential Revision: https://reviews.llvm.org/D43422
llvm-svn: 325418
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43416
llvm-svn: 325415
|
|
|
|
|
|
|
|
|
| |
This brings wasm into line with ELF and COFF in terms of
symbol types are represented.
Differential Revision: https://reviews.llvm.org/D43112
llvm-svn: 325150
|
|
|
|
|
|
|
|
|
| |
SetVector guarantees ordering, so with that we can get a deterministic
output for error messages.
Differential Revision: https://reviews.llvm.org/D43254
llvm-svn: 325064
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 323622
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Rather than explicit Function or InputSegment points store a
pointer to the base class (InputChunk) and use llvm dynamic
casts when we need a subtype.
This change is useful for add the upcoming gc-section support
wants to deal with all input chunks.
Subscribers: aheejin, llvm-commits
Differential Revision: https://reviews.llvm.org/D42625
llvm-svn: 323621
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See https://bugs.llvm.org/show_bug.cgi?id=35533, and D40844
Things covered:
* Removing duplicate data segments (as determined by COMDATs emitted
by the frontend)
* Removing duplicate globals and functions in COMDATs
* Checking that each time a COMDAT is seen it has the same symbols
as at other times (ie it's a stronger check than simply giving all
the symbols in the COMDAT weak linkage)
Patch by Nicholas Wilson!
Differential Revision: https://reviews.llvm.org/D40845
llvm-svn: 322415
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
InputFunction. NFC.
Differential Revision: https://reviews.llvm.org/D41419
llvm-svn: 322148
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This WasmSymbol types comes directly from the input objects
but we want to be able to represent synthetic symbols too.
This is more in line with how the ELF linker represents symbols.
This change also removes the logic from Symbol::getVirtualAddress
for finding the global address and instead has the InputFile
provide this.
Differential Revision: https://reviews.llvm.org/D41426
llvm-svn: 322145
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code section is now written out one function
at a time rather than all the functions in a given
objects being serialized at once.
This change lays the groundwork for supporting
--gc-sections.
Differential Revision: https://reviews.llvm.org/D41315
llvm-svn: 322138
|
|
|
|
|
|
|
|
| |
Corresponding LLVM change: https://reviews.llvm.org/D41472
Differential Revision: https://reviews.llvm.org/D41473
llvm-svn: 321244
|
|
|
|
|
|
| |
Patch by Nicholas Wilson
llvm-svn: 321097
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D40571
llvm-svn: 319221
|
|
|
|
|
|
|
|
|
|
|
| |
This is also consistent with SymVector that exists in COFF port
and soon to be added to the wasm port.
Split off as part of https://reviews.llvm.org/D40371
Differential Revision: https://reviews.llvm.org/D40525
llvm-svn: 319113
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D40510
llvm-svn: 319108
|
|
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
|