diff options
author | Kevin Enderby <enderby@apple.com> | 2014-12-04 23:56:27 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2014-12-04 23:56:27 +0000 |
commit | ef3ad2ff3212838e3cbb2eda5a1d1c98b327cc88 (patch) | |
tree | 00f057f7de3fbe5862586c386077f2cdf82ad05e /llvm/test/tools/llvm-objdump | |
parent | 24ebb93da175d023057ec1b10da24eae4cd2701b (diff) | |
download | bcm5719-llvm-ef3ad2ff3212838e3cbb2eda5a1d1c98b327cc88.tar.gz bcm5719-llvm-ef3ad2ff3212838e3cbb2eda5a1d1c98b327cc88.zip |
Re-add support to llvm-objdump for Mach-O universal files and archives with -macho
with fixes. Includes the move of tests for llvm-objdump for universal files to an X86
directory. And the fix where it was failing on linux Rafael tracked down with asan.
I had both Jim Grosbach and Adam Hemet look over the second fix since I could not
set up asan to reproduce with the old version but not with the fix.
llvm-svn: 223416
Diffstat (limited to 'llvm/test/tools/llvm-objdump')
-rw-r--r-- | llvm/test/tools/llvm-objdump/X86/Inputs/macho-universal-archive.x86_64.i386 | bin | 0 -> 1656 bytes | |||
-rwxr-xr-x | llvm/test/tools/llvm-objdump/X86/Inputs/macho-universal.x86_64.i386 | bin | 0 -> 16624 bytes | |||
-rw-r--r-- | llvm/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test | 25 |
3 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objdump/X86/Inputs/macho-universal-archive.x86_64.i386 b/llvm/test/tools/llvm-objdump/X86/Inputs/macho-universal-archive.x86_64.i386 Binary files differnew file mode 100644 index 00000000000..1660714c68e --- /dev/null +++ b/llvm/test/tools/llvm-objdump/X86/Inputs/macho-universal-archive.x86_64.i386 diff --git a/llvm/test/tools/llvm-objdump/X86/Inputs/macho-universal.x86_64.i386 b/llvm/test/tools/llvm-objdump/X86/Inputs/macho-universal.x86_64.i386 Binary files differnew file mode 100755 index 00000000000..36d5fc29d68 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/X86/Inputs/macho-universal.x86_64.i386 diff --git a/llvm/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test b/llvm/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test new file mode 100644 index 00000000000..9f1b51365d9 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test @@ -0,0 +1,25 @@ +RUN: llvm-objdump %p/Inputs/macho-universal.x86_64.i386 -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex -arch all \ +RUN: | FileCheck %s -check-prefix UEXE-all +RUN: llvm-objdump %p/Inputs/macho-universal-archive.x86_64.i386 -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex -arch i386 \ +RUN: | FileCheck %s -check-prefix UArchive-i386 + +UEXE-all: macho-universal.x86_64.i386 (architecture x86_64): +UEXE-all: (__TEXT,__text) section +UEXE-all: _main: +UEXE-all: 0000000100000f60 pushq %rbp +UEXE-all: 0000000100000f61 movq %rsp, %rbp +UEXE-all: macho-universal.x86_64.i386 (architecture i386): +UEXE-all: (__TEXT,__text) section +UEXE-all: _main: +UEXE-all: 00001fa0 pushl %ebp +UEXE-all: 00001fa1 movl %esp, %ebp + +UArchive-i386: Archive : {{.*}}/macho-universal-archive.x86_64.i386 +UArchive-i386: macho-universal-archive.x86_64.i386(foo.o): +UArchive-i386: (__TEXT,__text) section +UArchive-i386: _foo: +UArchive-i386: 00000000 pushl %ebp +UArchive-i386: 00000001 movl %esp, %ebp +UArchive-i386: 00000003 popl %ebp +UArchive-i386: 00000004 retl + |