| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
I think it is clear by now that the new linker is viable.
llvm-svn: 262158
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is to enable isa<> support for any files which need it.
It will be used in an upcoming patch to differentiate MachOFile from other implicitly generated files.
Reviewed by Lang Hames.
Differential Revision: http://reviews.llvm.org/D16103
llvm-svn: 257830
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a UI such as XCode, LLVM source files are in 'libraries' while clang
files are in 'clang libraries'.
This change moves the lld source to 'lld libraries' to make code browsing easier.
It should be NFC as the build itself is still the same, just the structure in a
UI differs.
llvm-svn: 257001
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Put sections to segments according to linker scripts if available.
Rework the code of TargetLayout::assignSectionsToSegments so it operates
on the given list of segments, which can be either read from linker scripts
or constructed as before.
Handle NONE segments defined in linker scripts by putting corresponding sections
to PT_NULL segment.
Consider flags set for segments through linker scripts.
Differential Revision: http://reviews.llvm.org/D10918
llvm-svn: 243002
|
|
|
|
|
|
|
|
| |
None of the implementations replace the SimpleFile with some other file,
they just modify the SimpleFile in-place, so a direct reference to the
file is sufficient.
llvm-svn: 240167
|
|
|
|
| |
llvm-svn: 240147
|
|
|
|
|
|
|
|
|
|
| |
HexagonEncodings.h contains a list of bitmasks. The file is used
only by HexagonRelocationHandler.cpp. The header is odd in the sense
that it uses struct Instruction but it doesn't define the data type.
This patch moves the struct definition to the header.
llvm-svn: 234947
|
|
|
|
| |
llvm-svn: 234938
|
|
|
|
|
|
|
|
| |
We don't need to repeat the template argument. They are not
ambiguous. MIPS is parameterized for ELFT, so we can't do this
for MIPS, though.
llvm-svn: 234913
|
|
|
|
| |
llvm-svn: 234869
|
|
|
|
| |
llvm-svn: 234868
|
|
|
|
|
|
|
| |
The data and the inline function defined in the header is used only
by HexagonRelocationHandler.cpp.
llvm-svn: 234867
|
|
|
|
| |
llvm-svn: 234866
|
|
|
|
| |
llvm-svn: 234865
|
|
|
|
| |
llvm-svn: 234864
|
|
|
|
| |
llvm-svn: 234863
|
|
|
|
| |
llvm-svn: 234862
|
|
|
|
|
|
|
| |
These this-> are there because their classes were templated.
They are no longer templated.
llvm-svn: 234859
|
|
|
|
| |
llvm-svn: 234857
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, ELFReader takes three template arguments: EFLT,
LinkingContextT and FileT. FileT is itself templated.
So it was a bit complicated. Maybe too much.
Most architectures don't actually need to be parameterized for ELFT.
For example, x86 is always ELF32LE and x86-64 is ELF64LE.
However, because ELFReader requires a ELFT argument, we needed
to parameterize a class even if not needed.
This patch removes the parameter from the class. So now we can
de-templatize such classes (I didn't do that in this patch, though).
This patch also removes ContextT parameter since it didn't have to be
passed as a template argument.
llvm-svn: 234853
|
|
|
|
| |
llvm-svn: 234834
|
|
|
|
| |
llvm-svn: 234831
|
|
|
|
|
|
|
| |
These classes are templated but actually instantiated for only
one ELF type.
llvm-svn: 234830
|
|
|
|
| |
llvm-svn: 234823
|
|
|
|
| |
llvm-svn: 234820
|
|
|
|
|
|
|
| |
HexagonSectionChunks.h and HexagonTargetHandler.h include each other.
This patch removes the former and merge it with the latter.
llvm-svn: 234817
|
|
|
|
| |
llvm-svn: 234790
|
|
|
|
| |
llvm-svn: 234784
|
|
|
|
|
|
|
| |
This file is not -Wconversion-clean, and seems like we don't care
about that except these lines. Fix these lines for simplicity.
llvm-svn: 234637
|
|
|
|
|
|
|
|
| |
Because calls of applyRelocation is parallelized, all functions
called from that need to be thread-safe. This piece of code
didn't use any synchronization mechanism, so it was not safe.
llvm-svn: 234628
|
|
|
|
| |
llvm-svn: 234558
|
|
|
|
| |
llvm-svn: 234557
|
|
|
|
| |
llvm-svn: 234556
|
|
|
|
|
|
|
| |
In other ELF ports, we don't use the macro. This patch removes the
macro for consistency and readability.
llvm-svn: 234552
|
|
|
|
|
|
|
|
| |
Because no one except Hexagon uses the header, we don't need to maintain
the header in the common directory. Also de-template the function for
readability.
llvm-svn: 234551
|
|
|
|
|
|
|
|
| |
SimpleFile is the only derived class of MutableFile.
This patch reduces the height of class hierarchy by removing
MutableFile class.
llvm-svn: 234354
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now 'writer' creates an instance of `RuntimeFile` in the constructor, then
populates the file in the virtual function `addDefaultAtoms`, then pass
owning of this file to the caller of virtual function `createImplicitFiles`.
First, we do not need to keep an instance of `RuntimeFile` so long. It is
enough to create the file, right after that populate it and pass the owning.
Second, relationship between `createImplicitFiles` and `addDefaultAtoms`
is complicated. The `createImplicitFiles` might call `addDefaultAtoms`,
overridden version of `addDefaultAtoms` might call base class `addDefaultAtoms`,
and overridden version of `createImplicitFiles` might call base class
`createImplicitFiles` as well as `addDefaultAtoms`.
The patch solves both problems above. It creates and populates runtime files
right in the createImplicitFiles(), removes `addDefaultAtoms` at all and
does not keep references to runtime files in class fields.
llvm-svn: 234347
|
|
|
|
| |
llvm-svn: 234273
|
|
|
|
|
|
|
|
|
|
|
| |
handleDefinedSymbol has return type of ErrorOr<ELFDefinedAtom *>.
However, it never returns an error. We are not checking errors.
It's marked as ErrorOr "just in case". That's a bad engineering
practice.
This patch simplifies the return type of the function.
llvm-svn: 234269
|
|
|
|
|
|
|
| |
All instances of the `createImplicitFiles` always return `true` and this
return value is used nowhere.
llvm-svn: 234205
|
|
|
|
|
|
| |
The `HexagonELFType` is declared in the HexagonLinkingContext.h.
llvm-svn: 234089
|
|
|
|
|
|
| |
In all other ELF related classes we use `ELFT` abbreviation.
llvm-svn: 234088
|
|
|
|
|
|
|
|
| |
Functions in the files are hard to read because of line wrapping.
Use shorter names for local variables so that the lines fit
within 80 columns.
llvm-svn: 234087
|
|
|
|
|
|
|
|
| |
These functions are "constructors" of the LinkingContexts. We already
have auxiliary classes and functions for ELFLinkingContext in the header.
They fall in the same category.
llvm-svn: 234082
|
|
|
|
|
|
|
|
|
|
| |
getRelocationHandler is a public interface to get an instance of
TargetRelocationHandler. We don't use any member function other than
applyRelocations to a returned instance. Returning a base class instance
suffices here. (If a return type is a derived class, it looks like we were
using derived classes features.)
llvm-svn: 234081
|
|
|
|
|
|
|
|
|
|
| |
Because of the previous change (r234074), ELFObjectReader became just
an alias for ELFReader. We can replace all occurrences of ELFObjectReader
with ELFReader.
In this patch, I also replaced ELFDSOReader to remove the alias template.
llvm-svn: 234076
|
|
|
|
| |
llvm-svn: 234072
|
|
|
|
| |
llvm-svn: 234069
|
|
|
|
|
|
| |
It is enough to have single TargetLayout class.
llvm-svn: 234065
|
|
|
|
|
|
|
|
|
|
|
| |
<Arch>ELFReader.h contains only a few typedefs. The typedefs are used
only by one class in <Arch>TargetHandler.h. Thus, the headers don't
worth to be independent files.
Since MipsELFReader.h contains code other than the boilerplate, I didn't
touch that file in this patch.
llvm-svn: 234056
|