[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
Tue Mar 19 22:07:32 PDT 2019
MaskRay added a comment.
> About "will break some _GLOBAL_OFFSET_TABLE_ use cases", can you elaborate which ones?
See the example x86-64-reloc-gotoff64.s
With the patch, the sum doesn't compute `addr(_DYNAMIC)`
leaq _GLOBAL_OFFSET_TABLE_(%rip), %rdx ; R_X86_64_GOTPC32 (i.e R_GOTPLTONLY_PC): start(.got.plt) + A - P
movabsq $_DYNAMIC at GOTOFF, %rax ; R_X86_64_GOTOFF64 (i.e R_GOTREL_FROM_END): addr(_DYNAMIC) - end(.got)
addq %rdx, %rax ; the sum is supposed to compute addr(_DYNAMIC)
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