summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove the old ELF linker.Rafael Espindola2016-02-281-986/+0
| | | | | | I think it is clear by now that the new linker is viable. llvm-svn: 262158
* Add File::kind's for all subclasses of File.Pete Cooper2016-01-141-1/+2
| | | | | | | | | | | | 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
* Simplify Pass::perform to take a SimpleFile& instead of unique_ptr<SimpleFile>&David Blaikie2015-06-191-18/+18
| | | | | | | | None of the implementations replace the SimpleFile with some other file, they just modify the SimpleFile in-place, so a direct reference to the file is sufficient. llvm-svn: 240167
* [lld] Allow LLD passes to return error codes.Lang Hames2015-06-191-1/+3
| | | | llvm-svn: 240147
* [ARM] Ability to add GOT and PLTGOT entries for same symbolDenis Protivensky2015-05-221-6/+14
| | | | | | | | | | | | | | | | | These two serve different purpose: PLTGOT entries are (usually) lazily resolved and serve as trampolines to correctly call dynamically linked functions. They often have R_*_JUMP_SLOT dynamic relocation type used. Simple GOT entries hold other things, one of them may be R_*_GLOB_DAT to correctly reference global and static data. This is also used to hold dynamically linked function's address. To properly handle cases when shared object's function is called and at the same time its address is taken, we need to be able to have both GOT and PLTGOT entries bearing different dynamic relocation types for the same symbol. llvm-svn: 238015
* [ARM] Implement R_ARM_GLOB_DAT for GOT entriesDenis Protivensky2015-05-221-2/+8
| | | | | | | | This is used when referencing global or static data in shared objects. This is also used when function's address is taken and function call is made indirectly. llvm-svn: 238014
* [ARM] Add skeleton implementation of DSO linkingDenis Protivensky2015-05-211-0/+2
| | | | llvm-svn: 237881
* [ARM] Implement R_ARM_COPY relocationDenis Protivensky2015-04-241-2/+33
| | | | | | This adds support of copying objects from shared libraries. llvm-svn: 235705
* [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
* [ARM] Implement R_ARM_TLS_IE32 for dynamic executableDenis Protivensky2015-04-171-1/+1
| | | | llvm-svn: 235182
* [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
* [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
* [ARM] Replace branch to unreachable with assertionDenis Protivensky2015-04-131-3/+2
| | | | llvm-svn: 234732
* [ARM] Implement PLT for dynamic passDenis Protivensky2015-04-101-0/+108
| | | | | | | | | 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
* [ARM] clang-format ARM sourcesDenis Protivensky2015-04-091-11/+10
| | | | 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
* Merge MutableFile with SimpleFile.Rui Ueyama2015-04-071-1/+1
| | | | | | | | SimpleFile is the only derived class of MutableFile. This patch reduces the height of class hierarchy by removing MutableFile class. llvm-svn: 234354
* [ARM] Use getMappingAtomName in Release onlyDenis Protivensky2015-04-071-0/+2
| | | | llvm-svn: 234311
* [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
* [ARM] Generate PLT entries for calls from ARM and Thumb codeDenis Protivensky2015-04-021-89/+166
| | | | | | | | | | | The function call that goes through PLT table may be performed from both ARM and Thumb code. This situation requires adding a veneer to original PLT code (which is always ARM) to effect Thumb-to-ARM transition. Differential Revision: http://reviews.llvm.org/D8701 llvm-svn: 233900
* Use C++ non-static member initialization.Rui Ueyama2015-04-011-3/+2
| | | | llvm-svn: 233859
* [ARM] Handle GOT relocationsDenis Protivensky2015-03-271-5/+52
| | | | | | | | | | This includes relocs needed to link against glibc: R_ARM_BASE_PREL R_ARM_GOT_BREL Every reloc is accompanied with a test case. llvm-svn: 233383
* [ARM] Simplify IFUNC code by removing useless handlerDenis Protivensky2015-03-271-12/+1
| | | | llvm-svn: 233374
* [ARM] Add more IFUNC handlersDenis Protivensky2015-03-271-0/+3
| | | | llvm-svn: 233372
* [ARM] Implementation of PLT: handling of IFUNC calls (gnu_indirect_function)Leny Kholodov2015-03-261-2/+105
| | | | | | | | | | This diff includes implementation of linking calls to ifunc functions. It provides ifunc entries in PLT and corresponding relocations (R_ARM_ALU_PC_G0_NC, R_ARM_ALU_PC_G1_NC, R_ARM_LDR_PC_G2 for link-time and R_ARM_IRELATIVE for run-time). Differential Revision: http://reviews.llvm.org/D7833 llvm-svn: 233277
* [ARM] Handle mapping symbolsDenis Protivensky2015-03-261-1/+1
| | | | | | | | | | | Mapping symbols should have their own code models, and in some places must be treated in a specific way. Make $t denote Thumb code, and $a and $d denote ARM code. Set size, binding and type of mapping symbols to what the specification says. Differential Revision: http://reviews.llvm.org/D8601 llvm-svn: 233259
* Use alignment values everywhere instead of log2.Rui Ueyama2015-03-261-2/+2
| | | | | | | | This patch defines implicit conversion between integers and PowerOf2 instances, so uses of the classes is now implicit and look like regular integers. Now we are ready to remove the scaffolding. llvm-svn: 233245
* [ARM] Implement static (initial exec) TLS modelDenis Protivensky2015-03-191-4/+63
| | | | | | | | This includes handling of R_ARM_TLS_IE32 and R_ARM_TLS_LE32 relocs. Differential Revision: http://reviews.llvm.org/D8353 llvm-svn: 232708
* Add missing includes for make_unique, lld edition.Benjamin Kramer2015-03-021-5/+3
| | | | llvm-svn: 230925
* [ELF][ARM] Fix veneer symbol names in Release buildDenis Protivensky2015-02-111-8/+4
| | | | | | | The fix is for r228680. This makes tests also work. llvm-svn: 228837
* [ELF][ARM] Add veneer generation to branch instructionsDenis Protivensky2015-02-101-2/+187
| | | | | | | | | | When calling ARM code from Thumb and vice versa, a veneer that switches instruction set should be generated. Added veneer generation for ARM_JUMP24 ARM_THM_JUMP24 instructions. Differential Revision: http://reviews.llvm.org/D7502 llvm-svn: 228680
* Use make_unique.Rui Ueyama2015-02-061-2/+1
| | | | llvm-svn: 228453
* Fix MSVC C4060 warning (switch statement contains no case or default).Rui Ueyama2015-01-291-2/+0
| | | | llvm-svn: 227410
* Test commit.Denis Protivensky2015-01-231-1/+1
| | | | llvm-svn: 226903
* [ELF] Minimal implementation for ARM static linkingGreg Fitzgerald2015-01-211-0/+138
The code is able to statically link the simplest case of: int main() { return 0; } * Only works with ARM code - no Thumb code, no interwork (-marm -mno-thumb-interwork) * musl libc built with no interwork and no Thumb code Differential Revision: http://reviews.llvm.org/D6716 From: Denis Protivensky <dprotivensky@accesssoftek.com> llvm-svn: 226643
OpenPOWER on IntegriCloud