summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter
Commit message (Collapse)AuthorAgeFilesLines
...
* [PECOFF] Handle large objects having more than 32768 sections.Rui Ueyama2014-03-141-2/+4
| | | | | | | The COFF spec says that the SectionNumber field in the symbol table is 16 bit signed type, but MSVC treats the field as if it is unsigned. llvm-svn: 203901
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-1312-26/+26
| | | | | | | | This results in some simplifications to the code where an OwningPtr had to be used with the previous api and then ownership moved to a unique_ptr for the rest of lld. llvm-svn: 203809
* [PECOFF] Handle objects with unknown machine type header value.Rui Ueyama2014-03-131-0/+3
| | | | | | | | | An object whose machine type header value is unknown looks a bit odd but is valid. If an object contains only machine-type-independent data, you can leave the type field unspecified. Some files in oldname.lib are such object files. llvm-svn: 203752
* [docs] Add some more information on missing relocations.Michael J. Spencer2014-03-131-7/+30
| | | | llvm-svn: 203744
* [ELF] Fix MSVC warning on conversion from enum to bool.Rui Ueyama2014-03-121-2/+1
| | | | | | | This function returns a boolean value, so returning STT_COMMON does not make sense. llvm-svn: 203731
* [Cleanup] Sort includes.Ahmed Charles2014-03-126-16/+16
| | | | llvm-svn: 203666
* [Mips] Fix addendum reading for R_MIPS_26 relocation.Simon Atanasyan2014-03-091-1/+1
| | | | llvm-svn: 203412
* [Mips] Fix addendum reading for R_MIPS_32 relocation.Simon Atanasyan2014-03-091-3/+13
| | | | llvm-svn: 203411
* [Mips] Fix addendum reading for R_MIPS_HI16 / R_MIPS_LO16 relocations.Simon Atanasyan2014-03-091-0/+17
| | | | llvm-svn: 203410
* [Mips] Create ELF object reader for MIPS target.Simon Atanasyan2014-03-093-0/+119
| | | | llvm-svn: 203409
* [ELF] Factor out the code creates a Reference for the specified symbolSimon Atanasyan2014-03-091-23/+38
| | | | | | and relocation entry into the two virtual functions. llvm-svn: 203408
* [Mips] Remove redundant 'mips' prefix from names of MipsELFWriter classSimon Atanasyan2014-03-091-15/+14
| | | | | | fields. llvm-svn: 203406
* [Mips] Reduce the code indentation.Simon Atanasyan2014-03-091-15/+16
| | | | llvm-svn: 203405
* [Mips] Change unused return type from 'bool' to 'void'.Simon Atanasyan2014-03-091-2/+1
| | | | llvm-svn: 203404
* [Mips] Remove unnecessary LLVM_ATTRIBUTE_UNUSED attribute.Simon Atanasyan2014-03-091-1/+1
| | | | llvm-svn: 203403
* [Mips] Do not inherit MipsDynamicLibraryWriter and MipsExecutableWriterSimon Atanasyan2014-03-093-12/+11
| | | | | | from MipsELFWriter class. MipsELFWriter is just a helper. llvm-svn: 203402
* [Mips] Mark class by 'final' keyword.Simon Atanasyan2014-03-091-3/+3
| | | | llvm-svn: 203401
* [Mips] Remove redundant 'mips' prefix from names of MipsTargetHandlerSimon Atanasyan2014-03-092-19/+18
| | | | | | and MipsDynamicSymbolTable classes fields. llvm-svn: 203400
* [Mips] Remove redundant call to the unique_ptr::get() method followedSimon Atanasyan2014-03-092-5/+5
| | | | | | by the returned pointer dereferencing. llvm-svn: 203399
* [Mips] Remove unused class field.Simon Atanasyan2014-03-092-5/+3
| | | | llvm-svn: 203398
* Remove extra space.Rui Ueyama2014-03-081-1/+1
| | | | llvm-svn: 203331
* [docs] Add missing features for the x86-64 ELF backend.Michael J. Spencer2014-03-071-0/+29
| | | | llvm-svn: 203313
* [PECOFF] Support a new type of weak symbol.Rui Ueyama2014-03-072-2/+6
| | | | | | | | | | | | | | | Summary: COMDAT_SELECT_SAME_SIZE is a COMDAT type that I presume exist only in COFF. The semantics of the type is that linker should merge such COMDAT sections if their sizes are the same. Otherwise it's an error. Reviewers: Bigcheese, shankarke, kledzik CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2996 llvm-svn: 203308
* [Mips] Removed extra space. Thanks to dexonsmith's eagle eye.Simon Atanasyan2014-03-071-1/+1
| | | | llvm-svn: 203201
* Add "override" and remove "virtual" where appropriate.Rui Ueyama2014-03-0615-202/+202
| | | | | | | For the record, I used clang-modernize to add "override" and perl to remove "virtual". llvm-svn: 203164
* [Mips] Replace "virtual" by "override" in member function declarationsSimon Atanasyan2014-03-068-38/+38
| | | | | | where it is appropriate. llvm-svn: 203102
* Add "override" to member functions where appropriate.Rui Ueyama2014-03-059-116/+117
| | | | llvm-svn: 202998
* [PECOFF] Sort x64 exception handler table.Rui Ueyama2014-03-041-4/+34
| | | | | | | | | Just like x86 exception handler table, the table for x64 needs to be sorted so that runtime can binary search on it. Unlike x86, the table entry for x64 has multiple fields, and they need to be sorted according to its BeginAddress field. This patch also fixes a bug in relocations. llvm-svn: 202874
* [C++11] Add #include's for OwningPtr.Ahmed Charles2014-03-031-0/+1
| | | | | | Allows removing #include's in LLVM while switching to std::unique_ptr. llvm-svn: 202679
* [C++11] Work around an incompatibility between llvm::tie and std::tie.Benjamin Kramer2014-03-021-1/+1
| | | | llvm-svn: 202645
* [C++11] Replace LLVM_OVERRIDE with just "override" now that we're allChandler Carruth2014-03-024-6/+6
| | | | | | using MSVC 2012 or newer. llvm-svn: 202627
* [C++11] Switch from LLVM_FINAL to just "final" now that all of LLVM isChandler Carruth2014-03-0216-21/+21
| | | | | | requiring MSVC 2012 or newer. llvm-svn: 202626
* [PECOFF] Sort SEH table entries according to its value.Rui Ueyama2014-02-281-0/+21
| | | | | | | | | It looks like the contents of the table need to be sorted according to its value, so that the runtime can find the entry by binary search. I'm not 100% sure if we really have to do that, but at least I can say it's safe to do because the contents of .sxdata is just a list of exception handlers' RVAs. llvm-svn: 202550
* [PECOFF] Set "Exception Table" field in PE32+ header.Rui Ueyama2014-02-281-0/+3
| | | | llvm-svn: 202527
* [Hexagon] Rename the header file.Shankar Easwaran2014-02-272-5/+5
| | | | | | | | This is to accomodate future changes for newer revisions of the DSP. No change in functionality. llvm-svn: 202350
* [PECOFF] Add a test for /SAFESEH:NO for non-x86 machine type.Rui Ueyama2014-02-271-0/+7
| | | | llvm-svn: 202322
* [Mips] Remove non-ASCII symbol from the comment.Simon Atanasyan2014-02-261-1/+1
| | | | llvm-svn: 202290
* [Mips] Split reloc26 function into two parts - for processing local andSimon Atanasyan2014-02-261-7/+11
| | | | | | external relocations. llvm-svn: 202289
* [Mips] Use a correct number of bits when apply result of calculated relocation.Simon Atanasyan2014-02-261-11/+12
| | | | llvm-svn: 202288
* [Mips] Exit from the class method as soon as possible.Simon Atanasyan2014-02-261-3/+4
| | | | llvm-svn: 202287
* [PECOFF] Emit Load Configuration and SEH Table for x86.Rui Ueyama2014-02-266-4/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | If all input files are compatible with Structured Exception Handling, linker is supposed to create an exectuable with a table for SEH handlers. The table consists of exception handlers entry point addresses. The basic idea of SEH in x86 Microsoft ABI is to list all valid entry points of exception handlers in an read-only memory, so that an attacker cannot override the addresses in it. In x86 ABI, data for exception handling is mostly on stack, so it's volnerable to stack overflow attack. In order to protect against it, Windows runtime uses the table to check a return address, to ensure that the address is really an valid entry point for an exception handler. Compiler emits a list of exception handler functions to .sxdata section. It also emits a marker symbol "@feat.00" to indicate that the object is compatible with SEH. SEH is a relatively new feature for COFF, and mixing SEH-compatible and SEH-incompatible objects will result in an invalid executable, so is the marker. If all input files are compatible with SEH, LLD emits a SEH table. SEH table needs to be pointed by Load Configuration strucutre, so when emitting a SEH table LLD emits it too. The address of a Load Configuration will be stored to the file header. llvm-svn: 202248
* [CMake] Use target_link_libraries(INTERFACE|PRIVATE) on CMake-2.8.12 to ↵NAKAMURA Takumi2014-02-261-1/+1
| | | | | | | | | | | | | | | | | | increase opportunity for parallel build. target_link_libraries(INTERFACE) doesn't bring inter-target dependencies in add_library, although final targets have dependencies to whole dependent libraries. It makes most libraries can be built in parallel. target_link_libraries(PRIVATE) is used to shaared library. Each dependent library is linked to the target.so, and its user will not see its grandchildren. For example, - libclang.so has sufficient libclang*.a(s). - c-index-test requires just only libclang.so. FIXME: lld is tweaked minimally. Adding INTERFACE in each library would be better thing. llvm-svn: 202241
* lldReaderWriter: move LLVM_LINK_COMPONENTS. It seems Subdirectories don't ↵NAKAMURA Takumi2014-02-261-2/+3
| | | | | | | | depend on LLVMObject. Please give LLVMObject explicitly in each subdirectory if any of subdirectories required it. llvm-svn: 202236
* [PECOFF] Add a utility function to add DIR32 relocation.Rui Ueyama2014-02-262-4/+16
| | | | llvm-svn: 202217
* [PECOFF] Fix DLLCharacteristics field.Rui Ueyama2014-02-261-1/+3
| | | | | | IMAGE_DLL_CHARACTERISTICS_NO_SEH flag should be set only when SEH is disabled. llvm-svn: 202215
* [LinkerScript] parse OUTPUT_FORMAT : treat quotedStrings as identifierShankar Easwaran2014-02-251-7/+7
| | | | llvm-svn: 202166
* [COFF] Refactor .drectve section handling. No functionality change.Rui Ueyama2014-02-251-7/+18
| | | | llvm-svn: 202113
* [LinkerScript] OUTPUT_FORMAT: Parse Quoted StringsShankar Easwaran2014-02-251-3/+39
| | | | llvm-svn: 202111
* [LinkerScript] parse OUTPUT_ARCH.Shankar Easwaran2014-02-251-5/+36
| | | | llvm-svn: 202100
* [lld] Include reference kind in cycle detector debug outputNico Rieck2014-02-244-4/+4
| | | | | | | | This restores the debug output to how it was before r197727 broke it. This went undetected because the corresponding test was never run due to broken feature detection. llvm-svn: 202079
OpenPOWER on IntegriCloud