[PATCH] D20951: [RFC][ARM][LLD] Initial support for ARM in lld
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 3 02:19:21 PDT 2016
peter.smith created this revision.
peter.smith added reviewers: rafael, ruiu.
peter.smith added subscribers: emaste, davide, grimar, llvm-commits.
Herald added subscribers: rengolin, aemerson.
Initial support for ARM in lld.
Add support for an ARM Target and the initial set of relocations and PLT entries that are necessary for an ARM only hello world to link. This has been tested against an ARM only sysroot from the 4.2.0 CodeSourcery Lite release.
Tests have been added to test/ELF for the support that has been implemented.
Main limitations:
- No Thumb support
- Relocations incomplete
- No C++ exceptions support
- No TLS support
- No range extension or interworking veneer (thunk) support
- No Build Attribute support
- No Big-endian support
The deprecated relocations R_ARM_PLT32 and R_ARM_PC24 have been implemented as these are used by the 4.2.0 CodeSourcery Lite release.
For ARM I think the _GLOBAL_OFFSET_TABLE_ symbol should be defined to be the base of the .got section. There is existing code that does a R_ARM_BASE_PREL relocation with respect to _GLOBAL_OFFSET_TABLE_ to form the base of the .got and then add an offset to obtain the entry address.
http://reviews.llvm.org/D20951
Files:
ELF/Driver.cpp
ELF/InputFiles.cpp
ELF/Target.cpp
ELF/Writer.cpp
test/ELF/Inputs/arm-plt-reloc.s
test/ELF/Inputs/far-arm-abs.s
test/ELF/Inputs/relocation-copy-arm.s
test/ELF/arm-abs32-dyn.s
test/ELF/arm-attributes-remove.s
test/ELF/arm-branch-error.s
test/ELF/arm-branch.s
test/ELF/arm-copy.s
test/ELF/arm-data-prel.s
test/ELF/arm-data-relocs.s
test/ELF/arm-fpic-got.s
test/ELF/arm-gnu-ifunc-nosym.s
test/ELF/arm-gnu-ifunc.s
test/ELF/arm-got-relative.s
test/ELF/arm-gotoff.s
test/ELF/arm-mov-relocs.s
test/ELF/arm-plt-reloc.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20951.59504.patch
Type: text/x-patch
Size: 38748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160603/6f1f0d56/attachment.bin>
More information about the llvm-commits
mailing list