summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/ARM
Commit message (Collapse)AuthorAgeFilesLines
...
* [ARM] Handle GOT relocationsDenis Protivensky2015-03-273-9/+108
| | | | | | | | | | 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
* Rename ELFLinkingContext instances "ctx" intead of "context".Rui Ueyama2015-03-274-24/+20
| | | | llvm-svn: 233344
* Use llvm::make_unique.Rui Ueyama2015-03-261-2/+2
| | | | llvm-svn: 233319
* Remove duplicate code and empty classes.Rui Ueyama2015-03-262-20/+2
| | | | llvm-svn: 233316
* Remove Makefiles.Rui Ueyama2015-03-261-15/+0
| | | | | | | | Most developers prefer to not have them, and we agreed to remove them from LLD. http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/083368.html llvm-svn: 233313
* [ARM] Implementation of PLT: handling of IFUNC calls (gnu_indirect_function)Leny Kholodov2015-03-264-3/+213
| | | | | | | | | | 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
* Revert blank line after test commitLeny Kholodov2015-03-261-1/+0
| | | | llvm-svn: 233268
* Commit access verification: blank line has been addedLeny Kholodov2015-03-261-0/+1
| | | | llvm-svn: 233267
* [ARM] Handle mapping symbolsDenis Protivensky2015-03-266-13/+76
| | | | | | | | | | | 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
* Inherit constructors. No functionality change.Rui Ueyama2015-03-251-8/+3
| | | | | | | We cannot use "using" to inherit constructors because the feature is not supported by MSVC 2013. llvm-svn: 233218
* Fix the CMake shared build.Benjamin Kramer2015-03-231-1/+2
| | | | | | | The ELF backends now depend on lld::script::Sema, which is in libReaderWriter. Link it explicitly. llvm-svn: 232953
* [ARM] Fix entry point for Thumb codeDenis Protivensky2015-03-231-0/+20
| | | | | | | Test cases for both entry functions in ARM and Thumb code are added. llvm-svn: 232942
* [ARM] Implement static (initial exec) TLS modelDenis Protivensky2015-03-195-5/+128
| | | | | | | | This includes handling of R_ARM_TLS_IE32 and R_ARM_TLS_LE32 relocs. Differential Revision: http://reviews.llvm.org/D8353 llvm-svn: 232708
* [ELF][ARM] Place gotSymbol in an anonymous namespaceShankar Easwaran2015-03-171-5/+8
| | | | | | Address comments from Espindola. llvm-svn: 232497
* [ARM] Read initial addend for REL32 and PREL31 relocsDenis Protivensky2015-03-171-0/+3
| | | | llvm-svn: 232474
* [ARM] Implement relocations: R_ARM_REL32, R_ARM_THM_JUMP11, R_ARM_PREL31Denis Protivensky2015-03-171-1/+81
| | | | | | | | Test case for every relocation is added. Differential Revision: http://reviews.llvm.org/D7565 llvm-svn: 232464
* [LinkerScript] Handle symbols defined in linker scriptsRafael Auler2015-03-161-2/+2
| | | | | | | | | | Puts symbols defined in linker script expressions in a runtime file that is added as input to the resolver, making the input object files see symbols defined in linker scripts. http://reviews.llvm.org/D8263 llvm-svn: 232409
* [ELF][ARM] Make gotSymbol a member.Shankar Easwaran2015-03-161-9/+5
| | | | | | | | | | | The gotSymbol need not be a global static variable. Apart from this reason, This variable was creating an issue with self hosting lld, as there seems to be an issue running global initializers, when initializing the guard for this static variable. Program received signal SIGTRAP, Trace/breakpoint trap. llvm-svn: 232341
* [ELF] Ability to resolve undefined symbols lazilyDenis Protivensky2015-03-141-4/+36
| | | | | | | | | Handle resolution of symbols coming from linked object files lazily. Add implementation of handling _GLOBAL_OFFSET_TABLE_ and __exidx_start/_end symbols for ARM platform. Differential Revision: http://reviews.llvm.org/D8159 llvm-svn: 232261
* Use template aliases.Rui Ueyama2015-03-101-3/+3
| | | | | | We dropped Visual Studio 2012 support, so we can use template aliases. llvm-svn: 231756
* Remove include/lld/Core/Endian.h and use llvm/Support/Endian.h instead.Rui Ueyama2015-03-021-2/+3
| | | | llvm-svn: 231005
* Add missing includes for make_unique, lld edition.Benjamin Kramer2015-03-021-5/+3
| | | | llvm-svn: 230925
* Add {read,write}{16,32,64}{le,be} functions.Rui Ueyama2015-02-271-23/+11
| | | | | | | | | | | | | | Nothing wrong with reinterpret_cast<llvm::support::ulittle32_t *>(loc), but that's redundant and not great from readability point of view. The new functions are wrappers for that kind of reinterpet_casts. Surprisingly or unsurprisingly, there was no use of big endian read and write. {read,write}{16,32,64}be have no user. But I think they still worth to be there in the header for completeness. http://reviews.llvm.org/D7927 llvm-svn: 230725
* [ELF] Add LinkingContext to the ELFReader.Shankar Easwaran2015-02-123-20/+22
| | | | | | | | | | | | | | | This adds the LinkingContext parameter to the ELFReader. Previously the flags in that were needed in the Context was passed to the ELFReader, this made it very hard to access data structures in the LinkingContext when reading an ELF file. This change makes the ELFReader more flexible so that required parameters can be grabbed directly from the LinkingContext. Future patches make use of the changes. There is no change in functionality though. llvm-svn: 228905
* [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
* [lld][ARM] Add relocations to perform function callsDenis Protivensky2015-02-031-12/+294
| | | | | | | | | | Added relocations to perform function calls with and without passing arguments. ARM-only, Thumb-only and mixed mode code generations are supported. Only simple veneers (direct instruction modification) are supported as ARM-Thumb interwork. Differential Revision: http://reviews.llvm.org/D7223 llvm-svn: 227961
* Fix MSVC C4060 warning (switch statement contains no case or default).Rui Ueyama2015-01-291-2/+0
| | | | llvm-svn: 227410
* [ARM] Correctly use make_unhandled_reloc_errorDenis Protivensky2015-01-271-1/+1
| | | | llvm-svn: 227184
* [lld] Correct forming of ARM/Thumb atomsDenis Protivensky2015-01-273-0/+113
| | | | | | | | | | | | Symbols addressing Thumb code have zero bit set in st_value to distinguish them from ARM instructions. This caused wrong atoms' forming because of offset of one byte brought in by that corrected st_value. Fixed reading of st_value & st_value-related things in ARMELFFile while forming atoms. Symbol table generation is also fixed for Thumb atoms. Differential Revision: http://reviews.llvm.org/D7161 llvm-svn: 227174
* Fix the ELF shared library build targets - take 2Greg Fitzgerald2015-01-245-16/+19
| | | | | | | | | | lldELF is used by each ELF backend. lldELF's ELFLinkingContext also held a reference to each backend, creating a link-time cycle. This patch moves the backend references to lldDriver. Differential Revision: http://reviews.llvm.org/D7119 llvm-svn: 226976
* Revert " Fix the ELF shared library build targets"Greg Fitzgerald2015-01-235-10/+16
| | | | | | This reverts commit 6a3f545b44cea46321e025d9ab773786af86cb51. llvm-svn: 226928
* Fix the ELF shared library build targetsGreg Fitzgerald2015-01-235-16/+10
| | | | | | | | | | lldELF is used by each ELF backend. lldELF's ELFLinkingContext also held a reference to each backend, creating a link-time cycle. This patch moves the backend references to lldDriver. Differential Revision: http://reviews.llvm.org/D7119 llvm-svn: 226922
* Test commit.Denis Protivensky2015-01-231-1/+1
| | | | llvm-svn: 226903
* add_lld_library -> add_llvm_libraryGreg Fitzgerald2015-01-211-5/+3
| | | | | | | | | | | * Works better for shared libraries (sets PRIVATE instead of INTERFACE) * Fixes http://llvm.org/bugs/show_bug.cgi?id=22269 * Also, use build-target names instead of component names Differential Revision: http://reviews.llvm.org/D7074 From: Greg Fitzgerald <garious@gmail.com> llvm-svn: 226702
* [ELF] Minimal implementation for ARM static linkingGreg Fitzgerald2015-01-2115-0/+696
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