summaryrefslogtreecommitdiff
path: root/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-10-26 17:28:49 +0000
committerOwen Anderson <resistor@mac.com>2011-10-26 17:28:49 +0000
commitef22f78c68d3f096b3c8aac2752ca8e3e25106a6 (patch)
tree82998d646be6a769809861368b49418b7c680c0d /lib/Object/MachOObjectFile.cpp
parent9c5edc00c41c29be5b088710a4a7ae8507179b64 (diff)
downloadllvm-ef22f78c68d3f096b3c8aac2752ca8e3e25106a6.tar.gz
llvm-ef22f78c68d3f096b3c8aac2752ca8e3e25106a6.tar.bz2
llvm-ef22f78c68d3f096b3c8aac2752ca8e3e25106a6.tar.xz
The order of the two symbol listings in a Macho x86_64 subtractor relocation is reversed from what seems intuitive to me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143035 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object/MachOObjectFile.cpp')
-rw-r--r--lib/Object/MachOObjectFile.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Object/MachOObjectFile.cpp b/lib/Object/MachOObjectFile.cpp
index 82b9231ed8..97eb52d70d 100644
--- a/lib/Object/MachOObjectFile.cpp
+++ b/lib/Object/MachOObjectFile.cpp
@@ -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";