summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/Mips
Commit message (Collapse)AuthorAgeFilesLines
...
* [Mips] Handle all grouped relocations in a uniform waySimon Atanasyan2015-06-061-36/+56
| | | | | | No functional changes. llvm-svn: 239221
* [Mips] Fix enumeral vs. non-enumeral warning in ternary. NFCDenis Protivensky2015-06-021-5/+5
| | | | | | That's a weird gcc's complain. llvm-svn: 238812
* [Mips] Add a couple of MipsAbiInfoHandler functions to check linked code typeSimon Atanasyan2015-05-313-17/+34
| | | | | | No functional changes. llvm-svn: 238689
* [Mips] Do not put the .reginfo section into the separate segmentSimon Atanasyan2015-05-315-11/+19
| | | | | | | The .reginfo should not belong to the separate segment if there is a .MIPS.abiflags section. llvm-svn: 238688
* [Mips] Sort segments so PT_MIPS_ABIFLAGS goes right after the PT_INTERPSimon Atanasyan2015-05-312-0/+21
| | | | llvm-svn: 238687
* [Mips] Reading, merging and writing .MIPS.abiflags sectionSimon Atanasyan2015-05-3110-80/+680
| | | | | | http://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking llvm-svn: 238686
* [Mips] Delete MipsReginfo structure. Use the Elf_Mips_RegInfo instead.Simon Atanasyan2015-05-316-89/+30
| | | | llvm-svn: 238685
* [Mips] Collect all ABI related info in the single MipsAbiInfoHandler classSimon Atanasyan2015-05-3112-143/+151
| | | | | | | | New MipsAbiInfoHandler merges and hold both ELF header flags and registries usage masks. In the future commits it will manage some additional information. llvm-svn: 238684
* [Mips] Move member function definitions to cpp filesSimon Atanasyan2015-05-2715-774/+1009
| | | | | | No functional changes. llvm-svn: 238310
* [ELF][Mips] Do not merge ELF flags in the `isCompatible` routineSimon Atanasyan2015-05-275-7/+11
| | | | | | | | We do not need to merge ELF flags from DSO. But `isCompatible` is called for all input files. So this change move ELF flags merging into the MipsELFFile class. llvm-svn: 238304
* [Mips] Factor out look up of Elf_Mips_RegInfo structure into the separate ↵Simon Atanasyan2015-05-271-21/+26
| | | | | | | | function No functional changes. llvm-svn: 238303
* [Mips] Use structures declared in the llvm/Object/ELFTypes.hSimon Atanasyan2015-05-263-53/+13
| | | | | | No functional changes. llvm-svn: 238189
* [Mips] Add Elf_Mips_Options::getRegInfoDesc() function to retrieve an ↵Simon Atanasyan2015-05-262-3/+9
| | | | | | | | ODK_REGINFO descriptor No functional changes. llvm-svn: 238176
* [Mips] Make the code shorter - use LLVM_ELF_IMPORT_TYPES_ELFT macroSimon Atanasyan2015-05-261-2/+1
| | | | | | No functional changes. llvm-svn: 238175
* [ELF] Remove redundant unique_ptr moves found by -Wpessimizing-move.Benjamin Kramer2015-05-222-2/+2
| | | | llvm-svn: 238030
* [ELF] Simplify dynamic table entry creation.Davide Italiano2015-05-211-27/+8
| | | | | | | Differential Revision: http://reviews.llvm.org/D9921 Reviewed by: atanasyan llvm-svn: 237973
* [Mips] Simplify the code a bit using early returnSimon Atanasyan2015-04-241-14/+6
| | | | | | No functional changes. llvm-svn: 235708
* [Mips] Assign .MIPS.options section to the PT_LOAD segmentSimon Atanasyan2015-04-222-2/+7
| | | | llvm-svn: 235488
* [ELF] Allow TargetLayout descendants to control assignment sections to segmentsSimon Atanasyan2015-04-221-0/+5
| | | | | | | | | | | | | | | | The TargetLayout class puts two sections into the same segment if they have equal segment types and the same section flags (SHF_xxx). To be able to merge some sort of sections into the same segment we drop some flags before comparison. For example to merge string sections into Data segment we drop SHF_STRINGS and SHF_MERGE flags. The patch allows TargetLayout descendants to drop some target specific section flags. MIPS target needs that to merge .MIPS.options section which has SHF_MIPS_NOSTRIP flag into the LOAD segment. http://reviews.llvm.org/D9160 llvm-svn: 235487
* [Mips] Write .reginfo section into the separate PT_MIPS_REGINFO segmentSimon Atanasyan2015-04-212-1/+19
| | | | llvm-svn: 235391
* [Mips] Write DT_MIPS_OPTIONS tag to .dynamic sectionSimon Atanasyan2015-04-201-0/+15
| | | | | | | If .MIPS.options section exists the DT_MIPS_OPTIONS tag should hold an address of this section. llvm-svn: 235290
* [Mips] Support R_MICROMIPS_PC18_S3/PC19_S2/PC21_S2/PC26_S2 relocations handlingSimon Atanasyan2015-04-201-4/+16
| | | | llvm-svn: 235289
* [Mips] Support R_MICROMIPS_GOT_DISP / PAGE / OFST relocations handlingSimon Atanasyan2015-04-202-2/+13
| | | | llvm-svn: 235288
* [Mips] clang-format the codeSimon Atanasyan2015-04-151-1/+1
| | | | llvm-svn: 235033
* [Mips] Remove redundant `.got` section lookupSimon Atanasyan2015-04-151-2/+1
| | | | | | No functional changes. llvm-svn: 235032
* [Mips] Create _GLOBAL_OFFSET_TABLE_ only if the .got section existsSimon Atanasyan2015-04-153-2/+17
| | | | llvm-svn: 235031
* [Mips] Check `_gp_disp` symbol using a trivial string comparisonSimon Atanasyan2015-04-152-13/+1
| | | | | | No functional changes. llvm-svn: 235030
* ELF: Remove redundant namespace qualifiers.Rui Ueyama2015-04-143-9/+9
| | | | llvm-svn: 234938
* ELF: Split HeaderChunks.h to HeaderChunks.{h,cpp}.Rui Ueyama2015-04-141-0/+1
| | | | llvm-svn: 234932
* [Mips] Write _DYNAMIC symbol on MIPS targetsSimon Atanasyan2015-04-141-0/+8
| | | | llvm-svn: 234925
* ELF: Inline ELFReader typedefs which are used only once.Rui Ueyama2015-04-141-5/+2
| | | | llvm-svn: 234862
* ELF: Remove ELFT and LinkingContext template parameters from ELFReader.Rui Ueyama2015-04-144-9/+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
* Define make_dynamic_error_code(const char *).Rui Ueyama2015-04-142-9/+7
| | | | | | | | | | | | The function took either StringRef or Twine. Since string literals are ambiguous when resolving the overloading, many code calls used this function with explicit type conversion. That led awkward code like make_dynamic_error_code(Twine("Error occurred")). This patch adds a function definition for string literals, so that you can directly call the function with literals. llvm-svn: 234841
* ELF: Define ELF{32,64}{LE,BE} types and use them everywhere.Rui Ueyama2015-04-145-21/+16
| | | | llvm-svn: 234823
* [Mips] Rollback explicit instantiation of MipsELFFile template classSimon Atanasyan2015-04-133-37/+0
| | | | | | | This is a follow-up to r234728 and r234729. It looks like explicit instantiation of `MipsELFFile` is redundant and triggers Visual C++ warning. llvm-svn: 234756
* Speculative build fix for lld on WindowsHans Wennborg2015-04-132-3/+2
| | | | | | | | | | | | | | | | I can't access my Windows machine at the moment, but the build was breaking with: c:\b\build\slave\crwinclanglld\build\src\third_party\llvm\tools\lld\lib\readerwriter\elf\mips\MipsTargetLayout.h(38) : error C2440: 'return' : cannot convert from 'lld::elf::MipsGOTSection<ELFT> *' to 'lld::elf::AtomSection<ELFT> *' with [ ELFT=lld::elf::Mips32ELType ] Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast I think this regressed caused in 234727: that the forward-declarations of MipsGOTSection<> is not enough. llvm-svn: 234736
* [Mips] Explicitly instantiate MipsELFFile template classSimon Atanasyan2015-04-133-0/+37
| | | | | | Use explicit instantiation to reduce object files size. llvm-svn: 234729
* [Mips] Create MipsTargetHandler class object using factory functionsSimon Atanasyan2015-04-135-6/+47
| | | | | | | | | | | | | Right now MIPS instantiates MipsTargetHandler using Mips32ELType and Mips64ELType. And in the future we can add a couple more types. That leads to the large object file size because compiler has to create copies of MipsTargetHandler and all realted classes for each types used for instantiation. The patch introduces two factory functions and puts each of them into the separate cpp file. That allows to reduce size of single object file. llvm-svn: 234728
* [Mips] Move `MipsTargetLayout` class to the separate headerSimon Atanasyan2015-04-134-75/+97
| | | | llvm-svn: 234727
* [Mips] Support R_MICROMIPS_GOT_HI/LO16 and R_MICROMIPS_CALL_HI/LO16 relocationsSimon Atanasyan2015-04-132-3/+26
| | | | llvm-svn: 234726
* [Mips] Support R_MIPS_CALL_HI16 / R_MIPS_CALL_LO16 relocations handlingSimon Atanasyan2015-04-132-4/+14
| | | | llvm-svn: 234725
* [Mips] Support R_MIPS_GOT_HI16 / R_MIPS_GOT_LO16 relocations handlingSimon Atanasyan2015-04-132-2/+26
| | | | llvm-svn: 234724
* [Mips] Add -pcrel-eh-reloc command line optionSimon Atanasyan2015-04-101-0/+3
| | | | | | | | This MIPS specific option controls R_MIPS_EH relocation handling. If -pcrel-eh-reloc is specified R_MIPS_EH relocation should be handled like R_MIPS_PC32 relocation. llvm-svn: 234635
* [Mips] Support R_MIPS_EH relocation handlingSimon Atanasyan2015-04-102-2/+6
| | | | | | | The patch supports just the R_MIPS_EH relocation handling and does not implement full specification of compact exception tables for MIPS ABIs. llvm-svn: 234634
* [Mips] Replace MipsTargetHandler member function getGP() by getGPAddr()Simon Atanasyan2015-04-103-12/+11
| | | | | | | When we call getGP() we need in fact _gp symbol address. Let's cache its value and return it directly from the new getGPAddr() function. llvm-svn: 234632
* [Mips] Use std::call_once for thread safe initializationSimon Atanasyan2015-04-101-7/+10
| | | | | | The commit is inspired by r234628. Thanks Rui for the idea. llvm-svn: 234631
* [Mips] Fix typo in the commentSimon Atanasyan2015-04-101-1/+1
| | | | llvm-svn: 234630
* Merge MutableFile with SimpleFile.Rui Ueyama2015-04-073-4/+5
| | | | | | | | SimpleFile is the only derived class of MutableFile. This patch reduces the height of class hierarchy by removing MutableFile class. llvm-svn: 234354
* ELF: Do not return error from handleDefinedSymbol.Rui Ueyama2015-04-071-5/+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
OpenPOWER on IntegriCloud