| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
This patch is a follow-up to the rL232409 and allows define symbols
in a linker script in case of linking shared library.
llvm-svn: 234163
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 234162
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 234157
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 234156
|
|
|
|
| |
llvm-svn: 234155
|
|
|
|
|
|
|
| |
The readAddend() does not depend on MipsRelocationHandler and should not
be its member function.
llvm-svn: 234154
|
|
|
|
| |
llvm-svn: 234153
|
|
|
|
|
|
|
|
|
|
| |
The error was introduced during mechanical replacement
of raw memory reads/writes to use readxxle/writexxle functions
in r230725.
Noted and fixed by Suprateeka R Hegde <hegdesmailbox@gmail.com>
llvm-svn: 234144
|
|
|
|
|
|
|
|
|
|
| |
This matches other linkers behaviour. Moreover, there's really
no need to keep them around.
Reported by: Rafael Avila de Espindola
PR: 22890
llvm-svn: 234130
|
|
|
|
| |
llvm-svn: 234120
|
|
|
|
|
|
| |
getMergeReginfoMask => getMergedReginfoMask
llvm-svn: 234116
|
|
|
|
|
|
|
|
| |
In case of MIPS N64 ABI linker should merge registers usage masks stored
in the input .MIPS.options sections and save result into the output
.MIPS.options section.
llvm-svn: 234115
|
|
|
|
| |
llvm-svn: 234105
|
|
|
|
|
|
|
|
|
|
|
| |
In case of MIPS O32 ABI linker should merge registers usage masks stored
in the input .reginfo sections and save result into the output .reginfo
section.
The ABI states that the .reginfo section should be put into the separate
segment. This requirement is not implemented in this patch.
llvm-svn: 234103
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 234085
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
canParse took three parameters -- file magic, filename extension and
memory buffer. All but YAMLReader ignored the second parameter.
This patch removes the parameter.
llvm-svn: 234080
|
|
|
|
| |
llvm-svn: 234077
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
So that we can remove one template parameter from ELFReader.
ELF port is heavily templatized, and I want to reduce the usage
where possible.
llvm-svn: 234074
|
|
|
|
| |
llvm-svn: 234072
|
|
|
|
| |
llvm-svn: 234070
|
|
|
|
| |
llvm-svn: 234069
|
|
|
|
|
|
|
|
|
|
| |
Only MIPS defined the member function, but this feature is not actually
MIPS-specific. Also, the dependency to the MIPS-only member function
prevented us from merging <Arch>ELF{Object,DSO}Reader classes.
This patch moves the feature from MipsLinkingContext to LinkingContext.
llvm-svn: 234068
|
|
|
|
| |
llvm-svn: 234066
|
|
|
|
|
|
| |
It is enough to have single TargetLayout class.
llvm-svn: 234065
|
|
|
|
|
|
|
| |
The two classes are the same other than a few exceptions.
This patch merges them using templates.
llvm-svn: 234060
|
|
|
|
|
|
|
|
|
|
|
| |
<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
|