summaryrefslogtreecommitdiffstats
path: root/lld/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Use early continue. Style fix. No functionality change.Rui Ueyama2013-11-191-26/+26
| | | | llvm-svn: 195106
* [PECOFF] Ignore /tlbid, /tlbout, /idlout and /ignoreigl for now.Rui Ueyama2013-11-191-2/+6
| | | | llvm-svn: 195105
* Use UINT16_MAX instead of 0xFFFF.Rui Ueyama2013-11-191-1/+3
| | | | llvm-svn: 195096
* Write temporary file names if debugging is enabled.Rui Ueyama2013-11-192-0/+8
| | | | llvm-svn: 195062
* Simplify. No functionality change.Rui Ueyama2013-11-181-3/+1
| | | | llvm-svn: 195051
* Replace unnecessary vector copy with reference.Rui Ueyama2013-11-181-1/+1
| | | | llvm-svn: 194988
* Add an assert for NativeReferenceIvarsV1.Rui Ueyama2013-11-181-0/+2
| | | | | | | | | | | | | | The maximum number of references the file with NativeReferenceIvarsV1 can contain is 65534. If a file larger than that is converted to Native format, the conversion will fail without any error message. This caused a subtle bug that the LLD would produce a broken executable only when input files contain too many references. This issue exists since the RoundTripNativeTest is introduced in r193585. Since then, it seems that nobody have linked any program having more than 65534 relocations with the LLD. Otherwise we would have found it earlier. llvm-svn: 194987
* Move the entire debug print loop into DEBUG_WITH_TYPE.Rui Ueyama2013-11-161-18/+13
| | | | | | No functionality change. llvm-svn: 194914
* Replace one more magic number with sizeof().Rui Ueyama2013-11-161-1/+2
| | | | llvm-svn: 194913
* Use early continue.Rui Ueyama2013-11-161-27/+23
| | | | llvm-svn: 194911
* Simplify. No functionality change.Rui Ueyama2013-11-161-7/+3
| | | | llvm-svn: 194909
* Replace duplicate code with calls to getOrPushAttribute().Rui Ueyama2013-11-161-24/+20
| | | | llvm-svn: 194908
* Use range-based for loop.Rui Ueyama2013-11-151-21/+15
| | | | | | end() was evaluated every time through a loop. This patch eliminates it. llvm-svn: 194894
* Use llvm_unreachable() instead of assert() at where control should never get.Rui Ueyama2013-11-151-2/+1
| | | | llvm-svn: 194890
* Duplicate code removal.Rui Ueyama2013-11-151-70/+37
| | | | llvm-svn: 194887
* Replace magic number with sizeof(). No functionality change.Rui Ueyama2013-11-151-1/+2
| | | | llvm-svn: 194877
* Remove duplicate code.Rui Ueyama2013-11-151-57/+23
| | | | llvm-svn: 194866
* [PECOFF] Use INT3 instead of NOP.Rui Ueyama2013-11-151-1/+1
| | | | | | | | | | This patch does not change the meaning of the program, but if something's wrong in the linker or the compiler and the control reaches to the gap of imported function table, it will stop immediately because of the presence of INT3. If NOP, it'd fall through to the next call instruction, which is usually a completely foreign function call. llvm-svn: 194860
* [PECOFF] Remove unnecessary static member.Rui Ueyama2013-11-151-17/+10
| | | | llvm-svn: 194851
* [PECOFF] Give a better name to the linker generated file.Rui Ueyama2013-11-151-1/+1
| | | | llvm-svn: 194847
* Fix Windows buildbot on which size_t is not unsinged long.Rui Ueyama2013-11-151-1/+1
| | | | llvm-svn: 194793
* [PECOFF] Minimum size of DOS stub is 64 byte.Rui Ueyama2013-11-151-2/+6
| | | | llvm-svn: 194791
* [PECOFF] Avoid using statically initialized std::vector.Rui Ueyama2013-11-153-17/+15
| | | | | | Also slightly reduces PECOFFLinkingContext's memory footprint (~128B). llvm-svn: 194787
* Refactor copy-paste-and-modifed code using callback.Rui Ueyama2013-11-151-60/+29
| | | | llvm-svn: 194784
* Select new undefined atom rather than old one if other conditions are the same.Rui Ueyama2013-11-151-20/+34
| | | | | | | | | | | | | | | | | | | | | | | | We can add multiple undefined atoms having the same name to the symbol table. If such atoms are added, the symbol table compares their canBeNull attributes, and select one having a stronger constraint. If their canBeNulls are the same, the choice is arbitrary. Currently it choose the existing one. This patch changes the preference, so that the symbol table choose the new one if the new atom has a greater canBeNull or a fallback atom. This shouldn't change the behavior except the case described below. A new undefined atom may have a new fallback atom attribute. By choosing the new atom, we can update the fallback atom during Core Linking. PE/COFF actually need that. For example, _lseek is an alias for __lseek on Windows. One of an object file in OLDNAMES.LIB has an undefined atom for _lseek with the fallback to __lseek. When the linker tries to resolve _read, it supposed to read the file from OLDNAMES.LIB and use the new fallback from the file. Currently LLD cannot handle such case because duplicate undefined atoms with the same attributes are ignored. Differential Revision: http://llvm-reviews.chandlerc.com/D2161 llvm-svn: 194777
* Fix include guards.Rui Ueyama2013-11-1527-70/+70
| | | | llvm-svn: 194776
* [PECOFF] Add /stub option.Rui Ueyama2013-11-152-0/+20
| | | | llvm-svn: 194757
* Move DOS stub data to PECOFFLinkingContext for /stub option.Rui Ueyama2013-11-142-18/+15
| | | | llvm-svn: 194754
* Don't use getFileOrStdin() at where we don't want to read from stdin.Rui Ueyama2013-11-143-3/+3
| | | | llvm-svn: 194746
* Fix trailing whitespace and indentation.Rui Ueyama2013-11-141-53/+41
| | | | llvm-svn: 194722
* Use makeArrayRef(). No functionality change.Rui Ueyama2013-11-141-6/+7
| | | | llvm-svn: 194721
* Fix indentation and delete trailing whitespace.Rui Ueyama2013-11-141-47/+37
| | | | llvm-svn: 194677
* Use makeArrayRef() to make ArrayRef from C array.Rui Ueyama2013-11-141-6/+7
| | | | llvm-svn: 194675
* Terminate if there are un-mergeable duplicate atoms.Rui Ueyama2013-11-141-0/+2
| | | | llvm-svn: 194671
* [PECOFF] Make the import library file magic more accurate.Rui Ueyama2013-11-141-1/+2
| | | | llvm-svn: 194668
* Avoid parsing large YAML file.Rui Ueyama2013-11-141-4/+10
| | | | | | | | | | | | | | | YAML files tend to be very large compared to binary formats because of ASCII format inefficiency. And the YAML reader consumes an excessively large amount of memory when parsing a large file. It's very slow too. For example, I observed that 6MB executable became 120MB YAML file, and the YAML reader consumed more than 1.5GB memory to load it. The YAML reader even caused OOM error on 32 bit, causing the entire process to fail. This patch sets the limit on the YAML file size the linker will try to load in the RoundTripYAML test as a safeguard. llvm-svn: 194666
* [PECOFF] Add missing dependency.Michael J. Spencer2013-11-141-0/+1
| | | | | | This dependency needs to be cleaned up at some point. .directve handling needs the link.exe option parser. llvm-svn: 194642
* Move InputGraph from Driver to Core. LinkingContext depends on it.Michael J. Spencer2013-11-143-3/+5
| | | | llvm-svn: 194641
* Remove default label from fully covered switch.Rui Ueyama2013-11-131-3/+0
| | | | llvm-svn: 194624
* Show error message if two atoms are not mergeable.Rui Ueyama2013-11-131-0/+4
| | | | llvm-svn: 194620
* Fix indentation, use early return.Rui Ueyama2013-11-131-121/+115
| | | | llvm-svn: 194619
* [PECOFF] Make ReaderCOFF more robust against planned identity_magic() changes.Rui Ueyama2013-11-131-3/+7
| | | | | | No functionality change. llvm-svn: 194560
* Re-submit r194551: Use empty() instead of size() == 0.Rui Ueyama2013-11-135-7/+6
| | | | llvm-svn: 194556
* Revert "Use empty() instead of size() == 0."Rui Ueyama2013-11-136-7/+7
| | | | | | This reverts commit r194551 because it broke the buildbot. llvm-svn: 194552
* Use empty() instead of size() == 0.Rui Ueyama2013-11-136-7/+7
| | | | llvm-svn: 194551
* [PECOFF] Fix use-after-return.Rui Ueyama2013-11-131-4/+6
| | | | llvm-svn: 194545
* [PECOFF] Do not print error if length of .drectve is 0.Rui Ueyama2013-11-131-0/+3
| | | | llvm-svn: 194539
* [MachO] Simplify conditionals. No functionality change.Rui Ueyama2013-11-121-7/+5
| | | | llvm-svn: 194492
* Delete unused constructor.Rui Ueyama2013-11-111-1/+0
| | | | llvm-svn: 194364
* [cleanup] remove readFile and replace with getBuffer.Shankar Easwaran2013-11-111-19/+2
| | | | | | no functionality change. llvm-svn: 194360
OpenPOWER on IntegriCloud