[PATCH] D59559: [ELF] Make R_I386_GOTPC and R_X86_64_GOTPC32/64 resolve to .got.plt.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 20 00:30:37 PDT 2019
MaskRay added a comment.
In D59559#1435876 <https://reviews.llvm.org/D59559#1435876>, @sivachandra wrote:
> 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.
I actually had a partial implementation on the stuff but haven't finished it yet (after I did the TLS stuff; I didn't know you are also working on glibc!).. Would you mind me finishing that and sending it for review :)
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