blob: 667bce95f229ba302a05160197ff08207047c84f [file] [log] [blame]
Ahmed Bougacha2c94d0f2013-05-24 00:39:57 +00001RUN: llvm-objdump -d -symbolize %p/../Inputs/trivial-object-test.elf-x86-64 \
2RUN: | FileCheck %s -check-prefix ELF-x86-64
3RUN: llvm-objdump -d -symbolize %p/../Inputs/trivial-object-test.macho-x86-64 \
4RUN: | FileCheck %s -check-prefix MACHO-x86-64
5
6ELF-x86-64: file format ELF64-x86-64
7ELF-x86-64: Disassembly of section .text:
8ELF-x86-64: main:
9ELF-x86-64: 0: 48 83 ec 08 subq $8, %rsp
10ELF-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp)
11ELF-x86-64: c: bf 00 00 00 00 movl $.rodata.str1.1, %edi
12ELF-x86-64: 11: e8 00 00 00 00 callq puts-4
13ELF-x86-64: 16: 30 c0 xorb %al, %al
14ELF-x86-64: 18: e8 00 00 00 00 callq SomeOtherFunction-4
15ELF-x86-64: 1d: 8b 44 24 04 movl 4(%rsp), %eax
16ELF-x86-64: 21: 48 83 c4 08 addq $8, %rsp
17ELF-x86-64: 25: c3 ret
18
19MACHO-x86-64: file format Mach-O 64-bit x86-64
20MACHO-x86-64: Disassembly of section __TEXT,__text:
21MACHO-x86-64: _main:
22MACHO-x86-64: 0: 48 83 ec 08 subq $8, %rsp
23MACHO-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp)
24MACHO-x86-64: c: 48 8d 3d 00 00 00 00 leaq L_.str(%rip), %rdi ## literal pool for: Hello World!
25MACHO-x86-64: 13: e8 00 00 00 00 callq _puts
26MACHO-x86-64: 18: 30 c0 xorb %al, %al
27MACHO-x86-64: 1a: e8 00 00 00 00 callq _SomeOtherFunction
28MACHO-x86-64: 1f: 8b 44 24 04 movl 4(%rsp), %eax
29MACHO-x86-64: 23: 48 83 c4 08 addq $8, %rsp
30MACHO-x86-64: 27: c3 ret