summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Arch/MipsArchTree.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [ELF] Wrap things in `namespace lld { namespace elf {`, NFCFangrui Song2019-10-071-12/+14
| | | | | | | | | | | This makes it clear `ELF/**/*.cpp` files define things in the `lld::elf` namespace and simplifies `elf::foo` to `foo`. Reviewed By: atanasyan, grimar, ruiu Differential Revision: https://reviews.llvm.org/D68323 llvm-svn: 373885
* [LLD][ELF][MIPS] - Inline the short helper function. NFC.George Rimar2019-09-241-10/+8
| | | | | | It was requested in a post-commit comment for r372570. llvm-svn: 372747
* [LLD][ELF] - Simplify getFlagsFromEmulation(). NFCI.George Rimar2019-09-231-12/+2
| | | | | | A straightforward simplification. llvm-svn: 372570
* [mips] Deduce MIPS specific ELF header flags from `emulation`Simon Atanasyan2019-09-221-1/+19
| | | | | | | | | In case of linking binary blobs which do not have any ELF headers, we can deduce MIPS ABI ELF header flags from an `emulation` option. Patch by Kyle Evans. llvm-svn: 372513
* [ELF] Rename odd variable names "New" after r365730. NFCFangrui Song2019-08-131-10/+10
| | | | | | | | | | New -> newSym or newFlags Reviewed By: atanasyan Differential Revision: https://reviews.llvm.org/D66127 llvm-svn: 368651
* [Coding style change] Rename variables so that they start with a lowercase ↵Rui Ueyama2019-07-101-116/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | letter This patch is mechanically generated by clang-llvm-rename tool that I wrote using Clang Refactoring Engine just for creating this patch. You can see the source code of the tool at https://reviews.llvm.org/D64123. There's no manual post-processing; you can generate the same patch by re-running the tool against lld's code base. Here is the main discussion thread to change the LLVM coding style: https://lists.llvm.org/pipermail/llvm-dev/2019-February/130083.html In the discussion thread, I proposed we use lld as a testbed for variable naming scheme change, and this patch does that. I chose to rename variables so that they are in camelCase, just because that is a minimal change to make variables to start with a lowercase letter. Note to downstream patch maintainers: if you are maintaining a downstream lld repo, just rebasing ahead of this commit would cause massive merge conflicts because this patch essentially changes every line in the lld subdirectory. But there's a remedy. clang-llvm-rename tool is a batch tool, so you can rename variables in your downstream repo with the tool. Given that, here is how to rebase your repo to a commit after the mass renaming: 1. rebase to the commit just before the mass variable renaming, 2. apply the tool to your downstream repo to mass-rename variables locally, and 3. rebase again to the head. Most changes made by the tool should be identical for a downstream repo and for the head, so at the step 3, almost all changes should be merged and disappear. I'd expect that there would be some lines that you need to merge by hand, but that shouldn't be too many. Differential Revision: https://reviews.llvm.org/D64121 llvm-svn: 365595
* ELF: De-template ELFFileBase. NFCI.Peter Collingbourne2019-04-051-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D60304 llvm-svn: 357806
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [ELF][MIPS] Add mote tests on MipsArchTree routines, fix typos in error messagesSimon Atanasyan2018-07-101-16/+17
| | | | | | | | | This fix add more test cases for routines check MIPS ELF header flags and flags from .MIPS.abiflags sections. The tests use yaml2obj for object files generation because not all combinations of flags can be produced by LLVM tools. llvm-svn: 336704
* [ELF][MIPS] Simplify `checkFlags` routine and inline `rejectMicroMips64`. NFCSimon Atanasyan2018-07-061-9/+6
| | | | llvm-svn: 336414
* [ELF][MIPS] Remove support for linking microMIPS 64-bit codeSimon Atanasyan2018-07-061-0/+9
| | | | | | | | | Remove support for linking microMIPS 64-bit code because this kind of ISA is rarely used and unsupported by LLVM. Differential revision: https://reviews.llvm.org/D48949 llvm-svn: 336413
* [ELF][mips] Print the full file path for files with incompatible ISAAlexander Richardson2017-12-071-14/+20
| | | | | | | | | | | | | | | | | | Summary: I also changed the message to print both the ISA and the the architecture name for incompatible files. Previously it would be quite hard to find the actual path of the incompatible object files in projects that have many object files with the same name in different directories. Reviewers: atanasyan, ruiu Reviewed By: atanasyan Subscribers: emaste, sdardis, llvm-commits Differential Revision: https://reviews.llvm.org/D40958 llvm-svn: 320056
* [MIPS] Set STO_MIPS_MICROMIPS flag and less-significant bit for microMIPS ↵Simon Atanasyan2017-11-131-0/+2
| | | | | | | | | | | | symbols microMIPS symbols including microMIPS PLT records created for regular symbols needs to be marked by STO_MIPS_MICROMIPS flag in a symbol table. Additionally microMIPS entries in a dynamic symbol table should have configured less-significant bit. That allows to escape teaching a dynamic linker about microMIPS symbols. llvm-svn: 318097
* [lld] unified COFF and ELF error handling on new Common/ErrorHandlerBob Haarman2017-10-251-1/+1
| | | | | | | | | | | | | | | | | | | Summary: The COFF linker and the ELF linker have long had similar but separate Error.h and Error.cpp files to implement error handling. This change introduces new error handling code in Common/ErrorHandler.h, changes the COFF and ELF linkers to use it, and removes the old, separate implementations. Reviewers: ruiu Reviewed By: ruiu Subscribers: smeenai, jyknight, emaste, sdardis, nemanjai, nhaehnle, mgorny, javed.absar, kbarton, fedor.sergeev, llvm-commits Differential Revision: https://reviews.llvm.org/D39259 llvm-svn: 316624
* LLD/ELF: Allow targets to set e_flagsKonstantin Zhuravlyov2017-10-241-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D39139 llvm-svn: 316460
* [MIPS] Generate thunks for microMIPS codeSimon Atanasyan2017-10-031-0/+5
| | | | | | | | If symbol has the STO_MIPS_MICROMIPS flag and requires a thunk to perform call PIC from non-PIC functions, we need to generate a thunk with microMIPS code. llvm-svn: 314797
* [MIPS] Fix PLT entries generation in case of linking regular and microMIPS codeSimon Atanasyan2017-10-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently LLD calls the `isMicroMips` routine to determine type of PLT entries needs to be generated: regular or microMIPS. This routine checks ELF header flags in the `FirstObj` to retrieve type of linked object files. So if the first file does not contain microMIPS code, LLD will generate PLT entries with regular (non-microMIPS) code only. Ideally, if a PLT entry is referenced by microMIPS code only this entry should contain microMIPS code, if a PLT entry is referenced by regular code this entry should contain regular code. In a "mixed" case the PLT entry can be either microMIPS or regular, but each "cross-mode-call" has additional cost. It's rather difficult to implement this ideal solution. But we can assume that if there is an input object file with microMIPS code, the most part of the code is microMIPS too. So we need to deduce type of PLT entries based on finally calculated ELF header flags and do not check only the first input object file. This change implements this. - The `getMipsEFlags` renamed to the `calcMipsEFlags`. The function called from the `LinkerDriver::link`. Result is stored in the Configuration::MipsEFlags field. - The `isMicroMips` and `isMipsR6` routines access the `MipsEFlags` field to get and check calculated ELF flags. - New types of PLT records created when necessary. Differential revision: https://reviews.llvm.org/D37747 llvm-svn: 314675
* [ELF] - Introduce std::vector<InputFile *> global arrays.George Rimar2017-09-191-2/+3
| | | | | | | | | | | | This patch removes lot of static Instances arrays from different input file classes and introduces global arrays for access instead. Similar to arrays we have for InputSections/OutputSectionCommands. It allows to iterate over input files in a non-templated code. Differential revision: https://reviews.llvm.org/D35987 llvm-svn: 313619
* Rename ObjectFile -> ObjFile.Rui Ueyama2017-07-261-1/+1
| | | | | | | Rename it because it was too easy to conflict with llvm::object::ObjectFile which broke buildbots several times. llvm-svn: 309199
* Detemplate SymbolTable.Rafael Espindola2017-07-261-1/+1
| | | | | | NFC, just makes it easier to access from non templated code. llvm-svn: 309152
* [ELF] - Apply clang-format. NFC.George Rimar2017-07-181-3/+3
| | | | llvm-svn: 308297
* LLD: Move ELF/Mips.cpp to ELF/Arch/MipsArchTree.cppKonstantin Zhuravlyov2017-06-191-0/+369
Differential Revision: https://reviews.llvm.org/D34358 llvm-svn: 305742
OpenPOWER on IntegriCloud