summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-07-13 05:54:08 +0000
committerMartin Storsjo <martin@martin.st>2017-07-13 05:54:08 +0000
commitfa5183b0280fe0d0bc44f1bbc8f24d744013e31b (patch)
tree96ced19e5e6cf7365f07a8e612d4f714babdcbb2 /llvm/tools/llvm-objdump/llvm-objdump.cpp
parentb244c2bafea6c31bdbab4446f941b2c3f61778d7 (diff)
downloadbcm5719-llvm-fa5183b0280fe0d0bc44f1bbc8f24d744013e31b.tar.gz
bcm5719-llvm-fa5183b0280fe0d0bc44f1bbc8f24d744013e31b.zip
[llvm-objdump] Correctly distinguish between the MachO upper/lower16 relocations
All other code in MachODump.cpp uses the same comparison, ((r_length & 0x1) == 1), for distinguishing between the two, while the code in llvm-objdump.cpp seemed to be incorrect. Differential Revision: https://reviews.llvm.org/D35240 llvm-svn: 307882
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/llvm-objdump.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index be5635a3d4c..812f1af3ac6 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -1032,7 +1032,7 @@ static std::error_code getRelocationValueString(const MachOObjectFile *Obj,
case MachO::ARM_RELOC_HALF_SECTDIFF: {
// Half relocations steal a bit from the length field to encode
// whether this is an upper16 or a lower16 relocation.
- bool isUpper = Obj->getAnyRelocationLength(RE) >> 1;
+ bool isUpper = (Obj->getAnyRelocationLength(RE) & 0x1) == 1;
if (isUpper)
fmt << ":upper16:(";
OpenPOWER on IntegriCloud