summaryrefslogtreecommitdiffstats
path: root/lld/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Adjust for TimePoint interface change in llvm: D25730. NFCPavel Labath2016-10-241-1/+1
| | | | llvm-svn: 284965
* Retire llvm::alignOf in favor of C++11 alignof.Benjamin Kramer2016-10-201-6/+3
| | | | | | No functionality change intended. llvm-svn: 284734
* Use noexcept directly now that all compilers support itReid Kleckner2016-10-191-2/+2
| | | | llvm-svn: 284671
* Move getVersionString to Core and simplify Version.cpp.Rui Ueyama2016-10-191-35/+16
| | | | llvm-svn: 284641
* [MachO] Factor out a fair amount of duplicated code. NFCI.Davide Italiano2016-09-121-26/+14
| | | | llvm-svn: 281260
* [MachO] Remove code accidentally cut'n'pasted 3 times.Davide Italiano2016-09-101-204/+0
| | | | | | | It wasn't harmful, just goofy. It's weird to see how this has fallen through the crack without anybody noticing for so long. llvm-svn: 281148
* Fix shared library build.Rafael Espindola2016-09-061-0/+1
| | | | llvm-svn: 280753
* Use the demangler in llvm.Rafael Espindola2016-09-061-7/+2
| | | | llvm-svn: 280733
* ReaderWriter: Use ilist_noalloc_traits for TrieEdge, NFCDuncan P. N. Exon Smith2016-09-031-8/+3
| | | | | | | Adopt r280128 in lld, specializing ilist_alloc_traits rather than reinventing the wheel. llvm-svn: 280566
* ADT: Remove uses of ilist_*sentinel_traits, NFCDuncan P. N. Exon Smith2016-08-221-4/+0
| | | | llvm-svn: 279458
* [Driver] Remove break after return. NFCI.Davide Italiano2016-08-161-1/+0
| | | | llvm-svn: 278834
* MachO: Use ilist_half_embedded_sentinel_traits, NFCDuncan P. N. Exon Smith2016-08-121-12/+4
| | | | | | | Use ilist_half_embedded_sentinel_traits for the list of lld::mach_o::normalized::TrieEdge, rather than duplicating the code. llvm-svn: 278523
* [Core] Retire yet another unused member function.Davide Italiano2016-08-121-6/+0
| | | | | | The code in lib/ could use a lot of love :( llvm-svn: 278506
* [Core] Simplify a bit. NFCI.Davide Italiano2016-08-121-6/+2
| | | | llvm-svn: 278505
* Dead strip DESC bits should only be set on object files.Pete Cooper2016-08-111-1/+2
| | | | | | It only makes sense to set on N_NO_DEAD_STRIP on a relocatable object file. Otherwise the bits aren't useful for anything. Matches the ld64 behaviour. llvm-svn: 278419
* Better compress lazy binding info to match ld64.Pete Cooper2016-08-111-8/+11
| | | | | | | | | We should be using one of BIND_OPCODE_SET_DYLIB_SPECIAL_IMM, BIND_OPCODE_SET_DYLIB_ORDINAL_IMM, and BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB depending on whether ordinals are <= 0, <= 15, > 15. This matches the behaviour of ld64. llvm-svn: 278407
* Generate slightly more compressed binding opcodes when entries are the same ↵Pete Cooper2016-08-111-12/+37
| | | | | | | | | | | | as last time. We already had logic for binding opcodes had the same addend as last time. This adds the cases where the ordinal, symbol name, type, and segment offsets are the same as the last emitted ordinal. This gets us one step closer to emitting rebase opcodes as compressed as ld64 can manage. llvm-svn: 278405
* Arm64 stubs alignment is 2, not 4.Pete Cooper2016-08-111-2/+2
| | | | | | This matches the behaviour of ld64 when looking at the alignment of the stubs section in the final image. llvm-svn: 278398
* Change when we choose to add an LC_LOAD_DYLIB to the final image.Pete Cooper2016-08-113-16/+17
| | | | | | | | | | | Currently we do this when an atom is used, but we need to do it when a dylib is referenced on the cmdline as this matches ld64. This fixes much confusion over which maps are indexed with installName vs path. There is likely other confusion so i'll be seeing if i can remove path() completely in a future commit as path() shouldn't really be needed by anyone. llvm-svn: 278396
* Fix off-by-one error in default currentVersion.Pete Cooper2016-08-111-2/+2
| | | | | | | | A version of 0x1000 is 0.16.0, not 1.0.0 as the comment said. Fix the value to match the comment, and also the one test case which had this wrong. llvm-svn: 278381
* [Core] Retire addReplacement() member function.Davide Italiano2016-08-111-5/+0
| | | | llvm-svn: 278327
* [lld][MachO] Fix LC_SEGEMENT[_64] filesize computation in -r mode.Lang Hames2016-08-101-1/+3
| | | | | | | | | | Using vmsize to populate this file works when outputing MachO images, but fails when outputting relocatable objects. This patch fixes the computation to use file offsets, which works for both output types. Fixes <rdar://problem/27727666> llvm-svn: 278297
* [Core] tentativeDefinition() is now unused.Davide Italiano2016-08-101-13/+0
| | | | llvm-svn: 278181
* The first string table entry should be a null terminated space, not just null.Pete Cooper2016-08-081-2/+5
| | | | | | | This matches the behaviour of ld64 which initializes the string table with ' ' then '\0'. lld only had the '\0' and needed the ' '. llvm-svn: 278071
* Unpollute the global namespace. lld edition.Benjamin Kramer2016-08-061-0/+2
| | | | llvm-svn: 277926
* ExportTrie nodes need to be visisted in order.Pete Cooper2016-08-051-2/+30
| | | | | | | | The export trie was being emitted in the order the nodes were added to the vector, but instead needs to be visited in the order that the nodes are traversed. This matches the behaviour of ld64. llvm-svn: 277869
* [MachO] Factor out some common code in the Driver.Davide Italiano2016-08-041-13/+15
| | | | llvm-svn: 277761
* [MachO/Core] Remove (now) unused static member function. NFCI.Davide Italiano2016-08-041-12/+0
| | | | llvm-svn: 277760
* Needed change to lld for the changes to libObject/Archive interfaces now ↵Kevin Enderby2016-08-031-5/+8
| | | | | | | | returning Expected<> for the llvm trunk change in r277656 llvm-svn: 277657
* [lld][MachO] Replace some std::string with char* buffers to eliminate mem leaks.Lang Hames2016-07-292-13/+15
| | | | | | | | | | | The MachO debug support code (committed in r276935) occasionally needs to allocate string copies, and was doing so by creating std::strings on a BumpPtrAllocator. The strings were untracked, so the destructors weren't being run and we were leaking the memory when the allocator was thrown away. Since it's easier than tracking the strings, this patch switches the copies to char buffers allocated directly in the bump-ptr allocator. llvm-svn: 277208
* Matching change needed to lld for llvm trunk change r277177.Kevin Enderby2016-07-291-3/+3
| | | | | | Where Archive::getMemoryBufferRef() was changed to return Expected<> llvm-svn: 277183
* [lld][MachO] Remove some debugging output code that was mistakenly left in inLang Hames2016-07-282-30/+0
| | | | | | r276935. llvm-svn: 276944
* [lld][MachO] Re-apply r276921 with fix - initialize strings for debug stringLang Hames2016-07-279-26/+863
| | | | | | copies. llvm-svn: 276935
* [lld][MachO] Temporarily revert r276921 - it's causing bot-failures on Linux.Lang Hames2016-07-279-862/+26
| | | | llvm-svn: 276928
* [lld][MachO] Add debug info support for MachO.Lang Hames2016-07-279-26/+862
| | | | | | | | | This patch causes LLD to build stabs debugging symbols for files containing DWARF debug info, and to propagate existing stabs symbols for object files built using '-r' mode. This enables debugging of binaries generated by LLD from MachO objects. llvm-svn: 276921
* [lld][MachO] Add support for S_ATTR_DEBUG to the MachO YAML reader/writer.Lang Hames2016-07-261-0/+2
| | | | | | | This enables proper recognition of debug sections by attribute, which will be used in the near future by test-cases for MachO debugging support. llvm-svn: 276770
* Add qualification to fix MSVC build.Peter Collingbourne2016-07-261-1/+1
| | | | llvm-svn: 276720
* COFF: Implement /linkrepro flag.Peter Collingbourne2016-07-262-0/+122
| | | | | | | | | | | | | | | | This flag is implemented similarly to --reproduce in the ELF linker. This patch implements /linkrepro by moving the cpio writer and associated utility functions to lldCore, and using that implementation in both linkers. One COFF-specific detail is that we store the object file from which the resource files were created in our reproducer, rather than the resource files themselves. This allows the reproducer to be used on non-Windows systems for example. Differential Revision: https://reviews.llvm.org/D22418 llvm-svn: 276719
* [MachO] Add a couple of missing braces.Davide Italiano2016-07-201-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D21979 llvm-svn: 276213
* [lld] Update LLD for Archive::child_iterator change in LLVM r275361.Lang Hames2016-07-141-16/+18
| | | | llvm-svn: 275362
* Matching change for lld for the llvm change of Archive::create() from ↵Kevin Enderby2016-06-291-3/+4
| | | | | | ErrorOr<...> to Expected<...> in r274160. llvm-svn: 274161
* [lld][MachO] Remove SimpleFile::definedAtoms().Lang Hames2016-06-282-12/+12
| | | | | | This method just duplicates the functionality of SimpleFile::defined(). llvm-svn: 274048
* [lld][MachO] Remove stray comment.Lang Hames2016-06-271-2/+0
| | | | llvm-svn: 273917
* [lld][MachO] Add support for x86-64 negDelta64 references and fix negDelta32.Lang Hames2016-06-252-37/+61
| | | | | | | | | | These references are used to implement MachO/x64-64 subtractor relocations where the minuend is being fixed up, rather than the subtrahend. The 64-bit version was not previously supported, the 32-bit version was partially implemented but contained bugs not caught by existing test cases. This patch fixes both functionality and test coverage. llvm-svn: 273759
* Apply clang-tidy's misc-move-constructor-init to lld.Benjamin Kramer2016-06-031-1/+2
| | | | | | No functionality change intended. llvm-svn: 271686
* Fix some Include What You Use warnings; other minor fixes.Eugene Zelenko2016-04-292-12/+34
| | | | | | Differential revision: http://reviews.llvm.org/D19735 llvm-svn: 268093
* Fix builds broken in r267008.Eugene Zelenko2016-04-211-0/+1
| | | | llvm-svn: 267010
* Fix Clang-tidy misc-unused-using-decls and Include What You Use warnings.Eugene Zelenko2016-04-211-10/+12
| | | | | | Differential revision: http://reviews.llvm.org/D19348 llvm-svn: 267008
* Add missing header (NFC)Mehdi Amini2016-04-181-1/+2
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266597
* Add missing header (NFC)Mehdi Amini2016-04-181-0/+1
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266596
OpenPOWER on IntegriCloud