From 72e096fd1e38b56d15f3aa2b82af5aaa8f98e48b Mon Sep 17 00:00:00 2001 From: Shoaib Meenai Date: Mon, 15 Jun 2020 11:56:26 -0700 Subject: [PATCH] [MachO] Fix typo in comment The case the calculation works for is when r_length = 2. --- lld/MachO/Arch/X86_64.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: