[PATCH] D59559: [ELF] Make R_I386_GOTPC and R_X86_64_GOTPC32/64 resolve to .got.plt.

Siva Chandra via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 00:11:49 PDT 2019


sivachandra added a comment.

In D59559#1435872 <https://reviews.llvm.org/D59559#1435872>, @MaskRay wrote:

> If there isn't a convincing reason `.got` and `.got.plt` should be adjacent, I think we probably don't need `end(.got) == start(.got.plt)` (I've changed my mind about that after investigating this more).


Yes, I am likely mixing up things from other linkers vs how it is implemented in ld.lld. In ld.lld, for the reloc expression like G + GOT + A - P, we conveniently have `Sym.getGotVA()` as an equivalent of G + GOT eliminating a need for negative indices. So, I think end(.got) == start(.got.plt) is really not required.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59559





More information about the llvm-commits mailing list