summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Mips.cpp
Commit message (Collapse)AuthorAgeFilesLines
* LLD: Move ELF/Mips.cpp to ELF/Arch/MipsArchTree.cppKonstantin Zhuravlyov2017-06-191-369/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D34358 llvm-svn: 305742
* Move Object format code to lib/BinaryFormat.Zachary Turner2017-06-071-1/+1
| | | | | | | | | | | | This creates a new library called BinaryFormat that has all of the headers from llvm/Support containing structure and layout definitions for various types of binary formats like dwarf, coff, elf, etc as well as the code for identifying a file from its magic. Differential Revision: https://reviews.llvm.org/D33843 llvm-svn: 304864
* [ELF][MIPS] N32 ABI supportSimon Atanasyan2016-11-051-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | In short the patch introduces support for linking object file conform MIPS N32 ABI [1]. This ABI is similar to N64 ABI but uses 32-bit pointer size. The most non-trivial requirement of this ABI is one more relocation packing format. N64 ABI puts multiple relocation type into the single relocation record. The N32 ABI uses series of successive relocations with the same offset for this purpose. In this patch, new function `mergeMipsN32RelTypes` handle this case and "convert" N32 relocation to the N64 relocation so the rest of the code keep unchanged. For now, linker does not support series of relocations applied to sections without SHF_ALLOC bit. Probably later I will add the support or insert some sort of assert into the `relocateNonAlloc` routine to catch this case. [1] ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf Differential revision: https://reviews.llvm.org/D26298 llvm-svn: 286052
* [ELF] - Do not crash on MIPS if there is no object files in input.George Rimar2016-10-041-0/+2
| | | | | | | | | | | If we have input without object files, for example if we have only .so code crashes in checkFlags(), getPicFlags(), getArchFlags() functions. Patch fixes the issue. Differential revision: https://reviews.llvm.org/D25237 llvm-svn: 283226
* Rename warning -> warn.Rui Ueyama2016-09-291-2/+2
| | | | | | It's better because it's a verb. llvm-svn: 282763
* Simplify InputFile ownership management.Rui Ueyama2016-09-141-3/+1
| | | | | | | | | | | | | | | | | | | | Previously, all input files were owned by the symbol table. Files were created at various places, such as the Driver, the lazy symbols, or the bitcode compiler, and the ownership of new files was transferred to the symbol table using std::unique_ptr. All input files were then free'd when the symbol table is freed which is on program exit. I think we don't have to transfer ownership just to free all instance at once on exit. In this patch, all instances are automatically collected to a vector and freed on exit. In this way, we no longer have to use std::unique_ptr. Differential Revision: https://reviews.llvm.org/D24493 llvm-svn: 281425
* [ELF][MIPS] Support .MIPS.abiflags sectionSimon Atanasyan2016-08-121-0/+52
| | | | | | | This section supersedes .reginfo and .MIPS.options sections. But for now we have to support all three sections for ABI transition period. llvm-svn: 278482
* [ELF][MIPS] Fix the commentSimon Atanasyan2016-08-121-6/+9
| | | | llvm-svn: 278480
* Add comments.Rui Ueyama2016-08-121-0/+6
| | | | llvm-svn: 278473
* Split getArchName. NFC.Rui Ueyama2016-08-111-2/+9
| | | | llvm-svn: 278392
* [ELF][MIPS] Recognize and print machine name in case of input incompatibilitySimon Atanasyan2016-08-111-2/+44
| | | | llvm-svn: 278352
* [ELF][MIPS] Take into account combination of EF_MIPS_ARCH and EF_MIPS_MACH ↵Simon Atanasyan2016-08-101-2/+23
| | | | | | | | | | | | flags while checking ISA compatibility MIPS ISA encoded using two ELF flags: general architecture flag like EF_MIPS_ARCH_32, EF_MIPS_ARCH_64R6 etc and optional machine variant flag like EF_MIPS_MACH_4111, EF_MIPS_MACH_OCTEON3 etc. When we check compatibility between two input files and deduce ELF flags for generated output we need to take into account both of these flags. llvm-svn: 278230
* Refactor getMipsEFlags.Rui Ueyama2016-08-081-0/+217
Previously, we incrementally updated the reuslting flag as we check file flags, so it was not very clear who is updating what flags. This patch makes them pure functions -- that has no side effect and don't update arguments to improve readability. Now each function construct a patial result, and all resutls are then bitwise-OR'ed to construct the final result. This patch also creates a new file, Mips.cpp, to move all these MIPS functions to a separate file. Differential Revision: https://reviews.llvm.org/D23249 llvm-svn: 278042
OpenPOWER on IntegriCloud