[ELF] Introduce range extension thunks for ARM
authorPeter Smith <peter.smith@linaro.org>
Fri, 27 Oct 2017 09:04:11 +0000 (09:04 +0000)
committerPeter Smith <peter.smith@linaro.org>
Fri, 27 Oct 2017 09:04:11 +0000 (09:04 +0000)
commit75030b6d56c9d87bcef5997f540c7eab89a12735
tree7b005fc29b3dab21ba8a8b54b11272b5a3f96e86
parentf0c70f8d3449dd672a33133aba4ef0f781c5044c
[ELF] Introduce range extension thunks for ARM

This change adds initial support for range extension thunks. All thunks must
be created within the first pass so some corner cases are not supported. A
follow up patch will add support for multiple passes.

With this change the existing tests arm-branch-error.s and
arm-thumb-branch-error.s now no longer fail with an out of range branch.
These have been renamed and tests added for the range extension thunk.

Differential Revision: https://reviews.llvm.org/D34691

llvm-svn: 316752
22 files changed:
lld/ELF/Arch/ARM.cpp
lld/ELF/Arch/Mips.cpp
lld/ELF/Relocations.cpp
lld/ELF/Relocations.h
lld/ELF/Target.cpp
lld/ELF/Target.h
lld/ELF/Thunks.cpp
lld/ELF/Writer.cpp
lld/test/ELF/arm-branch-error.s [deleted file]
lld/test/ELF/arm-branch-rangethunk.s [new file with mode: 0644]
lld/test/ELF/arm-thumb-branch-error.s [deleted file]
lld/test/ELF/arm-thumb-branch-rangethunk.s [new file with mode: 0644]
lld/test/ELF/arm-thumb-mix-range-thunk-os.s [new file with mode: 0644]
lld/test/ELF/arm-thumb-plt-range-thunk-os.s [new file with mode: 0644]
lld/test/ELF/arm-thumb-range-thunk-os.s [new file with mode: 0644]
lld/test/ELF/arm-thunk-largesection.s [new file with mode: 0644]
lld/test/ELF/arm-thunk-linkerscript-dotexpr.s [new file with mode: 0644]
lld/test/ELF/arm-thunk-linkerscript-large.s [new file with mode: 0644]
lld/test/ELF/arm-thunk-linkerscript-orphan.s [new file with mode: 0644]
lld/test/ELF/arm-thunk-linkerscript-sort.s [new file with mode: 0644]
lld/test/ELF/arm-thunk-linkerscript.s [new file with mode: 0644]
lld/test/ELF/arm-thunk-toolargesection.s [new file with mode: 0644]