log are also diagnostics so it seems like they should to
the same place as errors and debug messages.
Without this change when I enable --verbose those messages
go to stdout, but when I enable "-mllvm -debug" those messages
go to stderr (because dbgs() goes to stderr by default).
So I end up having to do this a lot:
lld <args> > output_message 2>&1
Differential Revision: https://reviews.llvm.org/D41033
llvm-svn: 320427
Now that gc sections runs after linker defined symbols are added it
can see symbols that point to an OutputSection.
Should fix a bot failure.
llvm-svn: 320412
This fixes pr35570.
We were creating these symbols after parsing version scripts, so they
could not be versioned.
We cannot move the version script parsing later because we need it for
lto.
One option is to move both addReservedSymbols and
createSyntheticSections earlier. The disadvantage is that some
sections created by createSyntheticSections replace other input
sections. For example, gdb index replaces .debug_gnu_pubnames, so it
wants to run after gc sections so that it can set S->Live to false.
What this patch does instead is to move just the ElfHeader creation
early.
llvm-svn: 320390
Add test for weakly defined symbols with the same name
Improve test for call-indirect to include the same call in two
different objects. This lays the ground work to improve the
output via de-duplicating the indirect call table:
https://reviews.llvm.org/D40989
Also make all tests consistently pass -mtriple rather than
declaring in the sources.
Differential Revision: https://reviews.llvm.org/D41024
llvm-svn: 320172
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
Summary:
I also changed the message to print both the ISA and the the architecture
name for incompatible files. Previously it would be quite hard to find the
actual path of the incompatible object files in projects that have many
object files with the same name in different directories.
Reviewers: atanasyan, ruiu
Reviewed By: atanasyan
Subscribers: emaste, sdardis, llvm-commits
Differential Revision: https://reviews.llvm.org/D40958
llvm-svn: 320056
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
It's pretty annoying to have LLD lowercase paths in error messages when
cross-compiling from a case-sensitive filesystem, since e.g. if I want
to examine the problematic object file, I have to perform some manual
case correction instead of just being able to copy the path from the
error message.
Differential Revision: https://reviews.llvm.org/D40931
llvm-svn: 319996
This reduces total allocations when linking clang fsds from 263.21MB
to 174.62MB.
This also has some very nice speed improvements on some
benchmarks. Chromium and clang fsds link 6% faster.
llvm-svn: 319976
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
Summary:
We want to automatically copy the appropriate mailing list
for review requests to the LLD repository.
For context, see the proposal and discussion here:
http://lists.llvm.org/pipermail/cfe-dev/2017-November/056032.html
Similar to D40179, I set up a new Diffusion repository with callsign
"LLD" for lld:
https://reviews.llvm.org/source/lld/
This explicitly updates lld's .arcconfig to point to the new C
repository in Diffusion, which will let us use Herald rule H270.
Reviewers: peter.smith, ruiu, rafael, sammccall
Reviewed By: sammccall
Subscribers: dlj, bkramer, sammccall, klimek
Differential Revision: https://reviews.llvm.org/D40495
llvm-svn: 319955
This avoids allocating the error message when there is no error that
check requires.
It avoids the code duplication of inlining check.
llvm-svn: 319922
As mentioned in PR35471, shared functions for which
.plt entry address is used shows up in bfd's map files.
Patch teaches LLD to do the same.
Differential revision: https://reviews.llvm.org/D40839
llvm-svn: 319879