[PATCH] D112063: [lld][ELF] Support adrp+ldr GOT optimization for AArch64

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 10 20:34:08 PST 2022


MaskRay added a comment.

(There was part of the reasons I sent D116881 <https://reviews.llvm.org/D116881> to refactor scanRelocations.)
I just realized that handling GOT optimization in `InputSectionBase::relocateAlloc` has one downside: the GOT entry may be reserved even if no reference uses it.
x86-64 GOTPCRELX uses `target->adjustGotPcExpr` and different `RelExpr` to suppress the GOT entry.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112063



More information about the llvm-commits mailing list