[PATCH] D48095: [ELF][X86_64] Use R_GOTREL_FROM_END instead of R_GOTREL for R_X86_64_GOTOFF64
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 12 14:11:39 PDT 2018
MaskRay created this revision.
MaskRay added a reviewer: ruiu.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.
R_X86_64_GOTOFF64: S + A - GOT
R_X86_64_GOTPC{32,64}: GOT + A - P (R_GOTONLY_PC_FROM_END)
R_X86_64_GOTOFF64 should use R_GOTREL_FROM_END so that in junction with
R_X86_64_GOTPC{32,64}, the `GOT` term is neutralized.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D48095
Files:
ELF/Arch/X86_64.cpp
Index: ELF/Arch/X86_64.cpp
===================================================================
--- ELF/Arch/X86_64.cpp
+++ ELF/Arch/X86_64.cpp
@@ -106,7 +106,7 @@
case R_X86_64_GOTTPOFF:
return R_GOT_PC;
case R_X86_64_GOTOFF64:
- return R_GOTREL;
+ return R_GOTREL_FROM_END;
case R_X86_64_GOTPC32:
case R_X86_64_GOTPC64:
return R_GOTONLY_PC_FROM_END;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48095.151024.patch
Type: text/x-patch
Size: 379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180612/45b3f238/attachment.bin>
More information about the llvm-commits
mailing list