| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 232756
|
|
|
|
| |
llvm-svn: 232755
|
|
|
|
|
|
|
|
| |
This includes handling of R_ARM_TLS_IE32 and R_ARM_TLS_LE32 relocs.
Differential Revision: http://reviews.llvm.org/D8353
llvm-svn: 232708
|
|
|
|
| |
llvm-svn: 232707
|
|
|
|
| |
llvm-svn: 232706
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 232705
|
|
|
|
|
|
| |
Address comments from Espindola.
llvm-svn: 232497
|
|
|
|
| |
llvm-svn: 232474
|
|
|
|
|
|
|
|
| |
Test case for every relocation is added.
Differential Revision: http://reviews.llvm.org/D7565
llvm-svn: 232464
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes improves performance of lld, when self-hosting lld, when compared
with the bfd linker. BFD linker on average takes 8 seconds in elapsed time.
lld takes 3 seconds elapased time average. Without this change, lld takes ~5
seconds average. The runtime comparisons were done on a release build and
measured by running linking thrice.
lld self-host without the change
----------------------------------
real 0m3.196s
user 0m4.580s
sys 0m0.832s
lld self-host with lld
-----------------------
user 0m3.024s
user 0m3.252s
sys 0m0.796s
time taken to build lld with bfd
--------------------------------
real 0m8.419s
user 0m7.748s
sys 0m0.632s
llvm-svn: 232460
|
|
|
|
|
|
|
| |
MSVC 2013 cannot compile this code because of C1001 "internal error".
Stop using initializer list without type name.
llvm-svn: 232448
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `eh_frame_ptr` field in the `.eh_frame_hdr` section contains an address
of the `.eh_frame` section. Using an absolute 32-bit format for encoding
of this field does not work for 64-bit targets. It is better to use a
relative format because it covers both 32-bit and 64-bit cases. Sure
this work if a distance between `.eh_frame_hdr` and `.eh_frame` sections
is less than 4 Gb but it is a rather correct assumption.
http://reviews.llvm.org/D8352
llvm-svn: 232414
|
|
|
|
|
|
|
|
|
|
| |
Puts symbols defined in linker script expressions in a runtime file that is
added as input to the resolver, making the input object files see symbols
defined in linker scripts.
http://reviews.llvm.org/D8263
llvm-svn: 232409
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit implements the behaviour of the SECTIONS linker script directive,
used to not only define a custom mapping between input and output sections, but
also order input sections in the output file. To do this, we modify
DefaultLayout with hooks at important places that allow us to re-order input
sections according to a custom order. We also add a hook in SegmentChunk to
allow us to calculate linker script expressions while assigning virtual
addresses to the input sections that live in a segment.
Not all SECTIONS constructs are currently supported, but only the ones that do
not use special sort orders. It adds two LIT test as practical examples of
which sections directives are currently supported.
In terms of high-level changes, it creates a new class "script::Sema" that owns
all linker script ASTs and the logic for linker script semantics as well.
ELFLinkingContext owns a single copy of Sema, which will be used throughout
the object file writing process (to layout sections as proposed by the linker
script).
Other high-level change is that the writer no longer uses a "const" copy of
the linking context. This happens because linker script expressions must be
calculated *while* calculating final virtual addresses, which is a very late
step in object file writing. While calculating these expressions, we need to
update the linker script symbol table (inside the semantics object), and, thus,
we are "modifying our context" as we prepare to write the file.
http://reviews.llvm.org/D8157
llvm-svn: 232402
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 232364
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 232363
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 232362
|
|
|
|
| |
llvm-svn: 232361
|
|
|
|
| |
llvm-svn: 232360
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 232359
|
|
|
|
|
|
|
|
|
|
|
| |
The gotSymbol need not be a global static variable. Apart from this reason, This
variable was creating an issue with self hosting lld, as there seems to be an
issue running global initializers, when initializing the guard for this static
variable.
Program received signal SIGTRAP, Trace/breakpoint trap.
llvm-svn: 232341
|
|
|
|
|
|
|
| |
We don't want to risk to override wrong st_other bits, and when
we need to zero, we can do that explictly.
llvm-svn: 232282
|
|
|
|
|
|
|
|
| |
This reverts commit r232253.
Fix comments from dblaikie. Since these functions dont access member state, its ok to be static.
llvm-svn: 232271
|
|
|
|
|
|
|
|
|
| |
Handle resolution of symbols coming from linked object files lazily.
Add implementation of handling _GLOBAL_OFFSET_TABLE_ and __exidx_start/_end symbols for ARM platform.
Differential Revision: http://reviews.llvm.org/D8159
llvm-svn: 232261
|
|
|
|
|
|
| |
Functions hasOutputSegment/maybeGetSOName doesnot need not be static.
llvm-svn: 232253
|
|
|
|
|
|
| |
Gnu doesnot creates only a .got section.
llvm-svn: 232252
|
|
|
|
| |
llvm-svn: 232251
|
|
|
|
|
|
| |
Fix ambiguous finalize function.
llvm-svn: 232250
|
|
|
|
|
|
|
|
| |
The Segment Chunk had two functions one to append a section and one to append a
chunk. A section is a subclass of a chunk and clearly this can be merged into
one single function.
llvm-svn: 232249
|
|
|
|
|
|
|
|
|
|
|
| |
GNU LD has an option named -T/--script which allows a user to specify
a linker script to be used [1]. LLD already accepts linker scripts
without this option, but the option is widely used. Therefore it is
best to support it in LLD as well.
[1] https://sourceware.org/binutils/docs/ld/Options.html#Options
llvm-svn: 232183
|
|
|
|
|
|
|
|
| |
template class instantiation
No functional changes.
llvm-svn: 232081
|
|
|
|
| |
llvm-svn: 232030
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the spec required by std::sort and friends.
Ordering things this way also dramatically simplifies the code as
short-circuit ensures we can skip all of the negative tests.
I've left one FIXME where we're establishing a fairly arbitrary
ordering. Previously, the function compared all types as equal except
for the ones it explicitly handled, but it didn't delegate correctly to
the atomflags when doing so, and so it would fail to be a SWO. The two
possible fixes are to stop comparing the atom flags entirely, or to
establish some arbitrary ordering of the types.
Since it was pure luck which ordering of unequal types we ended up with
previously (the caller was std::sort, not std::stable_sort) I chose to
make the ordering explicit and guaranteed. This seems like the best
conservative approach as I suspect we would want to switch to
stable_sort otherwise in order to have deterministic output.
Differential Revision: http://reviews.llvm.org/D8266
llvm-svn: 231968
|
|
|
|
|
|
|
|
|
|
| |
This will be replaced by a more generic class to handle
all the default symbols in an executable, e.g. __init_array.
Differential Revision: http://reviews.llvm.org/D8234
Reviewed by: shankare
llvm-svn: 231906
|
|
|
|
|
|
| |
We dropped Visual Studio 2012 support, so we can use template aliases.
llvm-svn: 231756
|
|
|
|
| |
llvm-svn: 231718
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 231646
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 231645
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 231644
|
|
|
|
| |
llvm-svn: 231643
|
|
|
|
| |
llvm-svn: 231642
|
|
|
|
|
|
|
|
|
|
|
| |
1. Move relocation addendum reading code to the MipsRelocationHandler
class to reduce code duplication.
2. Factor out the relocations calculation code into the separate
function to be ready to handle MIPS N64 ABI relocation chains.
No functional changes.
llvm-svn: 231641
|
|
|
|
| |
llvm-svn: 231640
|
|
|
|
|
|
|
|
| |
We should not take in account a type of "source" symbol. Cross mode jump
adjustment is requred when target symbol and relocation belong to
different (regular/microMIPS) instruction sets.
llvm-svn: 231639
|
|
|
|
|
|
|
|
| |
This code is simply dead. No one is using it.
http://reviews.llvm.org/D8125
llvm-svn: 231583
|
|
|
|
| |
llvm-svn: 231570
|
|
|
|
| |
llvm-svn: 231330
|
|
|
|
|
|
|
| |
DefinedAtom, which is the base class of ELFCommonAtom, has a
virtual destructor, so this is redundant.
llvm-svn: 231329
|
|
|
|
| |
llvm-svn: 231271
|
|
|
|
|
|
|
|
|
| |
Yet another chapter in the story. We're getting there, finally.
Note for the future: the tests for relocation have a lot of duplication
and probably can be unified in a single file. Let's reevaluate this once
the support will be complete (hopefully, soon).
llvm-svn: 231057
|