diff options
author | Martin Storsjo <martin@martin.st> | 2017-07-13 05:54:08 +0000 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2017-07-13 05:54:08 +0000 |
commit | 8ca723ae601b3626fb9864ecd1e7d69be020f597 (patch) | |
tree | 1b56d2a4ca3457f30ea9f5bf0dcfa3da872084c1 /tools/llvm-objdump/llvm-objdump.cpp | |
parent | 54df34c168c0238e14dfa2841fba0809dee1c70e (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307882 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r-- | tools/llvm-objdump/llvm-objdump.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index be5635a3d4c..812f1af3ac6 100644 --- a/tools/llvm-objdump/llvm-objdump.cpp +++ b/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:("; |