summaryrefslogtreecommitdiffstats
path: root/lld/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [Mips] Assign .MIPS.options section to the PT_LOAD segmentSimon Atanasyan2015-04-222-2/+7
| | | | llvm-svn: 235488
* [ELF] Allow TargetLayout descendants to control assignment sections to segmentsSimon Atanasyan2015-04-223-10/+23
| | | | | | | | | | | | | | | | The TargetLayout class puts two sections into the same segment if they have equal segment types and the same section flags (SHF_xxx). To be able to merge some sort of sections into the same segment we drop some flags before comparison. For example to merge string sections into Data segment we drop SHF_STRINGS and SHF_MERGE flags. The patch allows TargetLayout descendants to drop some target specific section flags. MIPS target needs that to merge .MIPS.options section which has SHF_MIPS_NOSTRIP flag into the LOAD segment. http://reviews.llvm.org/D9160 llvm-svn: 235487
* [ARM] Implement veneers for dynamic executable linkingDenis Protivensky2015-04-221-2/+8
| | | | llvm-svn: 235486
* [ARM] Move veneer generators to base class. NFCDenis Protivensky2015-04-221-38/+52
| | | | llvm-svn: 235485
* [ARM] Rename static veneer atoms to absolute code veneer atomsDenis Protivensky2015-04-221-28/+28
| | | | | | No functional changes. llvm-svn: 235484
* [ELF] Change return type of the OutputSection::flags() methodSimon Atanasyan2015-04-212-2/+2
| | | | | | | This method returns _flags field which has `uint64_t` type. Now the field's type and the method's return type are consistent. llvm-svn: 235393
* [ELF] Narrow down the type of OutputSection::_sections containerSimon Atanasyan2015-04-213-92/+88
| | | | | | | | | | The `OutputSection::appendSection()` method always gets a pointer to the `Section` class descendants. So it is not necessary to keep them in the vector of `Chunk` pointers. No functional changes. llvm-svn: 235392
* [Mips] Write .reginfo section into the separate PT_MIPS_REGINFO segmentSimon Atanasyan2015-04-213-2/+20
| | | | llvm-svn: 235391
* [ELF] Simplify class memeber function declarationSimon Atanasyan2015-04-211-2/+1
| | | | | | No functional changes. llvm-svn: 235390
* --discard-locals should be --discard-all here.Davide Italiano2015-04-201-1/+1
| | | | | | Sorry for the mistake/confusion. llvm-svn: 235359
* [GNU/ELF] Add support for -X/--discard-locals.Davide Italiano2015-04-203-0/+13
| | | | | | | | | | | There's (almost) never need to keep .L symbols around for production builds. In fact, the FreeBSD kernel explicitly specify -X beacuse the size impact (and the subsequent performance impact) might be significant, because we keep symbols in memory. I was tempted to make this the default, but I haven't (yet). PR: 23232 llvm-svn: 235357
* [Mips] Write DT_MIPS_OPTIONS tag to .dynamic sectionSimon Atanasyan2015-04-201-0/+15
| | | | | | | If .MIPS.options section exists the DT_MIPS_OPTIONS tag should hold an address of this section. llvm-svn: 235290
* [Mips] Support R_MICROMIPS_PC18_S3/PC19_S2/PC21_S2/PC26_S2 relocations handlingSimon Atanasyan2015-04-201-4/+16
| | | | llvm-svn: 235289
* [Mips] Support R_MICROMIPS_GOT_DISP / PAGE / OFST relocations handlingSimon Atanasyan2015-04-202-2/+13
| | | | llvm-svn: 235288
* Accept --dynamic-linker <file>.Davide Italiano2015-04-191-1/+1
| | | | | | | | | Before we only accepted --dynamic-linker=<file> and -dynamic-linker <file> but older versions of GNU ld (e.g. 2.17.50) accept this other form, so try to be compatible. PR: 23233 llvm-svn: 235282
* [GNU/ELF] Add support for -x/--discard-all.Davide Italiano2015-04-183-0/+13
| | | | | PR: 23232 llvm-svn: 235247
* Delete dead code (again).Rui Ueyama2015-04-171-61/+0
| | | | llvm-svn: 235217
* Delete dead code.Rui Ueyama2015-04-171-61/+0
| | | | llvm-svn: 235216
* [ARM] Implement R_ARM_TLS_IE32 for dynamic executableDenis Protivensky2015-04-173-1/+30
| | | | llvm-svn: 235182
* [Mips] clang-format the codeSimon Atanasyan2015-04-151-1/+1
| | | | llvm-svn: 235033
* [Mips] Remove redundant `.got` section lookupSimon Atanasyan2015-04-151-2/+1
| | | | | | No functional changes. llvm-svn: 235032
* [Mips] Create _GLOBAL_OFFSET_TABLE_ only if the .got section existsSimon Atanasyan2015-04-153-2/+17
| | | | llvm-svn: 235031
* [Mips] Check `_gp_disp` symbol using a trivial string comparisonSimon Atanasyan2015-04-152-13/+1
| | | | | | No functional changes. llvm-svn: 235030
* [ARM] Don't generate veneers when bl->blx fixup is possibleDenis Protivensky2015-04-151-8/+39
| | | | llvm-svn: 234991
* [ARM] Pass Thumb flag to handler methods instead of atomDenis Protivensky2015-04-151-10/+9
| | | | llvm-svn: 234989
* [ELF] Fix gcc -pedantic warnings (remove extra ';')Denis Protivensky2015-04-153-3/+3
| | | | llvm-svn: 234981
* ELF: Attempt to simplify Segment::AssignVirtualAddress.Rui Ueyama2015-04-141-1/+1
| | | | | | This is a retry of r234944. llvm-svn: 234955
* temporaryRui Ueyama2015-04-141-13/+10
| | | | llvm-svn: 234954
* temporaryRui Ueyama2015-04-141-123/+126
| | | | llvm-svn: 234953
* ELF: Move Instrcution definition to HexagonEncoding.h.Rui Ueyama2015-04-142-28/+37
| | | | | | | | | | HexagonEncodings.h contains a list of bitmasks. The file is used only by HexagonRelocationHandler.cpp. The header is odd in the sense that it uses struct Instruction but it doesn't define the data type. This patch moves the struct definition to the header. llvm-svn: 234947
* Revert "ELF: Attempt to simplify Segment::assignVirtualAddress()."Rui Ueyama2015-04-141-105/+123
| | | | | | This reverts commit r234944 because it seems to have broken the buildbots. llvm-svn: 234946
* ELF: Attempt to simplify Segment::assignVirtualAddress().Rui Ueyama2015-04-141-123/+105
| | | | | | | | | | | | | This function is too long and complicated. Looks like new code was added incrementaly without any refactoring. Maybe no one can describe its exact semantics any more? It even contains copy-pastes inside it. This patch is an (incomplete) attempt to simplify the function. I tried to mechanically translate code to another form more intelligible. I don't still understand the whole picture, but this patch shouldn't change the linker's functionality. llvm-svn: 234944
* Rename ExecutableAtom.hpp to ExecutableAtom.hDavide Italiano2015-04-142-2/+2
| | | | | | This is for consistency with what's used elsewhere in lld tree. llvm-svn: 234943
* ELF: Remove redundant namespace qualifiers.Rui Ueyama2015-04-1424-55/+53
| | | | llvm-svn: 234938
* ELF: Simplify ELFDefinedAtom::contentType().Rui Ueyama2015-04-142-69/+43
| | | | llvm-svn: 234936
* ELF: Split Atoms.h to Atoms.{h,cpp}.Rui Ueyama2015-04-143-361/+342
| | | | llvm-svn: 234935
* ELF: Split SegmentChunks.h to SegmentChunks.{h,cpp}.Rui Ueyama2015-04-143-435/+469
| | | | llvm-svn: 234934
* ELF: Split HeaderChunks.h to HeaderChunks.{h,cpp}.Rui Ueyama2015-04-144-179/+216
| | | | llvm-svn: 234932
* ELF: Split SectionChunks.h to SectionChunks.{h,cpp}.Rui Ueyama2015-04-143-919/+1061
| | | | | | The size of AArch64TargetHander.cpp.o is now 4.1MB. llvm-svn: 234931
* [ELF] Use type helper Elf_Word instead of plain uint32_t data typeSimon Atanasyan2015-04-141-6/+9
| | | | | | | | That helps to correctly write content of hash table if target and host endianness are not the same. Right now that commit does not affect any supported targets. llvm-svn: 234928
* [ELF] Write whole std::vector using a single `memcpy` callSimon Atanasyan2015-04-141-10/+3
| | | | | | | | | We do not need to iterate over `_buckets` and `_chains` vectors and write all elements one by one. No functional changes. llvm-svn: 234927
* [ELF] Remove redundant type cast to `char*` before passing array to memcpySimon Atanasyan2015-04-141-1/+1
| | | | | | No functional changes. llvm-svn: 234926
* [Mips] Write _DYNAMIC symbol on MIPS targetsSimon Atanasyan2015-04-141-0/+8
| | | | llvm-svn: 234925
* ELF: Split OutputELFWriter.h to OutputELFWriter.{h,cpp}.Rui Ueyama2015-04-143-448/+461
| | | | | | The size of AArch64TargetHandler.cpp.o is now 4.5MB. llvm-svn: 234916
* ELF: Split TargetLayout.h into TargetLayout.{h,cpp}.Rui Ueyama2015-04-143-681/+705
| | | | | | This patch makes AArch64TargetHandler.cpp.o from 8.5MB to 6.8MB. llvm-svn: 234914
* ELF: Remove ELFT template argument when referring the base class.Rui Ueyama2015-04-1413-49/+45
| | | | | | | | We don't need to repeat the template argument. They are not ambiguous. MIPS is parameterized for ELFT, so we can't do this for MIPS, though. llvm-svn: 234913
* Attempt to fix MSVC warning.Rui Ueyama2015-04-141-2/+0
| | | | | | | | | | | This patch tries to fix the following MSVC warning. warning C4661: 'bool lld::elf::ELFFile<lld::elf::ELF32LE>::isCompatible(unsigned char,unsigned char)' : no suitable definition provided for explicit template instantiation request llvm-svn: 234909
* [ARM] Implement mapping symbols for PLT0 entryDenis Protivensky2015-04-141-27/+34
| | | | llvm-svn: 234876
* [ARM] Move out mapping atom functionality to a separate classDenis Protivensky2015-04-141-46/+36
| | | | llvm-svn: 234874
* Simplify short switch-cases.Rui Ueyama2015-04-141-12/+2
| | | | llvm-svn: 234869
OpenPOWER on IntegriCloud