| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 234573
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Having std:move(mb) and mb->getBuffer() in the same argument list is not safe
because the order of evaluation is not defined.
llvm-svn: 234541
|
|
|
|
|
|
|
|
| |
CreateELF.h was included only by ELFReader.h, and it was used only
by ELFReader class. By making the function a member of the class,
we can remove template parameters.
llvm-svn: 234540
|
|
|
|
| |
llvm-svn: 234474
|
|
|
|
|
|
|
|
| |
This required splitting up veneer atoms into pieces,
where every piece is paired with mapping atom of
the corresponding type.
llvm-svn: 234473
|
|
|
|
|
|
| |
Type names should start with an uppercase letter in the LLVM coding style.
llvm-svn: 234452
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
atom_collection is basically a wrapper for std::vector. The class
provides begin and end member functions, so that it "hides" the
other member functions provided by std::vector. However, you can
still directly access _atoms member since the member is not
protected.
We cannot simply make the member private because we need that member
when we are constructing atom vectors.
This patch splits atom_collection into two types: std::vector<Atom *>
and AtomRange. When we are constructing atom vectors, we use the
former class. We return instances of the latter class from File
objects so that callers cannot add or remove atoms from the lists.
std::vector<Atom *> is automatically converted to AtomRange.
llvm-svn: 234450
|
|
|
|
|
|
|
| |
atom_collection_vector is the only derived class of atom_collection.
This patch merges the two.
llvm-svn: 234443
|
|
|
|
| |
llvm-svn: 234435
|
|
|
|
| |
llvm-svn: 234434
|
|
|
|
| |
llvm-svn: 234432
|
|
|
|
| |
llvm-svn: 234431
|
|
|
|
| |
llvm-svn: 234419
|
|
|
|
| |
llvm-svn: 234397
|
|
|
|
|
|
|
|
| |
It's a follow-up to r234347. We do not need to keep a reference to
`GOTFile` instance in a xxxWriter class after ownership is transferred
to the caller of the `createImplicitFiles` method.
llvm-svn: 234396
|
|
|
|
|
|
|
| |
MergeSectionKey is a tiny struct. We don't need a constructor for that.
The good old way to initialize a struct works fine.
llvm-svn: 234371
|
|
|
|
| |
llvm-svn: 234369
|
|
|
|
|
|
|
| |
Archive files don't have any symbols (their members do).
The vectors deleted here were always empty.
llvm-svn: 234368
|
|
|
|
|
|
|
|
| |
SimpleFile defines defined(). undefined(), sharedLibrary() and absolute().
We should use the class instead of deriving from the base class and
re-defining the member functions in ELFFile.
llvm-svn: 234367
|
|
|
|
|
|
|
| |
We do not use values returned by these functions anywhere.
So let's return nothing.
llvm-svn: 234358
|
|
|
|
| |
llvm-svn: 234357
|
|
|
|
| |
llvm-svn: 234356
|
|
|
|
|
|
|
|
| |
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: 234311
|
|
|
|
| |
llvm-svn: 234302
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make PLT entry atoms represent mapping symbols in the Release mode,
while in the Debug mode they are still function-like symbols
with regular names.
It's legal that mapping symbols denote unnamed parts of code,
and PLT entries are not required to have function-like names.
Differential Revision: http://reviews.llvm.org/D8819
llvm-svn: 234301
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 234293
|
|
|
|
|
|
|
|
| |
Maybe we can interpret alignment 0 as "don't care", but for
consistency, it's good to set 1 instead of 0 where we allow
any alignments.
llvm-svn: 234284
|
|
|
|
|
|
| |
Also changed the local variable names to avoid line wrapping.
llvm-svn: 234281
|
|
|
|
| |
llvm-svn: 234279
|
|
|
|
| |
llvm-svn: 234278
|
|
|
|
|
|
| |
So that createAtoms become more readable.
llvm-svn: 234277
|
|
|
|
|
|
|
|
| |
createAtom function did too much in a single for-loop. This patch
splits the for-loop and extract COMDAT handling into a separate
function.
llvm-svn: 234276
|
|
|
|
| |
llvm-svn: 234273
|
|
|
|
|
|
| |
This function never fails.
llvm-svn: 234272
|
|
|
|
|
|
| |
This function is not supposed to return an error value.
llvm-svn: 234271
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
CreateELF was a combination of templates and C preprocessor macros.
This patch removes uses of macros.
http://reviews.llvm.org/D8810
llvm-svn: 234253
|
|
|
|
|
|
|
| |
PR: 23036
Differential Revision: http://reviews.llvm.org/D8836
llvm-svn: 234240
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we put both link-once and group sections into the same map
and seaparated them out when we use them. Apparently we should put them
into seaprate maps in the first place.
This piece of code is added recently, and I still don't understand all
of them. Looks like we need to clean this up even more.
llvm-svn: 234223
|
|
|
|
|
|
|
| |
All instances of the `createImplicitFiles` always return `true` and this
return value is used nowhere.
llvm-svn: 234205
|
|
|
|
| |
llvm-svn: 234203
|
|
|
|
| |
llvm-svn: 234199
|
|
|
|
| |
llvm-svn: 234167
|