The order of the two symbol listings in a Macho x86_64 subtractor relocation is reversed from what seems intuitive to me.

llvm-svn: 143035
This commit is contained in:
Owen Anderson 2011-10-26 17:28:49 +00:00
parent 25d4707c4d
commit 90c49c037e
1 changed files with 3 additions and 1 deletions

View File

@ -835,7 +835,9 @@ error_code MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
if (error_code ec = getRelocationTargetName(RENext->Word1, SucName))
report_fatal_error(ec.message());
fmt << Name << "-" << SucName;
// The X86_64_RELOC_UNSIGNED contains the minuend symbol,
// X86_64_SUBTRACTOR contains to the subtrahend.
fmt << SucName << "-" << Name;
}
case 6: // X86_64_RELOC_SIGNED1
fmt << Name << "-1";