summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF
Commit message (Collapse)AuthorAgeFilesLines
* Remove the old ELF linker.Rafael Espindola2016-02-28121-20755/+0
| | | | | | I think it is clear by now that the new linker is viable. llvm-svn: 262158
* Move SimpleDefinedAtom::addReference to DefinedAtom.Pete Cooper2016-02-011-0/+2
| | | | | | | | | | | | Most of the other methods to access Reference's were on DefinedAtom so this just keeps them all together. This will be used in a future patch in ObjCPass which needs to add new references. The method is virtual because we may add references to different data structures depending on whether we parsed a macho file or yaml. llvm-svn: 259436
* Add File::kind's for all subclasses of File.Pete Cooper2016-01-1412-15/+21
| | | | | | | | | | | | This is to enable isa<> support for any files which need it. It will be used in an upcoming patch to differentiate MachOFile from other implicitly generated files. Reviewed by Lang Hames. Differential Revision: http://reviews.llvm.org/D16103 llvm-svn: 257830
* Update for LLVM function name change.Rui Ueyama2016-01-145-21/+18
| | | | llvm-svn: 257801
* [old ELF] Remove AMDGPU targetTom Stellard2016-01-1113-427/+0
| | | | | | | | | | | | Summary: This is no longer needed now that the new ELF implementation supports AMDGPU. Reviewers: ruiu, rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15954 llvm-svn: 257390
* Set the folder for libraries to 'lld libraries'. NFC.Pete Cooper2016-01-079-9/+9
| | | | | | | | | | | | In a UI such as XCode, LLVM source files are in 'libraries' while clang files are in 'clang libraries'. This change moves the lld source to 'lld libraries' to make code browsing easier. It should be NFC as the build itself is still the same, just the structure in a UI differs. llvm-svn: 257001
* Fix Clang-tidy modernize-use-auto warnings, other minor fixes.Eugene Zelenko2015-11-104-13/+13
| | | | | | Differential revision: http://reviews.llvm.org/D14553 llvm-svn: 252661
* [LLD] Fix Clang-tidy modernize-use-nullptr warnings; other minor cleanups.Rui Ueyama2015-10-021-1/+1
| | | | | | Patch from Eugene Zelenko! llvm-svn: 249111
* ELF/AMDGPU: Text section should be called .hsatextTom Stellard2015-09-252-3/+3
| | | | | | | | | | Reviewers: atanasyan, ruiu Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12447 llvm-svn: 248621
* Fix memory leak in FileArchive::find().Rui Ueyama2015-09-241-2/+10
| | | | | | Patch from George Rimar! llvm-svn: 248525
* [Mips] Do not show an error if R_MIPS_GPREL32 relocation has a non-local targetSimon Atanasyan2015-09-161-13/+0
| | | | | | This matches GNU linker behaviour. llvm-svn: 247795
* Fix Clang-tidy misc-use-override warnings, other minor fixes.Rui Ueyama2015-09-104-12/+12
| | | | | | Patch from Eugene Zelenko! llvm-svn: 247323
* Fix -Wcovered-switch-default warnings.Rui Ueyama2015-08-311-4/+2
| | | | llvm-svn: 246419
* ELF: Fix "not all control paths return a value" warning.Rui Ueyama2015-08-311-12/+16
| | | | llvm-svn: 246417
* [Mips] Support grouping of multiple consecutive relocations in case of N32 ↵Simon Atanasyan2015-08-281-1/+15
| | | | | | and 64-bit MIPS ABIs llvm-svn: 246337
* [Mips] Initial support of the MIPS N32 ABISimon Atanasyan2015-08-287-10/+117
| | | | llvm-svn: 246334
* ELF/AMDGPU: Add more misssing: using namespace lld;Tom Stellard2015-08-272-0/+2
| | | | | | Hopefully, this will resolve the remaining windows bot errors. llvm-svn: 246181
* ELF/AMDGPU: Add missing: using namespace lld; to try to fix windows botTom Stellard2015-08-271-0/+1
| | | | llvm-svn: 246179
* ELF/AMDGPU: Remove another unused private member variableTom Stellard2015-08-271-4/+1
| | | | llvm-svn: 246164
* ELF/AMDGPU: Remove unused private member variableTom Stellard2015-08-272-2/+1
| | | | | | This should fix the one of the failing bots. llvm-svn: 246160
* ELF/AMDGPU: Attempt to fix windows botsTom Stellard2015-08-271-0/+1
| | | | | | Broken by r246155. llvm-svn: 246159
* ELF: Add AMDGPU ReaderWriterTom Stellard2015-08-2714-3/+432
| | | | | | | | | This is a basic implementation that allows lld to emit binaries consumable by the HSA runtime. Differential Revision: http://reviews.llvm.org/D11267 llvm-svn: 246155
* [Mips] Use 'or' for move instead of [d]addu in PLT entriesSimon Atanasyan2015-08-191-2/+2
| | | | | | | | Patch by Simon Dardis. Differential Revision: http://reviews.llvm.org/D12103 llvm-svn: 245491
* Update for llvm api change.Rafael Espindola2015-08-131-3/+6
| | | | llvm-svn: 244849
* [ELF] Remove TargetLayout::getCustomSegments methodsDenis Protivensky2015-08-122-23/+1
| | | | llvm-svn: 244747
* [LinkerScript] Process program header in PHDRS commandDenis Protivensky2015-08-122-10/+30
| | | | | | | | | | Add PT_PHDR segment depending on its availability in linker script's PHDRS command, fallback if no linker script is given. Handle FILEHDR, PHDRS and FLAGS attributes of program header. Differential Revision: http://reviews.llvm.org/D11589 llvm-svn: 244743
* Update for llvm api change.Rafael Espindola2015-08-102-3/+14
| | | | llvm-svn: 244511
* Don't depend on getDotSymtabSec. It is going away.Rafael Espindola2015-08-102-11/+15
| | | | llvm-svn: 244451
* Avoid using getDotDynSymSec in lld. It is going away.Rafael Espindola2015-08-071-2/+8
| | | | llvm-svn: 244350
* Use already available symbol tables. NFC.Rafael Espindola2015-08-072-2/+3
| | | | llvm-svn: 244336
* ELF: Correctly identify SHT_NOTE sections with !SHF_ALLOC as type*NoteTom Stellard2015-08-071-1/+6
| | | | | | | | Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11266 llvm-svn: 244317
* [Mips] Implement definition of the DT_MIPS_RLD_MAP_REL dynamic tagSimon Atanasyan2015-08-011-2/+10
| | | | llvm-svn: 243835
* [Mips] Implement definition of DT_MIPS_RLD_MAP dynamic tag, .rld_map ↵Simon Atanasyan2015-07-302-0/+32
| | | | | | section, and __RLD_MAP symbol llvm-svn: 243626
* [Mips] Define _DYNAMIC_LINKING symbol if output is a is dynamically linked ↵Simon Atanasyan2015-07-251-1/+7
| | | | | | executable file llvm-svn: 243211
* [Mips] Remove redundant separate functions to calculate relocations. DoSimon Atanasyan2015-07-251-52/+23
| | | | | | | | that inline. No functional changes. llvm-svn: 243210
* [Mips] Remove duplicated code by joining the same functionsSimon Atanasyan2015-07-251-21/+4
| | | | llvm-svn: 243209
* [Mips] Do not sign-extend addends read from RELA relocation recordsSimon Atanasyan2015-07-251-18/+21
| | | | llvm-svn: 243208
* Use the getSymbol with an explicit symbol table. NFC.Rafael Espindola2015-07-234-19/+26
| | | | llvm-svn: 243014
* [ELF] Apply segments from linker scriptsDenis Protivensky2015-07-239-99/+161
| | | | | | | | | | | | | | Put sections to segments according to linker scripts if available. Rework the code of TargetLayout::assignSectionsToSegments so it operates on the given list of segments, which can be either read from linker scripts or constructed as before. Handle NONE segments defined in linker scripts by putting corresponding sections to PT_NULL segment. Consider flags set for segments through linker scripts. Differential Revision: http://reviews.llvm.org/D10918 llvm-svn: 243002
* [ELF] Protect write access to the ELFLinkingContext::_cidentSections by a mutexSimon Atanasyan2015-07-221-1/+3
| | | | | | | The _cidentSections container is filled during files parsing so we need to serialize a concurrent access to it. llvm-svn: 242885
* Don't assume ELFFile iterates over the program headers.Rafael Espindola2015-07-211-4/+29
| | | | | | It will stop doing so shortly. llvm-svn: 242832
* Drop last use of getDynamicSymbolName.Rafael Espindola2015-07-211-3/+11
| | | | llvm-svn: 242820
* Keep track of which string table is associated with a symbol table.Rafael Espindola2015-07-211-5/+20
| | | | | | This removes the last uses of getStaticSymbolName in lld. llvm-svn: 242816
* [Mips] Fix addend writing for R_MIPS_REL32 relocationSimon Atanasyan2015-07-212-11/+20
| | | | llvm-svn: 242760
* [Mips] Handle R_MIPS_JALR relocation to omptimize jalr/jr instructionsSimon Atanasyan2015-07-212-10/+39
| | | | llvm-svn: 242759
* Update for llvm api change.Rafael Espindola2015-07-204-27/+26
| | | | llvm-svn: 242701
* [ELF/AArch64] Fix export TLS dynamic symbolAdhemerval Zanella2015-07-146-17/+26
| | | | | | | | This patch fixes the TLS dynamic variable exportation from .got.plt segments, created by General-dynamic relocations (TLSDESC). Current code only export symbols in dynamic table from .got sections. llvm-svn: 242142
* [LinkerScript] Don't create unnecessarily large segmentsRafael Auler2015-07-141-29/+41
| | | | | | | | | | | | | When using a linker script expression to change the address of a section, even if the new address is more than a page of distance from the old address, lld may put everything in the same segment, forcing it to be unnecessarily large. This patch changes the logic in Segment::assignVirtualAddress() and Segment::assignFileOffsets() to allow the segment to be sliced into two or more if it detects a linker script expression that changes a section address. Differential Revision: http://reviews.llvm.org/D10952 llvm-svn: 242096
* [LinkerScript] Fix bug in Segment::assignVirtualAddress()Rafael Auler2015-07-131-1/+1
| | | | | | | | | | | | | | When calculating the start address and size of a segment, lld mistakenly attributed the start address of the last segment slice to the whole segment when it should consider the start address of the first slice. In this case, in a multi-slice segment, Segment::assignVirtualAddress() will return a wrong segment start address to TargetLayout::assignVirtualAddress(). The effect of this miscalculation is to allocate some program headers in unnecessarily far away addresses. This commit fixes this. Differential Revision: http://reviews.llvm.org/D10951 llvm-svn: 242089
* [Mips] Support MIPS big-endian 32/64-bits targetsSimon Atanasyan2015-07-1311-60/+278
| | | | llvm-svn: 242014
OpenPOWER on IntegriCloud