summaryrefslogtreecommitdiffstats
path: root/lld/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove the Native file format.Rui Ueyama2015-04-1015-1781/+6
| | | | | | | | | | | | | The Native file format was designed to be the fastest on-memory or on-disk file format for object files. The problem is that no one is working on that. No LLVM tools can produce object files in the Native, thus the feature of supporting the format is useless in the linker. This patch removes the Native file support. We can add it back if we really want it in future. llvm-svn: 234641
* ELF: Simplify assignments to "result"Rui Ueyama2015-04-101-22/+22
| | | | | | | This file is not -Wconversion-clean, and seems like we don't care about that except these lines. Fix these lines for simplicity. llvm-svn: 234637
* [Mips] Add -pcrel-eh-reloc command line optionSimon Atanasyan2015-04-103-0/+25
| | | | | | | | This MIPS specific option controls R_MIPS_EH relocation handling. If -pcrel-eh-reloc is specified R_MIPS_EH relocation should be handled like R_MIPS_PC32 relocation. llvm-svn: 234635
* [Mips] Support R_MIPS_EH relocation handlingSimon Atanasyan2015-04-102-2/+6
| | | | | | | The patch supports just the R_MIPS_EH relocation handling and does not implement full specification of compact exception tables for MIPS ABIs. llvm-svn: 234634
* [Mips] Replace MipsTargetHandler member function getGP() by getGPAddr()Simon Atanasyan2015-04-103-12/+11
| | | | | | | When we call getGP() we need in fact _gp symbol address. Let's cache its value and return it directly from the new getGPAddr() function. llvm-svn: 234632
* [Mips] Use std::call_once for thread safe initializationSimon Atanasyan2015-04-101-7/+10
| | | | | | The commit is inspired by r234628. Thanks Rui for the idea. llvm-svn: 234631
* [Mips] Fix typo in the commentSimon Atanasyan2015-04-101-1/+1
| | | | llvm-svn: 234630
* Fix minor threading issue.Rui Ueyama2015-04-101-6/+7
| | | | | | | | Because calls of applyRelocation is parallelized, all functions called from that need to be thread-safe. This piece of code didn't use any synchronization mechanism, so it was not safe. llvm-svn: 234628
* [ARM] Implement PLT for dynamic passDenis Protivensky2015-04-102-0/+109
| | | | | | | | | This includes implementation of PLT0 entry. For testing, libfn.so binary is added since there's no way to link shared objects with lld yet. llvm-svn: 234588
* [ARM] Rework GOT/PLT entry generationDenis Protivensky2015-04-101-21/+23
| | | | | | | Use consistent naming: commonly used generator methods don't have 'Entry' suffices. llvm-svn: 234585
* [ARM] Replace dyn_cast with isa checkDenis Protivensky2015-04-101-1/+1
| | | | llvm-svn: 234582
* [ARM] Improve veneer handling and introduce handlePlain methodDenis Protivensky2015-04-101-1/+13
| | | | | | Handle veneers only for call-like relocations. llvm-svn: 234580
* [ARM] Remove unused variable in dynamic passDenis Protivensky2015-04-101-1/+1
| | | | llvm-svn: 234576
* [ARM] Add skeleton for dynamic relocation passDenis Protivensky2015-04-101-6/+39
| | | | llvm-svn: 234573
* Remove redundant parentheses.Rui Ueyama2015-04-105-12/+12
| | | | llvm-svn: 234558
* Do not use default arguments for trivial functions.Rui Ueyama2015-04-101-6/+5
| | | | llvm-svn: 234557
* Remove unused return values.Rui Ueyama2015-04-101-55/+30
| | | | llvm-svn: 234556
* Reapply r234378, with test fixed (by emaste).Davide Italiano2015-04-101-1/+1
| | | | | | Hopefully this time the build won't be broken. llvm-svn: 234553
* ELF: Don't use APPLY_RELOC macro.Rui Ueyama2015-04-101-61/+56
| | | | | | | In other ELF ports, we don't use the macro. This patch removes the macro for consistency and readability. llvm-svn: 234552
* ELF: Move Hexagon linker helper function to Hexagon directory.Rui Ueyama2015-04-101-19/+36
| | | | | | | | Because no one except Hexagon uses the header, we don't need to maintain the header in the common directory. Also de-template the function for readability. llvm-svn: 234551
* Fix undefined behavior.Rui Ueyama2015-04-091-10/+9
| | | | | | | Having std:move(mb) and mb->getBuffer() in the same argument list is not safe because the order of evaluation is not defined. llvm-svn: 234541
* ELF: Move CreateELF() from its own file to ELFReader.h.Rui Ueyama2015-04-092-72/+33
| | | | | | | | CreateELF.h was included only by ELFReader.h, and it was used only by ELFReader class. By making the function a member of the class, we can remove template parameters. llvm-svn: 234540
* [ARM] clang-format ARM sourcesDenis Protivensky2015-04-095-26/+21
| | | | llvm-svn: 234474
* [ARM] Add mapping symbols to veneersDenis Protivensky2015-04-091-38/+127
| | | | | | | | This required splitting up veneer atoms into pieces, where every piece is paired with mapping atom of the corresponding type. llvm-svn: 234473
* Rename atom_collection -> AtomVector.Rui Ueyama2015-04-088-49/+49
| | | | | | Type names should start with an uppercase letter in the LLVM coding style. llvm-svn: 234452
* Separate atom_collection type into two different types. NFC.Rui Ueyama2015-04-087-22/+30
| | | | | | | | | | | | | | | | | | | | atom_collection is basically a wrapper for std::vector. The class provides begin and end member functions, so that it "hides" the other member functions provided by std::vector. However, you can still directly access _atoms member since the member is not protected. We cannot simply make the member private because we need that member when we are constructing atom vectors. This patch splits atom_collection into two types: std::vector<Atom *> and AtomRange. When we are constructing atom vectors, we use the former class. We return instances of the latter class from File objects so that callers cannot add or remove atoms from the lists. std::vector<Atom *> is automatically converted to AtomRange. llvm-svn: 234450
* Merge atom_collection_vector with atom_collection.Rui Ueyama2015-04-087-19/+18
| | | | | | | atom_collection_vector is the only derived class of atom_collection. This patch merges the two. llvm-svn: 234443
* Remove atom_collection_empty class.Rui Ueyama2015-04-081-4/+4
| | | | llvm-svn: 234442
* YAML: Remove blank class using alias template.Rui Ueyama2015-04-081-29/+6
| | | | llvm-svn: 234435
* Native: Remove AtomArray and use atom_collection_vector instead.Rui Ueyama2015-04-081-76/+28
| | | | llvm-svn: 234434
* Native: Use tempalte to remove duplicate code. NFC.Rui Ueyama2015-04-081-117/+36
| | | | llvm-svn: 234432
* Native: Simplify expressions. NFC.Rui Ueyama2015-04-081-9/+6
| | | | llvm-svn: 234431
* Remove redundant virtual on member functions marked 'override'.David Blaikie2015-04-083-14/+8
| | | | llvm-svn: 234419
* Revert "Allow undefined symbols in shared library by default."Rui Ueyama2015-04-081-1/+1
| | | | | | This reverts commit r234378 because it broke buildbots. llvm-svn: 234414
* [ELF] Remove redundant GOTFile classesSimon Atanasyan2015-04-085-50/+16
| | | | llvm-svn: 234397
* [ELF] Do not save a reference to GOTFile instance in xxxWriter classesSimon Atanasyan2015-04-085-31/+25
| | | | | | | | It's a follow-up to r234347. We do not need to keep a reference to `GOTFile` instance in a xxxWriter class after ownership is transferred to the caller of the `createImplicitFiles` method. llvm-svn: 234396
* Allow undefined symbols in shared library by default.Davide Italiano2015-04-081-1/+1
| | | | | | | | | | | | It's not our business to resolve those undefined symbols. We just trust the linker will load the library and its dependencies correctly, which is actually what happens, modulo bugs in the dynamic linker itself. PR: 23035 Differential Revision: http://reviews.llvm.org/D8886 llvm-svn: 234378
* ELF: Minor simplification.Rui Ueyama2015-04-071-5/+2
| | | | | | | MergeSectionKey is a tiny struct. We don't need a constructor for that. The good old way to initialize a struct works fine. llvm-svn: 234371
* MachO: Remove unused vectors from MachHeaderAliasFile. NFC.Rui Ueyama2015-04-071-6/+3
| | | | llvm-svn: 234369
* Remove unused vectors from FileArchive.Rui Ueyama2015-04-071-8/+4
| | | | | | | Archive files don't have any symbols (their members do). The vectors deleted here were always empty. llvm-svn: 234368
* ELF: Simplify ELFFile by deriving from SimpleFile instead of File.Rui Ueyama2015-04-071-44/+19
| | | | | | | | SimpleFile defines defined(). undefined(), sharedLibrary() and absolute(). We should use the class instead of deriving from the base class and re-defining the member functions in ELFFile. llvm-svn: 234367
* [ELF] Set `addAbsoluteAtom` and `addUndefinedAtom` functions return type to voidSimon Atanasyan2015-04-072-5/+3
| | | | | | | We do not use values returned by these functions anywhere. So let's return nothing. llvm-svn: 234358
* [ELF] Remove unused xxxWriter class fieldsSimon Atanasyan2015-04-075-21/+7
| | | | llvm-svn: 234357
* [ELF] Remove redundant override methods which just call base class functionsSimon Atanasyan2015-04-076-24/+0
| | | | llvm-svn: 234356
* Merge MutableFile with SimpleFile.Rui Ueyama2015-04-0725-59/+58
| | | | | | | | SimpleFile is the only derived class of MutableFile. This patch reduces the height of class hierarchy by removing MutableFile class. llvm-svn: 234354
* [ELF] Simplify adding default atomsSimon Atanasyan2015-04-0712-105/+48
| | | | | | | | | | | | | | | | | | | | | Now 'writer' creates an instance of `RuntimeFile` in the constructor, then populates the file in the virtual function `addDefaultAtoms`, then pass owning of this file to the caller of virtual function `createImplicitFiles`. First, we do not need to keep an instance of `RuntimeFile` so long. It is enough to create the file, right after that populate it and pass the owning. Second, relationship between `createImplicitFiles` and `addDefaultAtoms` is complicated. The `createImplicitFiles` might call `addDefaultAtoms`, overridden version of `addDefaultAtoms` might call base class `addDefaultAtoms`, and overridden version of `createImplicitFiles` might call base class `createImplicitFiles` as well as `addDefaultAtoms`. The patch solves both problems above. It creates and populates runtime files right in the createImplicitFiles(), removes `addDefaultAtoms` at all and does not keep references to runtime files in class fields. llvm-svn: 234347
* [ARM] Use getMappingAtomName in Release onlyDenis Protivensky2015-04-071-0/+2
| | | | llvm-svn: 234311
* [ARM] Rename applyThmReloc => applyThumb32RelocDenis Protivensky2015-04-071-6/+6
| | | | llvm-svn: 234302
* [ARM] Add mapping symbols to PLT entriesDenis Protivensky2015-04-071-19/+73
| | | | | | | | | | | | Make PLT entry atoms represent mapping symbols in the Release mode, while in the Debug mode they are still function-like symbols with regular names. It's legal that mapping symbols denote unnamed parts of code, and PLT entries are not required to have function-like names. Differential Revision: http://reviews.llvm.org/D8819 llvm-svn: 234301
* [ELF] Remove redundant const_castSimon Atanasyan2015-04-071-3/+2
| | | | | | No functional changes. llvm-svn: 234293
OpenPOWER on IntegriCloud