| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
Instead include InputFuction and InputSegment directly
in the subclasses that use them (DefinedFunction and
DefinedGlobal).
Differential Revision: https://reviews.llvm.org/D43493
llvm-svn: 325603
|
|
|
|
|
|
|
|
| |
Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D43492
llvm-svn: 325598
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch removes `OutRelocations` vector from the InputChunk and
directly consume `Relocations` vector instead. This should make the linker
faster because we don't create a temporary data structure, and it matches
the lld's design principle that we don't create temporary data structures
for object files but instead directly consume mmap'ed data whenever possible.
Differential Revision: https://reviews.llvm.org/D43491
llvm-svn: 325549
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43406
llvm-svn: 325538
|
|
|
|
| |
llvm-svn: 325537
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43435
llvm-svn: 325536
|
|
|
|
|
|
|
|
| |
Define toString(wasm::InputChunk *) and use that in MarkLive.cpp.
Differential Revision: https://reviews.llvm.org/D43434
llvm-svn: 325535
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Before the name of the function sounded like it was just a getter for the
private class member Addend. However, it actually calculates the final
value for the r_addend field in Elf_Rela that is used when writing the
.rela.dyn section. I also added a comment to the UseSymVA member to
explain how it interacts with computeAddend().
Differential Revision: https://reviews.llvm.org/D43161
llvm-svn: 325485
|
|
|
|
| |
llvm-svn: 325453
|
|
|
|
| |
llvm-svn: 325445
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43412
llvm-svn: 325444
|
|
|
|
|
|
|
|
|
| |
We already have isa<> for this, and these methods were simply
duplicating those redundantly.
Differential Revision: https://reviews.llvm.org/D43422
llvm-svn: 325418
|
|
|
|
|
|
|
|
|
|
| |
Currently, archive file name is missing in this message. In general,
we should avoid constructing strings in an ad-hoc manner and instead
use toString() to get consistent output strings.
Differential Revision: https://reviews.llvm.org/D43420
llvm-svn: 325416
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43416
llvm-svn: 325415
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43405
llvm-svn: 325414
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are running lld tests with "--full-shutdown" option because we don't
want to call _exit() in lld if it is running tests. Regular shutdown
is needed for leak sanitizer.
This patch changes the way how we tell lld that it is running tests.
Now "--full-shutdown" is removed, and LLD_IN_TEST environment variable
is used instead.
This patch enables full shutdown on all ports, e.g. ELF, COFF and wasm.
Previously, we enabled it only for ELF.
Differential Revision: https://reviews.llvm.org/D43410
llvm-svn: 325413
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43408
llvm-svn: 325406
|
|
|
|
|
|
|
|
|
|
| |
Invoking lld as ld.lld, ld.ld64, lld-link or wasm-ld is preferred
than invoking lld as lld and pass an -flavor option. We have "lld"
file mostly for historical reasons.
Differential Revision: https://reviews.llvm.org/D43407
llvm-svn: 325405
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43413
llvm-svn: 325404
|
|
|
|
|
|
|
|
| |
This is required after r325399:
- EF_AMDGPU_ARCH_GCN got removed
- In the test, EF_AMDGPU_ARCH_GCN is replaced with EF_AMDGPU_MACH_AMDGCN_GFX803
llvm-svn: 325400
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43287
llvm-svn: 325396
|
|
|
|
| |
llvm-svn: 325392
|
|
|
|
| |
llvm-svn: 325390
|
|
|
|
| |
llvm-svn: 325387
|
|
|
|
| |
llvm-svn: 325384
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
- Makes code more in line with LLVM style (e.g. const char * -> StringRef)
- Do not use formatv since we can construct message just by `+`
- Replace some odd types such as `const StringRef` with more common type
- Do not use default arguments if they are not necessary
Reviewers: sbc100
Subscribers: jfb, aheejin, llvm-commits, sunfish
Differential Revision: https://reviews.llvm.org/D43403
llvm-svn: 325383
|
|
|
|
| |
llvm-svn: 325382
|
|
|
|
|
|
|
|
|
|
|
|
| |
There seems to be no reason to collect this list of symbols.
Also fix a bug where --exclude-libs would apply to all symbols that
appear in an archive's symbol table, even if the relevant archive
member was not added to the link.
Differential Revision: https://reviews.llvm.org/D43369
llvm-svn: 325380
|
|
|
|
|
|
|
|
|
|
| |
Newer versions of the gnu assembler produce a X86_64_PLT32 for
calls. There is a change under review in llvm to do the same, so update
the tests to not depend on it.
We can still produce a R_X86_64_PC32 with ".long foo - .".
llvm-svn: 325379
|
|
|
|
| |
llvm-svn: 325377
|
|
|
|
|
|
|
|
|
|
| |
This bug effected undefined symbols that were resolved by
existing defined symbols. We were skipping the signature
check in this case.
Differential Revision: https://reviews.llvm.org/D43399
llvm-svn: 325376
|
|
|
|
|
|
| |
Patch by Nicholas Wilson!
llvm-svn: 325370
|
|
|
|
|
|
|
|
| |
Now that we have R_ADDEND, UseSymVA was redundant. We only want to
write the symbol virtual address when using an expression other than
R_ADDEND.
llvm-svn: 325360
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: rafael
Differential Revision: https://reviews.llvm.org/D43336
There is some discussion as to the exact behaviour of combining ICF and
--symbol-ordering-file, but it seems beneficial to warn when attempting
to order the removed symbol regardless of the preferred approach.
llvm-svn: 325333
|
|
|
|
|
|
| |
Addresses forgotten comment for D43071.
llvm-svn: 325332
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is PR36298.
(COPY), (INFO), (OVERLAY) all have the same effect:
section should be marked as non-allocatable.
(https://www.eecs.umich.edu/courses/eecs373/readings/Linker.pdf,
3.6.8.1 Output Section Type)
Differential revision: https://reviews.llvm.org/D43071
llvm-svn: 325331
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This follows up on r321889 where writing of Elf_Rel addends was partially
moved to RelocationBaseSection. This patch ensures that the addends are
always written to the output section when a input section uses RELA but the
output is REL.
Differential Revision: https://reviews.llvm.org/D42843
llvm-svn: 325328
|
|
|
|
|
|
|
|
| |
Previously, we accidentally dropped STB_WEAK bit from an undefined symbol
if there is a lazy object symbol with the same name. That caused a
compatibility issue with GNU gold.
llvm-svn: 325316
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D34554
llvm-svn: 325313
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even though it doesn't make sense, there seems to be multiple programs
in the wild that create PC-relative relocations in non-ALLOC sections.
I believe this is caused by the negligence of GNU linkers to not report
any errors for such relocations.
Currently, lld emits warnings against such relocations and exits.
So, you cannot link any program that contains wrong relocations until
you fix an issue in a program that generates wrong ELF files. It's often
impractical to fix a program because it's not always easy.
This patch relaxes the error checking and emit a warning instead.
Differential Revision: https://reviews.llvm.org/D43351
llvm-svn: 325307
|
|
|
|
|
|
|
|
| |
This also makes the behavior close to GNU ld's.
Differential Revision: https://reviews.llvm.org/D43284
llvm-svn: 325213
|
|
|
|
|
|
|
|
|
|
| |
When we are emitting a relocatable output, we should keep the original
symbol name including "@" part. Previously, we drop that part unconditionally
which resulted in dropping versions from symbols.
Differential Revision: https://reviews.llvm.org/D43307
llvm-svn: 325204
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was causing GCC builds with fail with:
Symbols.h:240:3: error: static assertion failed: Symbol types must be
trivially destructible
static_assert(std::is_trivially_destructible<T>(
The reason this is a gcc-only failure is that OptionalStorage has
as specialization for POD types that isn't built under GCC.
Differential Revision: https://reviews.llvm.org/D43317
llvm-svn: 325185
|
|
|
|
|
|
| |
This reverts commit r325158 because it broke GCC builds.
llvm-svn: 325183
|
|
|
|
|
|
|
| |
This static_assert is legitimate, but it is failing on some build environments.
I'm removing it until it's fixed to unbreak the bots.
llvm-svn: 325181
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D43305
llvm-svn: 325158
|
|
|
|
|
|
|
|
|
|
|
|
| |
--export-dynamic is given.
This patch addresses a minor compatibility issue with GNU linkers.
Previously, --export-dynamic-symbol is completely ignored if you
pass --export-dynamic together.
Differential Revision: https://reviews.llvm.org/D43266
llvm-svn: 325152
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a number of different situations when symbols are requested
to be ordered in the --symbol-ordering-file that cannot be ordered for
some reason. To assist with identifying these symbols, and either
tidying up the order file, or the inputs, a number of warnings have
been added. As some users may find these warnings unhelpful, due to how
they use the symbol ordering file, a switch has also been added to
disable these warnings.
The cases where we now warn are:
* Entries in the order file that don't correspond to any symbol in the input
* Undefined symbols
* Absolute symbols
* Symbols imported from shared objects
* Symbols that are discarded, due to e.g. --gc-sections or /DISCARD/ linker script sections
* Multiple of the same entry in the order file
Reviewed by: rafael, ruiu
Differential Revision: https://reviews.llvm.org/D42475
llvm-svn: 325125
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D42587
llvm-svn: 325124
|