[PATCH] D50077: [LLD][ELF][ARM] Add support for Armv5 and Armv6 compatible Thunks
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 31 09:23:44 PDT 2018
peter.smith created this revision.
peter.smith added reviewers: ruiu, grimar.
Herald added a reviewer: javed.absar.
Herald added subscribers: chrib, kristof.beyls, arichardson.
Herald added a reviewer: espindola.
Older Arm architectures such as Armv5 and Armv6 do not support the MOVT and MOVW instructions used in the Arm range extension thunks. When we detect that all input objects are pre-Armv7 we use an alternative sequence of instructions that does not use these that either loads the absolute address of the destination into the PC, or loads an offset to the destination that is added to the PC.
With this patch and https://reviews.llvm.org/D50076 it should be possible to use LLD to target a first edition Raspberry Pi (Armv6). These thunks are not compatible with Armv4t (arm7tdmi) which I don't plan on supporting.
https://reviews.llvm.org/D50077
Files:
ELF/Arch/ARM.cpp
ELF/Driver.cpp
ELF/Thunks.cpp
test/ELF/arm-bl-v6.s
test/ELF/arm-blx-v4t.s
test/ELF/arm-branch-rangethunk.s
test/ELF/arm-branch-undef-weak-plt-thunk.s
test/ELF/arm-long-thunk-converge.s
test/ELF/arm-thumb-branch-rangethunk.s
test/ELF/arm-thumb-interwork-shared.s
test/ELF/arm-thumb-interwork-thunk-range.s
test/ELF/arm-thumb-interwork-thunk-v5.s
test/ELF/arm-thumb-interwork-thunk.s
test/ELF/arm-thumb-thunk-symbols.s
test/ELF/arm-thunk-edgecase.s
test/ELF/arm-thunk-linkerscript-dotexpr.s
test/ELF/arm-thunk-linkerscript-orphan.s
test/ELF/arm-thunk-linkerscript.s
test/ELF/arm-thunk-re-add.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50077.158297.patch
Type: text/x-patch
Size: 21879 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180731/7ca69826/attachment.bin>
More information about the llvm-commits
mailing list