summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/Hexagon
Commit message (Collapse)AuthorAgeFilesLines
* Remove the old ELF linker.Rafael Espindola2016-02-2811-1926/+0
| | | | | | I think it is clear by now that the new linker is viable. llvm-svn: 262158
* Add File::kind's for all subclasses of File.Pete Cooper2016-01-141-1/+2
| | | | | | | | | | | | 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
* Set the folder for libraries to 'lld libraries'. NFC.Pete Cooper2016-01-071-1/+1
| | | | | | | | | | | | 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
* [ELF] Apply segments from linker scriptsDenis Protivensky2015-07-231-1/+1
| | | | | | | | | | | | | | 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
* Simplify Pass::perform to take a SimpleFile& instead of unique_ptr<SimpleFile>&David Blaikie2015-06-191-7/+7
| | | | | | | | 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
* [lld] Allow LLD passes to return error codes.Lang Hames2015-06-191-1/+3
| | | | llvm-svn: 240147
* ELF: Move Instrcution definition to HexagonEncoding.h.Rui Ueyama2015-04-142-28/+37
| | | | | | | | | | 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
* ELF: Remove redundant namespace qualifiers.Rui Ueyama2015-04-145-7/+7
| | | | llvm-svn: 234938
* ELF: Remove ELFT template argument when referring the base class.Rui Ueyama2015-04-145-32/+29
| | | | | | | | 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
* Simplify short switch-cases.Rui Ueyama2015-04-141-12/+2
| | | | llvm-svn: 234869
* Remove excessive parentheses.Rui Ueyama2015-04-141-3/+3
| | | | llvm-svn: 234868
* ELF: Remove a header which is used only by one .cpp file.Rui Ueyama2015-04-142-50/+28
| | | | | | | The data and the inline function defined in the header is used only by HexagonRelocationHandler.cpp. llvm-svn: 234867
* Fix indentation.Rui Ueyama2015-04-141-6/+4
| | | | llvm-svn: 234866
* ELF: Fix odd initialization code.Rui Ueyama2015-04-141-6/+4
| | | | llvm-svn: 234865
* temporaryRui Ueyama2015-04-141-4/+3
| | | | llvm-svn: 234864
* ELF: Move function definitions from .h to .cpp.Rui Ueyama2015-04-144-76/+87
| | | | llvm-svn: 234863
* ELF: Inline ELFReader typedefs which are used only once.Rui Ueyama2015-04-141-5/+2
| | | | llvm-svn: 234862
* ELF: Remove this-> as much as we can.Rui Ueyama2015-04-144-30/+29
| | | | | | | These this-> are there because their classes were templated. They are no longer templated. llvm-svn: 234859
* ELF: Make HexagonFile a non-template class.Rui Ueyama2015-04-143-37/+34
| | | | llvm-svn: 234857
* ELF: Remove ELFT and LinkingContext template parameters from ELFReader.Rui Ueyama2015-04-143-4/+4
| | | | | | | | | | | | | | | | | | | 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
* ELF: Remove almost empty class.Rui Ueyama2015-04-144-32/+4
| | | | llvm-svn: 234834
* Remove unused variable.Rui Ueyama2015-04-142-3/+1
| | | | llvm-svn: 234831
* ELF: Use less templates for ELF types.Rui Ueyama2015-04-141-10/+8
| | | | | | | These classes are templated but actually instantiated for only one ELF type. llvm-svn: 234830
* ELF: Define ELF{32,64}{LE,BE} types and use them everywhere.Rui Ueyama2015-04-146-41/+33
| | | | llvm-svn: 234823
* ELF: Remove useless templates that takes always the same ELF type.Rui Ueyama2015-04-146-48/+39
| | | | llvm-svn: 234820
* ELF: Fix headers including each other.Rui Ueyama2015-04-132-84/+68
| | | | | | | HexagonSectionChunks.h and HexagonTargetHandler.h include each other. This patch removes the former and merge it with the latter. llvm-svn: 234817
* ELF: s/ELFTy/ELFT/ for consistency.Rui Ueyama2015-04-131-5/+5
| | | | llvm-svn: 234790
* Remove else after return.Rui Ueyama2015-04-131-3/+2
| | | | llvm-svn: 234784
* ELF: Simplify assignments to "result"Rui Ueyama2015-04-101-22/+22
| | | | | | | 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
* Fix minor threading issue.Rui Ueyama2015-04-101-6/+7
| | | | | | | | 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
* Remove redundant parentheses.Rui Ueyama2015-04-101-1/+1
| | | | llvm-svn: 234558
* Do not use default arguments for trivial functions.Rui Ueyama2015-04-101-6/+5
| | | | llvm-svn: 234557
* Remove unused return values.Rui Ueyama2015-04-101-55/+30
| | | | llvm-svn: 234556
* ELF: Don't use APPLY_RELOC macro.Rui Ueyama2015-04-101-61/+56
| | | | | | | In other ELF ports, we don't use the macro. This patch removes the macro for consistency and readability. llvm-svn: 234552
* ELF: Move Hexagon linker helper function to Hexagon directory.Rui Ueyama2015-04-101-19/+36
| | | | | | | | 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
* Merge MutableFile with SimpleFile.Rui Ueyama2015-04-071-1/+1
| | | | | | | | SimpleFile is the only derived class of MutableFile. This patch reduces the height of class hierarchy by removing MutableFile class. llvm-svn: 234354
* [ELF] Simplify adding default atomsSimon Atanasyan2015-04-072-23/+14
| | | | | | | | | | | | | | | | | | | | | 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
* ELF: Do not return error from handle{CommonSymbol,MergeString}.Rui Ueyama2015-04-071-2/+2
| | | | llvm-svn: 234273
* ELF: Do not return error from handleDefinedSymbol.Rui Ueyama2015-04-071-6/+6
| | | | | | | | | | | 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
* Replace the `createImplicitFiles` method return type with `void`Simon Atanasyan2015-04-062-6/+4
| | | | | | | All instances of the `createImplicitFiles` always return `true` and this return value is used nowhere. llvm-svn: 234205
* [Hexagon] Remove duplicated typedefSimon Atanasyan2015-04-041-1/+0
| | | | | | The `HexagonELFType` is declared in the HexagonLinkingContext.h. llvm-svn: 234089
* [Hexagon][Mips] Rename template arguments <arch>ELFType to ELFTSimon Atanasyan2015-04-043-32/+25
| | | | | | In all other ELF related classes we use `ELFT` abbreviation. llvm-svn: 234088
* ELF: Use short variable names in <Arch>RelocationHandlers.cpp.Rui Ueyama2015-04-041-35/+35
| | | | | | | | 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
* ELF: Merge ELFTargets.h with ELFLinkingContext.h.Rui Ueyama2015-04-041-1/+0
| | | | | | | | 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
* ELF: Return TargetRelocationHandler instead of <ArcH>TargetRelocationHandler.Rui Ueyama2015-04-041-1/+1
| | | | | | | | | | 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
* ELF: Remove ELF{Object,DSO}Reader alias templates.Rui Ueyama2015-04-041-3/+2
| | | | | | | | | | 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
* Remove unused member function declarations.Rui Ueyama2015-04-041-1/+0
| | | | llvm-svn: 234072
* Remove unused functions.Rui Ueyama2015-04-041-6/+0
| | | | llvm-svn: 234069
* [ELF] Merge Layout and TargetLayout classSimon Atanasyan2015-04-031-4/+6
| | | | | | It is enough to have single TargetLayout class. llvm-svn: 234065
* ELF: Remove <Arch>ELFReader.h. NFC.Rui Ueyama2015-04-032-33/+11
| | | | | | | | | | | <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
OpenPOWER on IntegriCloud