[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 05:55:14 PST 2022


stuij added inline comments.


================
Comment at: lld/ELF/Thunks.cpp:239
 
+
 // MIPS LA25 thunk
----------------
peter.smith wrote:
> Is this extra new line intentional?
no. removed.


================
Comment at: lld/ELF/Thunks.cpp:1154
+  case R_ARM_CALL:
+    if (config->picThunk && thumb_target)
+      fatal("PIC relocations across state change not supported for Armv4T");
----------------
peter.smith wrote:
> I think the ARMV5PILongThunk can work for V4T as well here.
> ```
> P:   ldr ip, [pc, #4] ; L2
> L1: add ip, pc, ip
>       bx ip
> L2: .word S - (P + (L1 - P) + 8)
> ``` 
> The entry is Arm state so no BLX required, and the LDR is just loading an offset, the state change is done by the bx ip.
ah right. thanks.


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