[PATCH] D55505: [LLD][ELF] Implement option to force PIC compatible Thunks

Stefan Agner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 29 04:34:42 PST 2018


falstaff84 added a comment.

In my test case using Linux compiled for Arm using allyesconfig and ld.lld with these changes applied linking fails as follows:

  ...
  ld.lld: error: relocation R_ARM_MOVT_PREL out of range: -4403772844 is not in [-2147483648, 2147483647]
  ...

I guess this is since we are using `R_ARM_MOVT_PREL` in ARMV7PILongThunk. Not sure whether we really care as this is more a constructed case with an insanely big kernel (with ld.bfd the linked kernel ends up at 201MiB!).

ld.bfd seems to use a different approach which allows the kernel to successfully link. See also:
https://lore.kernel.org/patchwork/patch/1021192/#1213770


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

https://reviews.llvm.org/D55505





More information about the llvm-commits mailing list