summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/Mips/MipsELFReader.h
Commit message (Collapse)AuthorAgeFilesLines
* ELF: Define mergeHeaderFlags to ELFLinkingContext.Rui Ueyama2015-04-041-67/+0
| | | | | | | | | | Only MIPS defined the member function, but this feature is not actually MIPS-specific. Also, the dependency to the MIPS-only member function prevented us from merging <Arch>ELF{Object,DSO}Reader classes. This patch moves the feature from MipsLinkingContext to LinkingContext. llvm-svn: 234068
* ELF: Pass file types instead of type traits to ELFObjectReader.Rui Ueyama2015-04-031-11/+2
| | | | | | | | All <Arch>ELFFileCreateFileTraits structs are the same except its file type. That means that we don't need to pass the type traits. Instead, we can only pass file types. By doing this, we can remove copy-pasted boilerplates. llvm-svn: 234047
* ELF: Remove <Arch>ELFFileCreateELFTraits::result_type.Rui Ueyama2015-04-021-4/+2
| | | | | | | | result_type is always ErrorOr<unique_ptr<File>>, and since the type traits is for instantiating ELF files, it's unlikely that we want to return something else. This patch removes that type. llvm-svn: 233948
* ELF: Remove a template parameter from ELF{Object,DOS}Reader constructors.Rui Ueyama2015-04-021-4/+2
| | | | | | | | | There is one-to-one correspondence between ELF machine type and a LinkingContext. We passed them as separate arguments to the constructor. This patch is to teach the LinkingContexts about their machine types, so that we don't need to pass that data as separate arguments. llvm-svn: 233894
* [Mips] Rename class method merge => mergeHeaderFlagsSimon Atanasyan2015-03-301-2/+2
| | | | | | No functional changes. llvm-svn: 233548
* Remove duplicate code and empty classes.Rui Ueyama2015-03-261-15/+2
| | | | llvm-svn: 233316
* [ELF] Add LinkingContext to the ELFReader.Shankar Easwaran2015-02-121-12/+16
| | | | | | | | | | | | | | | 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
* [Mips] Make MipsELFObjectReader and MipsELFDSOReader class templatesSimon Atanasyan2015-01-251-8/+8
| | | | | | No functional changes. llvm-svn: 227051
* [Mips] Remove duplicated typedef'sSimon Atanasyan2015-01-251-2/+0
| | | | | | No functional changes. llvm-svn: 227048
* [Mips] Make MipsLinkingContext owner of MipsELFFlagsMergerSimon Atanasyan2015-01-161-4/+5
| | | | | | | That reduce class dependencies and simplify the code a bit. No functional changes. llvm-svn: 226255
* Re-commit r225674: Convert other drivers to use WrapperNode.Rui Ueyama2015-01-151-6/+6
| | | | | | | | The original commit had an issue with Mac OS dylib files. It didn't handle fat binary dylib files correctly. This patch includes a fix. A test for that case has already been committed in r225764. llvm-svn: 226123
* Revert "Convert other drivers to use WrapperNode" and subsequent commits.Rui Ueyama2015-01-141-6/+6
| | | | | | | r225764 broke a basic functionality on Mac OS. This change reverts r225764, r225766, r225767, r225769, r225814, r225816, r225829, and r225832. llvm-svn: 225859
* Convert other drivers to use WrapperNode.Rui Ueyama2015-01-131-6/+6
| | | | llvm-svn: 225764
* Make File always take the ownership of a MemoryBuffer.Rui Ueyama2014-12-121-4/+4
| | | | | | | | | | | | | | The documentation of parseFile() said that "the resulting File object may take ownership of the MemoryBuffer." So, whether or not the ownership of a MemoryBuffer would be taken was not clear. A FileNode (a subclass of InputElement, which is being deprecated) keeps the ownership if a File doesn't take it. This patch makes File always take the ownership of a buffer. Buffers lifespan is not always the same as File instances. Files are able to deallocate buffers after parsing the contents. llvm-svn: 224113
* [Mips] Check ELF flags to prevent linking of incompatible filesSimon Atanasyan2014-11-061-6/+37
| | | | | | | | | | | | | | | | | 1. The path checks ELF header flags to prevent linking of incompatible files. For example we do not allow to link files with different ABI, -mnan flags, some combination of target CPU etc. 2. The patch merge ELF header flags from input object files to put their combination to the generated file. For example, if some input files have EF_MIPS_NOREORDER flag we need to put this flag to the output file header. I use the `parseFile()` (not `canParse()`) method because in case of recognition of incorrect input flags combination we should show detailed error message and stop the linking process and should not try to use another `Reader`. llvm-svn: 221439
* [ELF] Remove duplicate code.Shankar Easwaran2014-10-211-26/+22
| | | | | | | The base class ELFObjectReader/ELFDSOReader implement the canParse functionaity with this change. llvm-svn: 220261
* [ELF] Check for target architecture.Shankar Easwaran2014-10-201-0/+13
| | | | | | | | | | The canParse function for all the ELF subtargets check if the input files match the subtarget. There were few mismatches in the input files that didnt match the subtarget for which the link was being invoked, which also acts as a test for this change. llvm-svn: 220182
* Revert "[ELF][AllArchs] Fix includes"Shankar Easwaran2014-10-081-2/+2
| | | | | | This reverts commit e137dd93e1291a2d2fa7f41c8f8bcdb59c8b3225. llvm-svn: 219313
* [ELF][AllArchs] Fix includesShankar Easwaran2014-10-081-2/+2
| | | | llvm-svn: 219278
* Update for llm api change.Rafael Espindola2014-07-051-2/+2
| | | | llvm-svn: 212372
* More prefixing of error_code.Rafael Espindola2014-06-121-3/+3
| | | | llvm-svn: 210831
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-311-1/+1
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. llvm-svn: 209948
* [ELF] Add "override" and remove "virtual".Rui Ueyama2014-03-281-2/+2
| | | | llvm-svn: 205056
* [Mips] Create ELF object reader for MIPS target.Simon Atanasyan2014-03-091-0/+50
llvm-svn: 203409
OpenPOWER on IntegriCloud