| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
<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
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 234052
|
|
|
|
|
|
|
| |
<Arch>TargetHandler.h and <ArcH>RelocationHandler.h include each other.
This patch breaks the circular dependencies.
llvm-svn: 234050
|
|
|
|
|
|
|
|
| |
All <Arch>ELFFileCreateFileTraits structs are the same except its file type.
That means that we don't need to pass the type traits. Instead, we can only
pass file types. By doing this, we can remove copy-pasted boilerplates.
llvm-svn: 234047
|
|
|
|
|
|
|
| |
result_type is no longer part of the type traits, so keeping it here
is confusing.
llvm-svn: 234044
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 234040
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
What we are doing in ELFTarget.h was dubious. In the file, we define
partial classes of <Arch>LinkingContexts to declare only static member
functions. We have different (complete) class definitions in other files.
They would conflict if they exist in the same compilation unit (because
the ones defined in ELFTarget.h has only static member functions).
I don't think this was valid C++.
http://reviews.llvm.org/D8797
llvm-svn: 234039
|
|
|
|
| |
llvm-svn: 234014
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch provides implementation of R_ARM_TARGET1 relocation with
configuration of its behaviour from a command line. This patch provides
two command line options for GnuLd driver: --arm-target1-rel and
--arm-target1-abs (similar to ld option names with extra prefix 'arm-').
So user may choose which behaviour of R_ARM_TARGET1 is preferred for his
implementation of libc.
Differential Revision: http://reviews.llvm.org/D8707
llvm-svn: 234009
|
|
|
|
|
|
|
|
| |
result_type is always ErrorOr<unique_ptr<File>>, and since the type traits
is for instantiating ELF files, it's unlikely that we want to return
something else. This patch removes that type.
llvm-svn: 233948
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 233924
|
|
|
|
|
|
|
|
| |
Since we no longer support MSVC 2012, we can assume that variadic
templates are always supported. This patch removes an #ifdef for
C++ compilers that don't support variadic templates.
llvm-svn: 233901
|
|
|
|
|
|
|
|
|
|
|
| |
The function call that goes through PLT table may be performed
from both ARM and Thumb code.
This situation requires adding a veneer to original PLT code
(which is always ARM) to effect Thumb-to-ARM transition.
Differential Revision: http://reviews.llvm.org/D8701
llvm-svn: 233900
|
|
|
|
|
|
|
| |
The case is possible with wrong input, so report
an error instead of using llvm_unreachable.
llvm-svn: 233899
|
|
|
|
| |
llvm-svn: 233897
|
|
|
|
| |
llvm-svn: 233896
|
|
|
|
|
|
|
|
|
| |
There is one-to-one correspondence between ELF machine type and a
LinkingContext. We passed them as separate arguments to the constructor.
This patch is to teach the LinkingContexts about their machine types,
so that we don't need to pass that data as separate arguments.
llvm-svn: 233894
|
|
|
|
|
|
|
|
| |
Looks like MipsTargetHandler::_runtimeFile is unused.
MipsRuntimeFile doesn't seem to add values to the base class,
so I removed that class too.
llvm-svn: 233888
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<Arch>ELFLinkingContext.
registerRelocationNames() function is called to register all known
ELF relocation types to the central registry. Since we have separate
LinkingContext class for each ELF machine type, we need to call the
function for each LinkingContext.
However, the function belonged to TargetHandler instead of LinkingContext.
So we needed to do ctx.getTargetHandler().registerRelocationNames().
This patch removes that redundant getTargetHandler call by moving the
function from TargetHandler to LinkingContext.
Conceptually this patch is small, but in reality it's not that small.
It's because the same code is copied to each architecture.
Most of this patch is just repetition. We need to merge them, but
that cannot be done in this patch.
llvm-svn: 233883
|
|
|
|
|
|
|
|
| |
Also removed some over-generalization added in r232866, such as
making a function take two parameters and pass two equivalent
arguments to the function.
llvm-svn: 233882
|
|
|
|
| |
llvm-svn: 233880
|
|
|
|
|
|
|
|
| |
Other createWriter<Arch> functions take <Arch>LinkingContext as arguments.
Only createWriterELF was an exception. This patch makes it consistent with
others.
llvm-svn: 233878
|
|
|
|
|
|
| |
members.
llvm-svn: 233873
|
|
|
|
| |
llvm-svn: 233872
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<Arch>TargetHandler::kindString is a static member variable
containg a list of names of relocation types.
The member is used only by one function, registerRelocationNames,
so they don't have to be a static member.
This patch makes the visibility of the data narrower by making
them file-scoped variables in small files.
llvm-svn: 233867
|
|
|
|
| |
llvm-svn: 233864
|
|
|
|
| |
llvm-svn: 233863
|
|
|
|
| |
llvm-svn: 233859
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 233812
|
|
|
|
| |
llvm-svn: 233799
|
|
|
|
| |
llvm-svn: 233798
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 233783
|
|
|
|
| |
llvm-svn: 233782
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In r233772, I removed an empty class, DefaultTargetHandler, from
the class hierarchy by merging the class with TargetHandler. I then
found that TargetHandler and its base class, TargetHandlerBase,
are also almost the same.
We need to go deeper.
In this patch, I merged TargetHandlerBase with TargetHandler.
The only difference between them is the existence (or absense)
of a pure virtual function registerRelocationName(). I added that
function to the (new) TargetHandler.
One more thing is that TargetHandler was templated for no reason.
I made it non-templated class.
llvm-svn: 233773
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DefaultTargetHandler is the base class of all <Arch>TargetHandler classes,
and it's the only derived class of TargetHandler class.
TargetHandler and DefaultTargetHandler are actually the same. They define
the same set of pure virtual functions. DefaultTargetHandler is a useless
class in the class hierarchy -- it shouldn't have been added in the first place.
This patch makes all <Arch>TargetHandler classes directly derive from
TargetHandler and removes DefaultTargetHandler.
llvm-svn: 233772
|
|
|
|
|
|
|
|
|
|
|
| |
All calls of findAbsoluteAtoms seem a bit awkward because of the type
of the function. It semantically returns a pointer to an AtomLayout or
nothing, so I made the function return AtomLayout*.
In this patch, I also expanded some "auto"s because their actual type
were not obvious in their contexts.
llvm-svn: 233769
|
|
|
|
|
|
|
| |
findAbsoluteAtom() returns absoluteAtom().end() if no atom is found.
Dereferencing end() value results an undefined behavior.
llvm-svn: 233765
|
|
|
|
|
|
|
| |
Only MIPS used that member function, and by removing the use of the
function, I removed a static_cast. Seems like it's a win.
llvm-svn: 233748
|
|
|
|
|
|
|
| |
At least in Mips we don't have a prefix for member variables.
Repeating the architecture is verbose.
llvm-svn: 233746
|
|
|
|
|
|
|
| |
Apparently they are copy-pastes. They need to be merged, or otherwise
they will diverge needlessly as I did in r233723...
llvm-svn: 233741
|
|
|
|
| |
llvm-svn: 233739
|
|
|
|
|
|
|
| |
This change should have been done in r233737, but I made a mistake to
not include into that.
llvm-svn: 233738
|
|
|
|
|
|
|
| |
Identifiers starting with _[A-Z] is reserved for the language.
User programs shouldn't use such identifiers.
llvm-svn: 233737
|
|
|
|
| |
llvm-svn: 233735
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 233727
|
|
|
|
| |
llvm-svn: 233723
|
|
|
|
| |
llvm-svn: 233721
|
|
|
|
|
|
|
| |
FINDV4BITMASK macro is defined as a macro so that the macro body is inlined.
We should use inlined functions instead of macros.
llvm-svn: 233719
|
|
|
|
|
|
|
|
| |
Multiple inheritance is casually used here. Rewriting to not
using multiple inheritance reduces the complexity of the code
and also makes it shorter.
llvm-svn: 233718
|
|
|
|
| |
llvm-svn: 233710
|