summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit90c49c037e3334c9a1545e13377ca228a9d80bbb (patch)
tree39ef50f10727cee77ac0d787e1297ecec9d29edf /llvm/lib/Object/MachOObjectFile.cpp
parent25d4707c4d4d8e4dd5fa7896aedbfac3c621bacb (diff)
downloadbcm5719-llvm-90c49c037e3334c9a1545e13377ca228a9d80bbb.tar.gz
bcm5719-llvm-90c49c037e3334c9a1545e13377ca228a9d80bbb.zip
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
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r--llvm/lib/Object/MachOObjectFile.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index 82b9231ed8d..97eb52d70d0 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/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";
OpenPOWER on IntegriCloud