summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter
Commit message (Collapse)AuthorAgeFilesLines
...
* ELF: Move x86-64-only function from DefaultLayout to X86_64TargetLayout.Rui Ueyama2015-04-022-48/+31
| | | | | | | | 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
* ELF: Remove empty classes.Rui Ueyama2015-04-028-27/+16
| | | | llvm-svn: 233880
* ELF: Make createWriterELF's type consistent with other functions.Rui Ueyama2015-04-022-3/+3
| | | | | | | | Other createWriter<Arch> functions take <Arch>LinkingContext as arguments. Only createWriterELF was an exception. This patch makes it consistent with others. llvm-svn: 233878
* ELF: x86, x86-64, ARM, AArch64: Remove architecture name prefixes from class ↵Rui Ueyama2015-04-0217-53/+46
| | | | | | members. llvm-svn: 233873
* Remove unused varaible.Rui Ueyama2015-04-021-2/+0
| | | | llvm-svn: 233872
* ELF: Remove <Arch>TargetHandler::kindString.Rui Ueyama2015-04-0112-53/+36
| | | | | | | | | | | | | <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
* Remove unused variable.Rui Ueyama2015-04-011-1/+0
| | | | llvm-svn: 233864
* Use llvm::make_unique.Rui Ueyama2015-04-018-23/+14
| | | | llvm-svn: 233863
* Use C++ non-static member initialization.Rui Ueyama2015-04-016-34/+24
| | | | llvm-svn: 233859
* [Mips] Remove 'mips' prefix from class member fields namesSimon Atanasyan2015-04-013-13/+13
| | | | | | No functional changes. llvm-svn: 233812
* [ARM] Set specific flags in ELF headerDenis Protivensky2015-04-011-0/+5
| | | | llvm-svn: 233799
* [ARM] Enhance checks for entry pointDenis Protivensky2015-04-011-4/+14
| | | | llvm-svn: 233798
* [ELF][Hexagon] Add comments related to hexagon relocations.Shankar Easwaran2015-04-012-6/+10
| | | | | | No functional changes. llvm-svn: 233783
* ELF: Remove TargetHandlerBase by merging it with TargetHandler.Rui Ueyama2015-04-0121-59/+33
| | | | | | | | | | | | | | | | | | | 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
* ELF: Remove dead class that does nothing in class hierarchy.Rui Ueyama2015-03-318-53/+7
| | | | | | | | | | | | | | 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
* ELF: Make findAbsoluteAtom return AtomLayout* instead of an iterator.Rui Ueyama2015-03-3110-63/+55
| | | | | | | | | | | 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
* ELF: Fix dereferencing end() iterator.Rui Ueyama2015-03-311-11/+8
| | | | | | | findAbsoluteAtom() returns absoluteAtom().end() if no atom is found. Dereferencing end() value results an undefined behavior. llvm-svn: 233765
* ELF: Remove TargetHandler::getTargetLayout.Rui Ueyama2015-03-319-37/+15
| | | | | | | 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
* Remove "_hexagon" prefix from some member variables.Rui Ueyama2015-03-316-58/+47
| | | | | | | At least in Mips we don't have a prefix for member variables. Repeating the architecture is verbose. llvm-svn: 233746
* Replace *(uniqueptr.get()) with *uniqueptr.Rui Ueyama2015-03-314-8/+8
| | | | | | | Apparently they are copy-pastes. They need to be merged, or otherwise they will diverge needlessly as I did in r233723... llvm-svn: 233741
* Use C++ non-static member initialization.Rui Ueyama2015-03-311-5/+4
| | | | llvm-svn: 233739
* Rename _AArch64TargetLayout.Rui Ueyama2015-03-314-12/+12
| | | | | | | This change should have been done in r233737, but I made a mistake to not include into that. llvm-svn: 233738
* Rename identifiers starting with an underscore and a uppercase letter.Rui Ueyama2015-03-313-37/+37
| | | | | | | Identifiers starting with _[A-Z] is reserved for the language. User programs shouldn't use such identifiers. llvm-svn: 233737
* Remove virtual and add override.Rui Ueyama2015-03-314-22/+22
| | | | llvm-svn: 233735
* [Mips] Use llvm::make_uniqueSimon Atanasyan2015-03-313-7/+5
| | | | | | No functional changes. llvm-svn: 233727
* If x is a unique_ptr, *x.get() is equivalent to *x.Rui Ueyama2015-03-312-3/+3
| | | | llvm-svn: 233723
* Use llvm::make_unique.Rui Ueyama2015-03-311-2/+2
| | | | llvm-svn: 233721
* ELF: Replace a macro with an inlined function.Rui Ueyama2015-03-312-25/+22
| | | | | | | 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
* ELF: Do not use multiple inheritance.Rui Ueyama2015-03-315-74/+36
| | | | | | | | 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
* Use DEBUG_TYPE and DEBUG instead of DEBUG_WITH_TYPE.Rui Ueyama2015-03-312-246/+215
| | | | llvm-svn: 233710
* [Mips] Remove redundant #includeSimon Atanasyan2015-03-311-2/+0
| | | | | | No functional changes. llvm-svn: 233692
* [Mips] Move the `Elf_RegInfo` structure declaration to the separate fileSimon Atanasyan2015-03-302-36/+51
| | | | | | No functional changes. llvm-svn: 233618
* [ELF] Change type of `OutputSection::setType()` argument to int64_tSimon Atanasyan2015-03-301-1/+1
| | | | | | | | Type of `OutputSection::_type` field is int64_t. This change makes the field's and the argument's types consistent and allows to assign full range of values to the `OutputSection::_type` field. llvm-svn: 233617
* [Mips] clang-format the codeSimon Atanasyan2015-03-302-6/+2
| | | | | | No functional changes. llvm-svn: 233616
* [ELF] Use override keyword instead of virtualSimon Atanasyan2015-03-301-6/+6
| | | | | | No functional changes. llvm-svn: 233550
* [Mips] Do not use llvm::Optional for GP0 value and TLS section addressSimon Atanasyan2015-03-301-6/+6
| | | | | | | | | Use of llvm::Optional is redundant here. Initializing by default value 0 is enough. No functional changes. llvm-svn: 233549
* [Mips] Rename class method merge => mergeHeaderFlagsSimon Atanasyan2015-03-303-4/+5
| | | | | | No functional changes. llvm-svn: 233548
* [Mips] Fix writing R_MIPS_REL32 relocation addendumSimon Atanasyan2015-03-303-0/+23
| | | | | | | | | If input relocation records have RELA format while output dynamic relocations have REL format the only way to transfer a dynamic relocation addendum is to save it into the location modified by the dynamic relocation. llvm-svn: 233532
* ELF: Use C++11 non-member initialization.Rui Ueyama2015-03-282-56/+43
| | | | | | | | Setting _alignment member varaible to 0 look suspicious since the minimum alignment value is 1. I'm not going to change that number in this patch, though. llvm-svn: 233472
* ELF: Add a comment about the sysroot path.Rui Ueyama2015-03-281-3/+5
| | | | llvm-svn: 233461
* ELF: Do less if HAVE_CXXABI_H is not defined.Rui Ueyama2015-03-281-9/+9
| | | | | | | | | | | If HAVE_CXXABI_H is not defined, this function is the identity function. Because HAVE_CXXABI_H did not protect the entire function, it did extra stuffs before returning the argument. The new code calls fewer functions. This should help developers understand this piece of code. llvm-svn: 233460
* ELF: make code concise using "using".Rui Ueyama2015-03-281-8/+12
| | | | llvm-svn: 233458
* Use cast instead of dyn_cast in combination with llvm_unreachable.Rui Ueyama2015-03-281-8/+7
| | | | llvm-svn: 233456
* Use lambda for std::find_if.Rui Ueyama2015-03-281-15/+8
| | | | llvm-svn: 233454
* Remove else after return.Rui Ueyama2015-03-271-4/+3
| | | | llvm-svn: 233453
* Use lambda instead of defining a class with operator().Rui Ueyama2015-03-271-9/+3
| | | | llvm-svn: 233452
* ELF: make scopes of error code varaibles narrower.Rui Ueyama2015-03-271-11/+5
| | | | llvm-svn: 233450
* ELF: Simplify SymbolFile.Rui Ueyama2015-03-271-12/+2
| | | | llvm-svn: 233449
* ELF: Use C++11 non-member initialization.Rui Ueyama2015-03-271-12/+0
| | | | llvm-svn: 233434
* Use override keyword instead of virtual.Rui Ueyama2015-03-272-4/+4
| | | | llvm-svn: 233424
OpenPOWER on IntegriCloud