[llvm] r267807 - Fix a bug in llvm-objdump printing of 32-bit addresses for -section in non i386 and x86 files.
Kevin Enderby via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 27 15:36:19 PDT 2016
Author: enderby
Date: Wed Apr 27 17:36:18 2016
New Revision: 267807
URL: http://llvm.org/viewvc/llvm-project?rev=267807&view=rev
Log:
Fix a bug in llvm-objdump printing of 32-bit addresses for -section in non i386 and x86 files.
rdar://25896202
Added:
llvm/trunk/test/tools/llvm-objdump/Inputs/section.macho-armv7 (with props)
Modified:
llvm/trunk/test/tools/llvm-objdump/macho-sections.test
llvm/trunk/tools/llvm-objdump/MachODump.cpp
Added: llvm/trunk/test/tools/llvm-objdump/Inputs/section.macho-armv7
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/Inputs/section.macho-armv7?rev=267807&view=auto
==============================================================================
Binary file - no diff available.
Propchange: llvm/trunk/test/tools/llvm-objdump/Inputs/section.macho-armv7
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: llvm/trunk/test/tools/llvm-objdump/macho-sections.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/macho-sections.test?rev=267807&r1=267806&r2=267807&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objdump/macho-sections.test (original)
+++ llvm/trunk/test/tools/llvm-objdump/macho-sections.test Wed Apr 27 17:36:18 2016
@@ -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
Modified: llvm/trunk/tools/llvm-objdump/MachODump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/MachODump.cpp?rev=267807&r1=267806&r2=267807&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/MachODump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/MachODump.cpp Wed Apr 27 17:36:18 2016
@@ -1001,7 +1001,7 @@ static void DumpRawSectionContents(MachO
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) {
More information about the llvm-commits
mailing list