[PATCH] D26240: [LLD][ARM][AArch64] ARM and AArch64 undefined weak reference values for relative relocations
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 2 07:19:39 PDT 2018
peter.smith added inline comments.
================
Comment at: lld/trunk/ELF/InputSection.cpp:266
+ case R_ARM_THM_JUMP11:
+ return P + 2;
+ case R_ARM_CALL:
----------------
grimar wrote:
> I just noticed that we have now the next code here:
>
> ```
> case R_ARM_THM_JUMP11:
> return P + 2 + A;
> ```
>
> And it seems it is uncovered by any test case we have now, in 2018.
> Reporting just in case. (I do not know ARM enough to add a test, unfortunately)
I should be able to come up with something. In theory it would need something like:
```
.thumb
b.n undefined_weak_symbol
```
There is the possibility that llvm-mc relaxation may decide to intervene and widen the branch though. I'll see what I can come up with.
Repository:
rL LLVM
https://reviews.llvm.org/D26240
More information about the llvm-commits
mailing list