summaryrefslogtreecommitdiffstats
path: root/lld/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Prune unused local variable.Rui Ueyama2013-10-111-3/+1
| | | | llvm-svn: 192509
* [ELF] Add alias options for start-group/end-group options.Shankar Easwaran2013-10-111-0/+4
| | | | | | | | | | | | | There are aliases for --start-group/--end-group options represented by -( and -) respectively in the command line. This change adds and improves the test for the alias options to be tested. Looks like users use this option widely than explicitly using --start-group/--end-group. llvm-svn: 192470
* Simplify unique_ptr instantiation. No functionality change.Rui Ueyama2013-10-111-4/+3
| | | | llvm-svn: 192427
* Propagate Resolver::resolveUndefines()'s failure to caller.Rui Ueyama2013-10-111-6/+7
| | | | llvm-svn: 192424
* Remove excessive allowRemainingUndefines() check.Rui Ueyama2013-10-111-4/+2
| | | | | | | | | allowRemainingUndefines() is already checked in Resolver::resolve(), so we don't need to check it again after returning from it. It's actually not only superfluous but buggy because a failure of resolve() does not always mean that there is a remaining undefines. llvm-svn: 192423
* Return true from Resolver::resolve() on success.Rui Ueyama2013-10-112-3/+3
| | | | llvm-svn: 192422
* Replace a recursive tail call with an infinite loop.Rui Ueyama2013-10-111-16/+19
| | | | | | This eliminates _elements's size check from the loop. llvm-svn: 192418
* Remove an unused variable added in r192415.Rui Ueyama2013-10-111-1/+0
| | | | llvm-svn: 192416
* Use switch instead of if, and handle all enum values.Rui Ueyama2013-10-111-18/+30
| | | | | | | This patch also handles errors other than no_more_files error. They were silently ignored. llvm-svn: 192415
* Fix return after llvm_unreachableShankar Easwaran2013-10-111-2/+0
| | | | llvm-svn: 192414
* [ELF] Fix Atoms in the same file had overlapping ordinals.Shankar Easwaran2013-10-112-3/+4
| | | | | | | This also reverts the LayoutPass to use std::sort as all files have an ordinal now. llvm-svn: 192409
* Fix typoRui Ueyama2013-10-101-1/+1
| | | | llvm-svn: 192401
* [ELF] Initial design to handle Linker scripts for ELF.Shankar Easwaran2013-10-103-3/+14
| | | | llvm-svn: 192369
* [PECOFF] Add files appear in .drectve to input graphRui Ueyama2013-10-101-15/+27
| | | | | | | | -- so that command line options to specify new input files, such as /defaultlib:foo, is handled properly. Such options were ignored before this patch. llvm-svn: 192342
* Do not process .objtxt file twice.Rui Ueyama2013-10-091-2/+5
| | | | | | | | | A file with .objtxt extension is parsed in readFile(), but because we did not propagate that information to the calling side, calling side would try to parse it again. This patch will fix the issue by adding an extra parameter to readFile(). llvm-svn: 192311
* [ELF] Change MaxAlignment to 2.Shankar Easwaran2013-10-098-8/+7
| | | | llvm-svn: 192310
* [Layout] Dont set ordinals to Files by default.Shankar Easwaran2013-10-094-8/+13
| | | | | | | | | | | | | This change removes code in various places which was setting the File Ordinals. This is because the file ordinals are assigned by the way files are resolved. There was no other way than making the getNextFileAndOrdinal be set const and change the _nextOrdinal to mutable. There are so many places in code, that you would need to cleanup to make LinkingContext non-const! llvm-svn: 192280
* [Layout] Assign ordinals in Resolution order.Shankar Easwaran2013-10-096-49/+19
| | | | llvm-svn: 192277
* [inputGraph] Associate Resolve state with appropriate nodesShankar Easwaran2013-10-094-5/+71
| | | | | | | | | | This associates resolveState to FileNodes. The control node derive their resolution state from the inputElements that are contained in it. This makes --start-group/--end-group to work with ELF linking. llvm-svn: 192269
* Update error classes from all lowercase to camel case.Rui Ueyama2013-10-0915-87/+87
| | | | llvm-svn: 192261
* Move a local variable into while-loop scope.Rui Ueyama2013-10-091-2/+1
| | | | llvm-svn: 192260
* Fix flaky elf/X86_64/dynlib-search.test.Rui Ueyama2013-10-081-3/+18
| | | | | | | | | Output to llvm::err() is not guaranteed to be thread-safe, so it needs to be guarded with a lock. Differential Revision: http://llvm-reviews.chandlerc.com/D1862 llvm-svn: 192250
* Use size_t for array index.Rui Ueyama2013-10-081-2/+2
| | | | llvm-svn: 192249
* [LinkingContext] make LinkingContext non-constShankar Easwaran2013-10-084-10/+7
| | | | llvm-svn: 192183
* Move duplicate code in InputGraphs to the parent class.Rui Ueyama2013-10-081-0/+29
| | | | llvm-svn: 192170
* Rename GnuLd's path() too.Rui Ueyama2013-10-081-1/+1
| | | | llvm-svn: 192169
* Rename path() -> getPath().Rui Ueyama2013-10-081-3/+3
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1853 llvm-svn: 192167
* Make bitmask an unsigned type.Rui Ueyama2013-10-082-2/+2
| | | | llvm-svn: 192163
* fix typosNick Kledzik2013-10-082-2/+2
| | | | llvm-svn: 192154
* Add comments. Early return.Rui Ueyama2013-10-081-10/+16
| | | | llvm-svn: 192149
* Convert error code structs to scoped enums.Rui Ueyama2013-10-081-37/+27
| | | | | | | | | | | | | | Summary: The original code with enum "_" is intended to emulate scoped enums. Now we have real scoped enums, so use it. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1852 llvm-svn: 192148
* Supoort mach-o encoded in yaml.Nick Kledzik2013-10-084-6/+935
| | | | | | | | | | | | | | | | | | | | | This is the first step in how I plan to get mach-o object files support into lld. We need to be able to test the mach-o Reader and Write on systems without a mach-o tools. Therefore, we want to support a textual way (YAML) to represent mach-o files. MachONormalizedFile.h defines an in-memory abstraction of the content of mach-o files. The in-memory data structures are always native endianess and always use 64-bit sizes. That internal data structure can then be converted to or from three different formats: 1) yaml (text) encoded mach-o, 2) binary mach-o files, 3) lld Atoms. This patch defines the internal model and uses YAML I/O to implement the conversion to and from the model to yaml. The next patch will implement the conversion from normalized to binary mach-o. This patch includes unit tests to validate the yaml conversion APIs. llvm-svn: 192147
* [lld][InputGraph] Change the Resolver to use inputGraphShankar Easwaran2013-10-0743-680/+451
| | | | | | | | | | | | Changes :- a) Functionality in InputGraph to insert Input elements at any position b) Functionality in the Resolver to use nextFile c) Move the functionality of assigning file ordinals to InputGraph d) Changes all inputs to MemoryBuffers e) Remove LinkerInput, InputFiles, ReaderArchive llvm-svn: 192081
* [ELF] Fix uninitalized value.Michael J. Spencer2013-10-031-0/+2
| | | | llvm-svn: 191924
* [Core] Fix unstable sort for unordered atoms.Michael J. Spencer2013-10-031-1/+1
| | | | llvm-svn: 191867
* [Core] Fix heap overflow in LayoutPass.Michael J. Spencer2013-10-021-3/+5
| | | | | | | Found this with asan. Code assumes that find doesn't return end, thus if both atoms didn't have followon roots it would still compare their positions. llvm-svn: 191865
* [mach-o] Add support for -mllvm to darwin driverNick Kledzik2013-09-281-0/+7
| | | | llvm-svn: 191594
* Add a comment to ReaderCOFF::parseFile.Rui Ueyama2013-09-271-0/+4
| | | | llvm-svn: 191583
* [mach-o] switch to use llvm::MachO:: constantsNick Kledzik2013-09-273-33/+34
| | | | | | Stop using some locally defined mach-o constants. llvm-svn: 191581
* [ELF] Handle copy relocations for PC32.Michael J. Spencer2013-09-271-1/+4
| | | | | | | | This will eventually need to be refactored to better handle COPY relocations, as other relocations can also generate them. I'm not yet sure the exact circumstances in which they are needed yet. llvm-svn: 191567
* [ELF] Mark STT_GNU_IFUNC symbols as code.Michael J. Spencer2013-09-271-0/+1
| | | | llvm-svn: 191566
* [PECOFF] Enable input file logging if /debug is given.Rui Ueyama2013-09-261-0/+3
| | | | llvm-svn: 191469
* [ELF] Add COPY relocations.Michael J. Spencer2013-09-264-4/+86
| | | | llvm-svn: 191467
* [Core] Add type and size to SharedLibraryAtom.Michael J. Spencer2013-09-267-2/+58
| | | | llvm-svn: 191466
* [ELF] Fix use after free.Michael J. Spencer2013-09-251-15/+16
| | | | llvm-svn: 191403
* Make Driver::link and LinkingContext::validate return true on success.Rui Ueyama2013-09-2411-74/+68
| | | | | | | | | | | | | This patch inverts the return value of these functions, so that they return "true" on success and "false" on failure. The meaning of boolean return value was mixed in LLD; for example, InputGraph::validate() returns true on success. With this patch they'll become consistent. CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1748 llvm-svn: 191341
* [PECOFF] Fix /? option and add a test for the flag.Rui Ueyama2013-09-241-1/+1
| | | | llvm-svn: 191320
* [PECOFF] Ignore /verbose and /wx (warnings as errors) options.Rui Ueyama2013-09-241-7/+16
| | | | llvm-svn: 191317
* [PECOFF] Add /swaprun:{cd,net} options.Rui Ueyama2013-09-243-0/+18
| | | | llvm-svn: 191276
* [PECOFF] Ignore /pdbaltpath option.Rui Ueyama2013-09-241-0/+1
| | | | | | | | /PDBALTPATH:<path> is an option to embed a different path for the PDB file to the binary than the actual PDB file location. Because we don't support PDB file, we'll just ignore the option for now. llvm-svn: 191273
OpenPOWER on IntegriCloud