| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
This is initial patch to support MIPS64 object files linking.
The patch just makes some classes more generalized, and rejects
attempts to interlinking O32 and N64 ABI object files.
I try to reuse the current MIPS target related classes as much as
possible because O32 and N64 MIPS ABI are tightly related and share
almost the same set of relocations, GOT, flags etc.
llvm-svn: 227058
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 227051
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 227049
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 227048
|
|
|
|
|
|
|
|
| |
the class field declarations.
No functional changes.
llvm-svn: 227047
|
|
|
|
|
|
|
|
|
|
| |
lldELF is used by each ELF backend. lldELF's ELFLinkingContext
also held a reference to each backend, creating a link-time
cycle. This patch moves the backend references to lldDriver.
Differential Revision: http://reviews.llvm.org/D7119
llvm-svn: 226976
|
|
|
|
|
|
| |
This reverts commit 6a3f545b44cea46321e025d9ab773786af86cb51.
llvm-svn: 226928
|
|
|
|
|
|
|
|
|
|
| |
lldELF is used by each ELF backend. lldELF's ELFLinkingContext
also held a reference to each backend, creating a link-time
cycle. This patch moves the backend references to lldDriver.
Differential Revision: http://reviews.llvm.org/D7119
llvm-svn: 226922
|
|
|
|
|
|
|
|
|
|
|
| |
* Works better for shared libraries (sets PRIVATE instead of INTERFACE)
* Fixes http://llvm.org/bugs/show_bug.cgi?id=22269
* Also, use build-target names instead of component names
Differential Revision: http://reviews.llvm.org/D7074
From: Greg Fitzgerald <garious@gmail.com>
llvm-svn: 226702
|
|
|
|
|
|
|
|
|
|
|
| |
At the moment errors in relocation processing such as out of range
values are not detected or at best trapped by asserts which will not
be present in release builds. This patch adds support for checking
error return values from applyRelocation() calls and printing an
appropriate error message. It also adds support for printing multiple
errors rather than just the first one.
llvm-svn: 226557
|
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7023
From: Greg Fitzgerald <garious@gmail.com>
llvm-svn: 226346
|
|
|
|
|
|
|
| |
These classes contain only abstract virtual functions. Explicit
constructors are redundant.
llvm-svn: 226265
|
|
|
|
|
|
|
| |
This class defines a relocation handler interface. The interface does
not depend on the template argument so the argument is redundant.
llvm-svn: 226259
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 226256
|
|
|
|
|
|
|
| |
That reduce class dependencies and simplify the code a bit.
No functional changes.
llvm-svn: 226255
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 226254
|
|
|
|
|
|
|
| |
If object files satisfy O32 ABI they can be linked together even if some
of them contains MIPS64 or MIPS64R2 instructions.
llvm-svn: 226253
|
|
|
|
|
|
|
|
| |
The original commit had an issue with Mac OS dylib files. It didn't
handle fat binary dylib files correctly. This patch includes a fix.
A test for that case has already been committed in r225764.
llvm-svn: 226123
|
|
|
|
|
|
|
| |
r225764 broke a basic functionality on Mac OS. This change reverts
r225764, r225766, r225767, r225769, r225814, r225816, r225829, and r225832.
llvm-svn: 225859
|
|
|
|
| |
llvm-svn: 225764
|
|
|
|
|
|
|
|
|
| |
If a regular symbol has microMIPS-bit we need to stop linking. Now the
LLD does not check the `applyRelocation` return value and continues
linking anyway. As a temporary workaround use the `llvm_unreachable`
call to stop the linker.
llvm-svn: 224831
|
|
|
|
|
|
|
| |
The change is rather large but mainly it just adds handling of new relocations,
PLT entries etc.
llvm-svn: 224826
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 224817
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 224816
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 224815
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 224814
|
|
|
|
| |
llvm-svn: 224813
|
|
|
|
| |
llvm-svn: 224235
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation of parseFile() said that "the resulting File
object may take ownership of the MemoryBuffer." So, whether or not
the ownership of a MemoryBuffer would be taken was not clear.
A FileNode (a subclass of InputElement, which is being deprecated)
keeps the ownership if a File doesn't take it.
This patch makes File always take the ownership of a buffer.
Buffers lifespan is not always the same as File instances.
Files are able to deallocate buffers after parsing the contents.
llvm-svn: 224113
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a second patch for InputGraph cleanup.
Sorry about the size of the patch, but what I did in this
patch is basically moving code from constructor to a new
method, parse(), so the amount of new code is small.
This has no change in functionality.
We've discussed the issue that we have too many classes
to represent a concept of "file". We have File subclasses
that represent files read from disk. In addition to that,
we have bunch of InputElement subclasses (that are part
of InputGraph) that represent command line arguments for
input file names. InputElement is a wrapper for File.
InputElement has parseFile method. The method instantiates
a File. The File's constructor reads a file from disk and
parses that.
Because parseFile method is called from multiple worker
threads, file parsing is processed in parallel. In other
words, one reason why we needed the wrapper classes is
because a File would start reading a file as soon as it
is instantiated.
So, the reason why we have too many classes here is at
least partly because of the design flaw of File class.
Just like threads in a good threading library, we need
to separate instantiation from "start" method, so that
we can instantiate File objects when we need them (which
should be very fast because it involves only one mmap()
and no real file IO) and use them directly instead of
the wrapper classes. Later, we call parse() on each
file in parallel to let them do actual file IO.
In this design, we can eliminate a reason to have the
wrapper classes.
In order to minimize the size of the patch, I didn't go so
far as to replace the wrapper classes with File classes.
The wrapper classes are still there.
In this patch, we call parse() immediately after
instantiating a File, so this really has no change in
functionality. Eventually the call of parse() should be
moved to Driver::link(). That'll be done in another patch.
llvm-svn: 224102
|
|
|
|
|
|
| |
This piece of code was copied multiple times to each archs.
llvm-svn: 224001
|
|
|
|
|
|
|
|
|
| |
Some targets like microMIPS and ARM Thumb use the last bit of a symbol's
value to mark 'compressed' code. This patch adds new virtual function
`DynamicTable::getAtomVirtualAddress` which allows to adjust a symbol's
value before using it in a dynamic table tags like DT_INIT / DT_FINI.
llvm-svn: 223963
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At present each TargetRelocationHandler generates a pretty similar error
string and calls llvm_unreachable() when encountering an unknown
relocation. This is not ideal for two reasons:
1. llvm_unreachable disappears in release builds but we still want to
know if we encountered a relocation we couldn't handle in release
builds.
2. Duplication is bad - there is no need to have a per-architecture error
message.
This change adds a test for AArch64 to test whether or not the error
message actually works. The other architectures have not been tested
but they compile and check-lld passes.
llvm-svn: 223782
|
|
|
|
|
|
| |
Tested with check-lld with no regressions.
llvm-svn: 223462
|
|
|
|
|
|
|
| |
To find an AtomLayout object for the given symbol I replace the
`Layout::findAtomAddrByName` method by `Layout::findAtomLayoutByName` method.
llvm-svn: 223359
|
|
|
|
|
|
| |
No change in functionality.
llvm-svn: 222975
|
|
|
|
| |
llvm-svn: 222574
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 222470
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 222469
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 222468
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 222467
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 222415
|
|
|
|
|
|
| |
No functional changes
llvm-svn: 222325
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 222324
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 222323
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 222322
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 222321
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 222320
|
|
|
|
|
|
|
|
| |
Move functionality from MIPS target to DefaultLayout.
No change in functionality.
llvm-svn: 222313
|
|
|
|
|
|
| |
No change in functionality.
llvm-svn: 222311
|