summaryrefslogtreecommitdiffstats
path: root/lld/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Using llvm::sys::swapByteOrder() for the common case of byte-swapping a ↵Artyom Skrobov2014-06-142-111/+114
| | | | | | value in place llvm-svn: 210979
* Left two files out of the previous commitArtyom Skrobov2014-06-142-5/+5
| | | | llvm-svn: 210975
* llvm::sys::SwapByteOrder() renamed to llvm::sys::getSwappedBytes()Artyom Skrobov2014-06-141-111/+111
| | | | | | Further to this, llvm::sys::swapByteOrder() will be added, acting in-place llvm-svn: 210974
* Update for llvm api change.Rafael Espindola2014-06-138-21/+28
| | | | llvm-svn: 210919
* Remove unused and odd code.Rafael Espindola2014-06-131-36/+0
| | | | | | | | This code was never being used and any use of it would look fairly strange. For example, it would try to map a NativeReaderError::file_malformed to std::errc::invalid_argument. llvm-svn: 210913
* Remove a 'using std::error_code' I missed in the previous pass.Rafael Espindola2014-06-131-11/+11
| | | | llvm-svn: 210878
* More prefixing of error_code.Rafael Espindola2014-06-1221-82/+84
| | | | llvm-svn: 210831
* Refer to error_code with an std prefix.Rafael Espindola2014-06-121-4/+2
| | | | llvm-svn: 210820
* include system_error directly.Rafael Espindola2014-06-1212-12/+12
| | | | llvm-svn: 210801
* Run llvm/utils/sort_includes.py in a few files.Rafael Espindola2014-06-1213-44/+11
| | | | | | This will reduce the noise in a followup patch. llvm-svn: 210800
* Don't import error_code into the lld namespace.Rafael Espindola2014-06-1229-314/+317
| | | | llvm-svn: 210785
* replace llvm::error_code with std::error_code.Rafael Espindola2014-06-122-6/+5
| | | | llvm-svn: 210781
* Don't use make_error_code from the llvm namespace.Rafael Espindola2014-06-125-16/+16
| | | | llvm-svn: 210741
* Use error_category from the std namespace.Rafael Espindola2014-06-121-11/+11
| | | | llvm-svn: 210732
* Use error_condition from the std namespace.Rafael Espindola2014-06-121-10/+10
| | | | llvm-svn: 210730
* Move Simple.h and Alias.h to include/Core.Rui Ueyama2014-06-1125-37/+36
| | | | | | | | Because the files in Core actually depend on these files. Differential Revision: http://reviews.llvm.org/D4000 llvm-svn: 210710
* Quick fix for the windows build.Rafael Espindola2014-06-111-0/+1
| | | | | | We have to look for both std::make_error_code as well as our overloads. llvm-svn: 210704
* Use std::error_code instead of llvm::error_code.Rafael Espindola2014-06-1110-26/+25
| | | | | | This is an update for a llvm api change. llvm-svn: 210689
* [Mips] Fix the bug -- symbol referred by the R_MIPS_TLS_GD relocationSimon Atanasyan2014-06-111-1/+1
| | | | | | does not get an entry in the dynamic symbol table. llvm-svn: 210648
* Missed these from the previous commit.Rafael Espindola2014-06-111-2/+2
| | | | llvm-svn: 210629
* Inherit from error_category instead of _do_message.Rafael Espindola2014-06-111-4/+4
| | | | | | There is no std::_do_message and these classes override message anyway. llvm-svn: 210626
* [mach-o] fix use of resolver functions to not cause duplicate sections.Nick Kledzik2014-06-111-14/+23
| | | | | | | | | The previous commit uncovered a bug in the mach-o writer whereby two __text sections were created. But the test case did not catch that. So I updated the test case to run the linker a second time, reading the output of the first pass. llvm-svn: 210624
* Fix pecoff/export.test on Windows.Rui Ueyama2014-06-111-1/+1
| | | | llvm-svn: 210621
* [mach-o] add support for parsing resolver functionsNick Kledzik2014-06-112-8/+34
| | | | llvm-svn: 210612
* Mark a few functions noexcept.Rafael Espindola2014-06-101-11/+24
| | | | llvm-svn: 210590
* [ReaderWriter] Simplify initialization of class fields.Simon Atanasyan2014-06-101-2/+2
| | | | | | No functional changes. llvm-svn: 210532
* [ELF] Fix typo in the type name of the range-based loop item.Simon Atanasyan2014-06-101-1/+1
| | | | | | No functional changes. llvm-svn: 210531
* [ELF] Fix the bug -- LLD crashes if the --whole-archive optionSimon Atanasyan2014-06-101-1/+1
| | | | | | is around non-archive. llvm-svn: 210530
* [mach-o] refactor mach-o output section selection to be table driven.Nick Kledzik2014-06-103-105/+164
| | | | | | | In -r mode the sections use the table used to parse .o files. Otherwise use final exectuable table. No functionality change. llvm-svn: 210506
* [mach-o] parse multiple symbols on same address into aliasesNick Kledzik2014-06-091-2/+11
| | | | llvm-svn: 210502
* Remove dead parameter.Rui Ueyama2014-06-091-3/+3
| | | | llvm-svn: 210461
* [Mips] Handle Mips TLS relocations R_MIPS_TLS_GOTTPREL / R_MIPS_TLS_GD / ↵Simon Atanasyan2014-06-077-27/+168
| | | | | | R_MIPS_TLS_LDM etc. llvm-svn: 210394
* Revert "[PECOFF] Support COMDAT associative sections."Rui Ueyama2014-06-053-48/+11
| | | | | | This reverts accidental commit r210240. llvm-svn: 210243
* Add SymbolTable::isCoalescedAwayRui Ueyama2014-06-052-21/+8
| | | | | | | isCoalescedAway(x) is faster than replacement(x) != x as the former does not follow the replacement atom chain. Also it's easier to use. llvm-svn: 210242
* Print error message in LinkOnce handler.Rui Ueyama2014-06-051-14/+12
| | | | | | Rather than outside of the handler function to make the code simple. llvm-svn: 210241
* [PECOFF] Support COMDAT associative sections.Rui Ueyama2014-06-053-11/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | COFF supports a feature similar to ELF's section groups. This patch implements it. In ELF, section groups are identified by their names, and they are treated somewhat differently from regular symbols. In COFF, the feature is realized in a more straightforward way. A section can have an annotation saying "if Nth section is linked, link this section too." Implementing such feature is easy. We can add a reference from a target atom to an original atom, so that if the target is linked, the original atom is also linked. If not linked, both will be dead-stripped. So they are treated as a group. I added a new reference type, kindAssociate. It does nothing except preventing referenced atoms from being dead-stripped. No change to the Resolver is needed. Reviewers: Bigcheese, shankarke, atanasyan Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3946 llvm-svn: 210240
* Initial set of MakefilesIain Sandoe2014-06-0415-0/+249
| | | | | | | | This provides support for the autoconfing & make build style. The format, style and implementation follows that used within the llvm and clang projects. TODO: implement out-of-source documentation builds. llvm-svn: 210177
* Fix a wrong comment.Rui Ueyama2014-06-041-31/+28
| | | | | | | | | | | Previously FileArchive ctor comment said that only its subclasses can be instantiated, but the ctor is actually public and is instantiated by ArchiveReader. Remove the wrong comment and reorder the member functions so that public members appear before private ones. llvm-svn: 210175
* Add a comment, fix style.Rui Ueyama2014-06-041-7/+6
| | | | llvm-svn: 210174
* Fix format.Rui Ueyama2014-06-041-10/+3
| | | | llvm-svn: 210172
* [mach-o] Make anonymous atom out of section content before any symbolNick Kledzik2014-06-041-16/+20
| | | | | | | | In sections that are broken into atoms at symbols, if the first symbol in the section is not at the start of the section, then make an anonymous atom for the section content that is before the first symbol. llvm-svn: 210142
* [mach-o] Refactor sections -> atoms to be table driven.Nick Kledzik2014-06-031-373/+312
| | | | | | | | | | | | Previously each section kind had its own code to loop over the section and parse it into atoms. This refactoring has two tables. The first maps sections to ContentType. The second maps ContentType to information on how to find the atom boundaries. A few bugs in test cases were discovered as part of the refactoring. No change in functionality intended. llvm-svn: 210138
* Improve error message.Rui Ueyama2014-06-031-3/+3
| | | | | | | Previously the parser always printed out an error message followed by "Invalid file type" even if the file type is correct. llvm-svn: 210093
* Rename FileToMutable -> SimpleFileWrapper.Rui Ueyama2014-06-032-2/+2
| | | | | | | | FileToMutable is what this class does, but this class (or, to be precise, an instance of this class) is a wrapper of the other SimpleFile. It's odd that the class was named like a function. llvm-svn: 210089
* Fix build breakage.Rui Ueyama2014-06-031-1/+0
| | | | llvm-svn: 210087
* Inline short member function.Rui Ueyama2014-06-031-23/+0
| | | | llvm-svn: 210086
* This lambda returns a boolean, update the return statements.Rafael Espindola2014-06-031-7/+7
| | | | llvm-svn: 210071
* Remove group-parent references.Rui Ueyama2014-06-033-60/+17
| | | | | | | | | | | | | | | | | | | Previously section groups are doubly linked to their children. That is, an atom representing a group has group-child references to its group contents, and content atoms also have group-parent references to the group atom. That relationship was invariant; if X has a group-child edge to Y, Y must have a group-parent edge to X. However we were not using group-parent references at all. The resolver only needs group-child edges. This patch simplifies the section group by removing the unused reverse edge. No functionality change intended. Differential Revision: http://reviews.llvm.org/D3945 llvm-svn: 210066
* Make dead-striping to handle reverse edges.Rui Ueyama2014-06-031-2/+17
| | | | | | | | | | | | | | | Layout-before edges are no longer used for layout, but they are still there for dead-stripping. If we would just remove them from code, LLD would wrongly remove live atoms that were referenced by layout-befores. This patch fixes the issue. Before dead-stripping, it scans all atoms to construct a reverse map for layout-after edges. Dead- stripping pass uses the map to traverse the graph. Differential Revision: http://reviews.llvm.org/D3986 llvm-svn: 210057
* Run clang-format.Rui Ueyama2014-06-021-62/+61
| | | | llvm-svn: 210015
OpenPOWER on IntegriCloud