[lld] 72e096f - [MachO] Fix typo in comment
Shoaib Meenai via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 15 12:27:06 PDT 2020
Author: Shoaib Meenai
Date: 2020-06-15T12:26:55-07:00
New Revision: 72e096fd1e38b56d15f3aa2b82af5aaa8f98e48b
URL: https://github.com/llvm/llvm-project/commit/72e096fd1e38b56d15f3aa2b82af5aaa8f98e48b
DIFF: https://github.com/llvm/llvm-project/commit/72e096fd1e38b56d15f3aa2b82af5aaa8f98e48b.diff
LOG: [MachO] Fix typo in comment
The case the calculation works for is when r_length = 2.
Added:
Modified:
lld/MachO/Arch/X86_64.cpp
Removed:
################################################################################
diff --git a/lld/MachO/Arch/X86_64.cpp b/lld/MachO/Arch/X86_64.cpp
index 2326faec96e6..5c4966438306 100644
--- a/lld/MachO/Arch/X86_64.cpp
+++ b/lld/MachO/Arch/X86_64.cpp
@@ -122,7 +122,7 @@ void X86_64::relocateOne(uint8_t *loc, const Reloc &r, uint64_t val) const {
case X86_64_RELOC_GOT_LOAD:
// These types are only used for pc-relative relocations, so offset by 4
// since the RIP has advanced by 4 at this point. This is only valid when
- // r_length = 0, which is enforced by validateLength().
+ // r_length = 2, which is enforced by validateLength().
val -= 4;
break;
case X86_64_RELOC_UNSIGNED:
More information about the llvm-commits
mailing list