[PATCH] D105214: [ARM] RELA relocations for 32bit ARM ignore the addend.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 15:12:56 PDT 2021


MaskRay added inline comments.


================
Comment at: llvm/lib/Object/RelocationResolver.cpp:314
 
 static uint64_t resolveARM(uint64_t Type, uint64_t Offset, uint64_t S,
+                           uint64_t LocData, int64_t Addend) {
----------------
MaskRay wrote:
> The code is written in the assumption that targets preferring RELA always have Addend while targets preferring REL always have LocData.
> 
> Are you trying to add RELA support to ARM? I think it is unpopular but maybe you have specific needs which are not specified.
> 
> No objection, but a comment is needed.
I think adding LocData and Addend is wrong. When RELA is used, LocData (implicit addend) should be ignored.


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

https://reviews.llvm.org/D105214



More information about the llvm-commits mailing list