blob: 858653e95ebc088d17ac458506d51c5fb459f478 [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
Ahmed Bougacha9bfc0622013-08-21 07:28:13 +00006# Generate this using:
7# ld trivial-object-test.macho-x86-64 -undefined dynamic_lookup
8RUN: llvm-objdump -d -symbolize %p/../Inputs/trivial-executable-test.macho-x86-64 \
9RUN: | FileCheck %s -check-prefix MACHO-STUBS-x86-64
10
Ahmed Bougacha2c94d0f2013-05-24 00:39:57 +000011ELF-x86-64: file format ELF64-x86-64
12ELF-x86-64: Disassembly of section .text:
13ELF-x86-64: main:
14ELF-x86-64: 0: 48 83 ec 08 subq $8, %rsp
15ELF-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp)
16ELF-x86-64: c: bf 00 00 00 00 movl $.rodata.str1.1, %edi
17ELF-x86-64: 11: e8 00 00 00 00 callq puts-4
18ELF-x86-64: 16: 30 c0 xorb %al, %al
19ELF-x86-64: 18: e8 00 00 00 00 callq SomeOtherFunction-4
20ELF-x86-64: 1d: 8b 44 24 04 movl 4(%rsp), %eax
21ELF-x86-64: 21: 48 83 c4 08 addq $8, %rsp
22ELF-x86-64: 25: c3 ret
23
24MACHO-x86-64: file format Mach-O 64-bit x86-64
25MACHO-x86-64: Disassembly of section __TEXT,__text:
26MACHO-x86-64: _main:
27MACHO-x86-64: 0: 48 83 ec 08 subq $8, %rsp
28MACHO-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp)
29MACHO-x86-64: c: 48 8d 3d 00 00 00 00 leaq L_.str(%rip), %rdi ## literal pool for: Hello World!
30MACHO-x86-64: 13: e8 00 00 00 00 callq _puts
31MACHO-x86-64: 18: 30 c0 xorb %al, %al
32MACHO-x86-64: 1a: e8 00 00 00 00 callq _SomeOtherFunction
33MACHO-x86-64: 1f: 8b 44 24 04 movl 4(%rsp), %eax
34MACHO-x86-64: 23: 48 83 c4 08 addq $8, %rsp
35MACHO-x86-64: 27: c3 ret
Ahmed Bougacha9bfc0622013-08-21 07:28:13 +000036
37MACHO-STUBS-x86-64: file format Mach-O 64-bit x86-64
38MACHO-STUBS-x86-64: Disassembly of section __TEXT,__text:
39MACHO-STUBS-x86-64: _main:
40MACHO-STUBS-x86-64: 1f90: 48 83 ec 08 subq $8, %rsp
41MACHO-STUBS-x86-64: 1f94: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp)
42MACHO-STUBS-x86-64: 1f9c: 48 8d 3d 45 00 00 00 leaq 69(%rip), %rdi ## literal pool for: Hello World!
43MACHO-STUBS-x86-64: 1fa3: e8 16 00 00 00 callq puts
44MACHO-STUBS-x86-64: 1fa8: 30 c0 xorb %al, %al
45MACHO-STUBS-x86-64: 1faa: e8 09 00 00 00 callq SomeOtherFunction
46MACHO-STUBS-x86-64: 1faf: 8b 44 24 04 movl 4(%rsp), %eax
47MACHO-STUBS-x86-64: 1fb3: 48 83 c4 08 addq $8, %rsp
48MACHO-STUBS-x86-64: 1fb7: c3 ret