From 54154f3bf1ae3d2dfd68cc9474cad061b3338a40 Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Thu, 6 Jun 2013 17:20:50 +0000 Subject: Teach llvm-objdump with the -macho parser how to use the data in code table from the LC_DATA_IN_CODE load command. And when disassembling print the data in code formatted for the kind of data it and not disassemble those bytes. I added the format specific functionality to the derived class MachOObjectFile since these tables only appears in Mach-O object files. This is my first attempt to modify the libObject stuff so if folks have better suggestions how to fit this in or suggestions on the implementation please let me know. rdar://11791371 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183424 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Object/Inputs/macho-data-in-code.macho-thumbv7 | Bin 0 -> 680 bytes test/Object/X86/macho-data-in-code.test | 7 +++++++ 2 files changed, 7 insertions(+) create mode 100644 test/Object/Inputs/macho-data-in-code.macho-thumbv7 create mode 100644 test/Object/X86/macho-data-in-code.test (limited to 'test') diff --git a/test/Object/Inputs/macho-data-in-code.macho-thumbv7 b/test/Object/Inputs/macho-data-in-code.macho-thumbv7 new file mode 100644 index 0000000..5764930 Binary files /dev/null and b/test/Object/Inputs/macho-data-in-code.macho-thumbv7 differ diff --git a/test/Object/X86/macho-data-in-code.test b/test/Object/X86/macho-data-in-code.test new file mode 100644 index 0000000..dca084c --- /dev/null +++ b/test/Object/X86/macho-data-in-code.test @@ -0,0 +1,7 @@ +RUN: llvm-objdump -triple thumbv7-apple-iOS -disassemble %p/../Inputs/macho-data-in-code.macho-thumbv7 -macho | FileCheck %s + +CHECK: 12: 80 bd pop {r7, pc} + +CHECK: 14: 38 00 00 00 .long 56 @ KIND_DATA +CHECK: 16: 00 00 movs r0, r0 + -- cgit v1.1