summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/Mips
Commit message (Collapse)AuthorAgeFilesLines
...
* [Mips] Use allocator from the base classSimon Atanasyan2015-03-221-3/+2
| | | | | | No functional changes. llvm-svn: 232914
* [Mips] Create special PLT entry in case of MIPS R6 ABISimon Atanasyan2015-03-201-1/+32
| | | | llvm-svn: 232806
* [Mips] Add comments to the relocation calculation functionsSimon Atanasyan2015-03-191-1/+6
| | | | | | No functional changes. llvm-svn: 232761
* [Mips] Implement R_MIPS_PCHI16 / R_MIPS_PCLO16 relocations handlingSimon Atanasyan2015-03-193-0/+24
| | | | llvm-svn: 232757
* [Mips] Implement R_MIPS_PC18_S3 relocation handlingSimon Atanasyan2015-03-191-0/+12
| | | | llvm-svn: 232756
* [Mips] Implement R_MIPS_PC19_S2 / R_MIPS_PC26_S2 relocations handlingSimon Atanasyan2015-03-191-0/+24
| | | | llvm-svn: 232755
* [Mips] Implement R_MIPS_PC21_S2 relocation handlingSimon Atanasyan2015-03-191-0/+12
| | | | llvm-svn: 232707
* [Mips] Recognize and check compatibility MIPS32R6 / MIPS64R6 ISA'sSimon Atanasyan2015-03-191-0/+4
| | | | llvm-svn: 232706
* [Mips] Replace "hand-made" function by the `llvm::SignExtend32()` routineSimon Atanasyan2015-03-191-12/+7
| | | | | | No functional changes. llvm-svn: 232705
* [LinkerScript] Handle symbols defined in linker scriptsRafael Auler2015-03-161-2/+2
| | | | | | | | | | Puts symbols defined in linker script expressions in a runtime file that is added as input to the resolver, making the input object files see symbols defined in linker scripts. http://reviews.llvm.org/D8263 llvm-svn: 232409
* [LinkerScript] Implement semantics for simple sections mappingsRafael Auler2015-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements the behaviour of the SECTIONS linker script directive, used to not only define a custom mapping between input and output sections, but also order input sections in the output file. To do this, we modify DefaultLayout with hooks at important places that allow us to re-order input sections according to a custom order. We also add a hook in SegmentChunk to allow us to calculate linker script expressions while assigning virtual addresses to the input sections that live in a segment. Not all SECTIONS constructs are currently supported, but only the ones that do not use special sort orders. It adds two LIT test as practical examples of which sections directives are currently supported. In terms of high-level changes, it creates a new class "script::Sema" that owns all linker script ASTs and the logic for linker script semantics as well. ELFLinkingContext owns a single copy of Sema, which will be used throughout the object file writing process (to layout sections as proposed by the linker script). Other high-level change is that the writer no longer uses a "const" copy of the linking context. This happens because linker script expressions must be calculated *while* calculating final virtual addresses, which is a very late step in object file writing. While calculating these expressions, we need to update the linker script symbol table (inside the semantics object), and, thus, we are "modifying our context" as we prepare to write the file. http://reviews.llvm.org/D8157 llvm-svn: 232402
* [Mips] clang-format the codeSimon Atanasyan2015-03-161-3/+2
| | | | | | No functional changes. llvm-svn: 232364
* [Mips] Do not check the relocation type twiceSimon Atanasyan2015-03-161-10/+6
| | | | | | No functional changes. llvm-svn: 232363
* [Mips] Add `const` qualifier to some member functionsSimon Atanasyan2015-03-161-23/+23
| | | | | | No functional changes. llvm-svn: 232362
* [Mips] Implement R_MIPS_TLS_xxx relocation handling in case of N64 ABISimon Atanasyan2015-03-164-11/+42
| | | | llvm-svn: 232361
* [Mips] Implement R_MIPS_GOT_DISP/PAGE/OFST relocations handlingSimon Atanasyan2015-03-164-27/+99
| | | | llvm-svn: 232360
* [Mips] Group some cases in the switch statementSimon Atanasyan2015-03-161-9/+6
| | | | | | No functional changes. llvm-svn: 232359
* [ELF] Remove ambiguityShankar Easwaran2015-03-141-1/+1
| | | | | | Fix ambiguous finalize function. llvm-svn: 232250
* [Mips] Make `readAddend` a virtual member function to escape explicitSimon Atanasyan2015-03-123-28/+27
| | | | | | | | template class instantiation No functional changes. llvm-svn: 232081
* Use template aliases.Rui Ueyama2015-03-102-22/+22
| | | | | | We dropped Visual Studio 2012 support, so we can use template aliases. llvm-svn: 231756
* [Mips] Remove unused includeSimon Atanasyan2015-03-091-1/+0
| | | | | | No functional changes. llvm-svn: 231646
* [Mips] Remove redundant namespace qualifiersSimon Atanasyan2015-03-092-41/+41
| | | | | | No functional changes. llvm-svn: 231645
* [Mips] Rename local variablesSimon Atanasyan2015-03-091-6/+5
| | | | | | No functional changes. llvm-svn: 231644
* [Mips] Implement R_MIPS_SUB relocation handlingSimon Atanasyan2015-03-091-0/+7
| | | | llvm-svn: 231643
* [Mips] Implement R_MIPS_64 relocation handlingSimon Atanasyan2015-03-092-32/+68
| | | | llvm-svn: 231642
* [Mips] Refactoring of relocation handling functionsSimon Atanasyan2015-03-094-239/+232
| | | | | | | | | | | 1. Move relocation addendum reading code to the MipsRelocationHandler class to reduce code duplication. 2. Factor out the relocations calculation code into the separate function to be ready to handle MIPS N64 ABI relocation chains. No functional changes. llvm-svn: 231641
* [Mips] Show error message and stop linking in case of cross mode jump errorsSimon Atanasyan2015-03-091-12/+16
| | | | llvm-svn: 231640
* [Mips] Fix incorrect handling of cross mode jumpsSimon Atanasyan2015-03-091-24/+38
| | | | | | | | We should not take in account a type of "source" symbol. Cross mode jump adjustment is requred when target symbol and relocation belong to different (regular/microMIPS) instruction sets. llvm-svn: 231639
* Remove unused #includes.Rui Ueyama2015-02-271-1/+0
| | | | llvm-svn: 230726
* [Mips] Mark some MipsELFFile member functions as constantSimon Atanasyan2015-02-261-3/+3
| | | | | | No functional changes. llvm-svn: 230677
* [ELF] Create a map from Reference to Symbol.Shankar Easwaran2015-02-231-3/+5
| | | | | | | | | | | In LLD's model, symbol is a property of the node (atom) and not a property of edge (reference). Prior to this patch, we stored the symbol in the reference. From post-commit comments, it seemed better to create a map from the reference to the symbol instead and use this mapping wherever desired. Address comments from Ruiu/Simon Atanasyan. llvm-svn: 230273
* [ELF] Add section group/COMDAT support.Shankar Easwaran2015-02-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | SHF_GROUP: Group Member Sections ---------------------------------- A section which is part of a group, and is to be retained or discarded with the group as a whole, is identified by a new section header attribute: SHF_GROUP This section is a member (perhaps the only one) of a group of sections, and the linker should retain or discard all or none of the members. This section must be referenced in a SHT_GROUP section. This attribute flag may be set in any section header, and no other modification or indication is made in the grouped sections. All additional information is contained in the associated SHT_GROUP section. SHT_GROUP: Section Group Definition ------------------------------------- Represents a group section. The section group's sh_link field identifies a symbol table section, and its sh_info field the index of a symbol in that section. The name of that symbol is treated as the identifier of the section group. More information: https://mentorembedded.github.io/cxx-abi/abi/prop-72-comdat.html Added a lot of extensive tests, that tests functionality. llvm-svn: 230195
* [ELF] Add symbol to ELFReference.Shankar Easwaran2015-02-221-4/+4
| | | | | | | | | Relocation handling need more information about the Symbol that we are creating references for. No change in functionality. llvm-svn: 230191
* Switch to use override, fixes -Winconsistent-missing-override on LLD.Chandler Carruth2015-02-221-3/+2
| | | | llvm-svn: 230166
* [ELF][Writer] Use Path to create AtomSection.Shankar Easwaran2015-02-211-0/+11
| | | | | | | | | Now since the correct file path for atoms is available and not clobbered, commit r222309 which was reverted previously can be added back. No change in functionality. llvm-svn: 230138
* [Mips] Replace a magic number by enumerationSimon Atanasyan2015-02-161-1/+1
| | | | | | No functional changes. llvm-svn: 229453
* [Mips] Read GP0 value from .MIPS.options sectionSimon Atanasyan2015-02-161-5/+37
| | | | llvm-svn: 229442
* [Mips] Show error if MIPS_REGINFO section has invalid sizeSimon Atanasyan2015-02-161-3/+3
| | | | llvm-svn: 229441
* [Mips] Factor out the code to search section by type and flags into theSimon Atanasyan2015-02-161-18/+31
| | | | | | | | separate functions No functional changes. llvm-svn: 229440
* Remove unused parameters.Rui Ueyama2015-02-132-7/+4
| | | | llvm-svn: 229055
* [ELF] Add LinkingContext to the ELFReader.Shankar Easwaran2015-02-123-23/+25
| | | | | | | | | | | | | | | This adds the LinkingContext parameter to the ELFReader. Previously the flags in that were needed in the Context was passed to the ELFReader, this made it very hard to access data structures in the LinkingContext when reading an ELF file. This change makes the ELFReader more flexible so that required parameters can be grabbed directly from the LinkingContext. Future patches make use of the changes. There is no change in functionality though. llvm-svn: 228905
* Remove unused parameter.Rui Ueyama2015-02-071-1/+1
| | | | llvm-svn: 228476
* Use make_unique.Rui Ueyama2015-02-062-4/+4
| | | | llvm-svn: 228453
* Remove PPC ELF targetGreg Fitzgerald2015-01-281-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D7225 llvm-svn: 227320
* [Mips] Fix enumeral and non-enumeral type in conditional expression warningSimon Atanasyan2015-01-281-1/+1
| | | | | | No functional changes. llvm-svn: 227297
* [Mips] Remove unused function argumentSimon Atanasyan2015-01-271-4/+4
| | | | | | No functional changes. llvm-svn: 227245
* [Mips] Support R_MIPS_GPREL16 relocationSimon Atanasyan2015-01-273-10/+20
| | | | llvm-svn: 227244
* [Mips] Fix createMipsRelocationHandler specialization (take 2)Denis Protivensky2015-01-271-2/+8
| | | | | | | | | | | Misread buildbot's log. Both gcc and clang compile this fine. Original fix reason: gcc allows template specializations only in the same namespace where template has been declared. llvm-svn: 227183
* Revert "[Mips] Fix createMipsRelocationHandler specialization"Denis Protivensky2015-01-271-8/+2
| | | | | | The buildbot reported build failures for clang. llvm-svn: 227179
* [Mips] Fix createMipsRelocationHandler specializationDenis Protivensky2015-01-271-2/+8
| | | | | | | gcc allows template specializations only in the same namespace where template has been declared. llvm-svn: 227177
OpenPOWER on IntegriCloud