[PATCH] D139888: [lld][ARM] support absolute thunks for Armv4T Thumb and interworking

Ties Stuij via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 04:07:24 PST 2022


stuij added inline comments.


================
Comment at: lld/ELF/Thunks.cpp:1145
+// TODO: use B for short Thumb->Arm thunks instead of LDR (this doesn't work for
+//       Arm->Thumb, as in Arm state no BX PC trick; it doesn't switch state).
+static Thunk *addThunkArmv4(RelType reloc, Symbol &s, int64_t a) {
----------------
peter.smith wrote:
> This would be useful as it looks like there is a potential problem with the existing implementation for V5T and below as it always uses the 16 MiB V6+ Thumb branch range. This puts it at risk of relocation out of range errors if there is more than 4 MiB of code in a single output section. 
I have a separate fix for that issue btw.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139888/new/

https://reviews.llvm.org/D139888



More information about the llvm-commits mailing list