Fix a bug in llvm-objdump printing of 32-bit addresses for -section in non i386 and x86 files.

rdar://25896202

llvm-svn: 267807
This commit is contained in:
Kevin Enderby 2016-04-27 22:36:18 +00:00
parent bf200688de
commit c493085c8d
3 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
# RUN: llvm-objdump -macho -section=__data %p/Inputs/bind2.macho-x86_64 | FileCheck %s
# CHECK: bind2.macho-x86_64:
# RUN: llvm-objdump -macho -section=__data %p/Inputs/section.macho-armv7 | FileCheck -check-prefix CHECK-ADDR %s
# CHECK-ADDR: 00000004 00000001

View File

@ -1001,7 +1001,7 @@ static void DumpRawSectionContents(MachOObjectFile *O, const char *sect,
if (O->is64Bit())
outs() << format("%016" PRIx64, addr) << "\t";
else
outs() << format("%08" PRIx64, sect) << "\t";
outs() << format("%08" PRIx64, addr) << "\t";
for (j = 0; j < 4 * sizeof(int32_t) && i + j < size;
j += sizeof(int32_t)) {
if (i + j + sizeof(int32_t) < size) {