|
1 |
| -RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-i386 \ |
2 |
| -RUN: | FileCheck %s -check-prefix COFF-i386 |
3 |
| -RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-x86-64 \ |
4 |
| -RUN: | FileCheck %s -check-prefix COFF-x86-64 |
5 |
| -RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.elf-i386 \ |
6 |
| -RUN: | FileCheck %s -check-prefix ELF-i386 |
7 |
| -RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.elf-x86-64 \ |
8 |
| -RUN: | FileCheck %s -check-prefix ELF-x86-64 |
9 |
| - |
10 |
| -COFF-i386: file format COFF-i386 |
11 |
| -COFF-i386: Disassembly of section .text: |
12 |
| -COFF-i386: 0: 83 ec 0c subl $12, %esp |
13 |
| -COFF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) |
14 |
| -COFF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) |
15 |
| -COFF-i386: 12: e8 00 00 00 00 calll 0 |
16 |
| -COFF-i386: 17: e8 00 00 00 00 calll 0 |
17 |
| -COFF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax |
18 |
| -COFF-i386: 20: 83 c4 0c addl $12, %esp |
19 |
| -COFF-i386: 23: c3 ret |
20 |
| - |
21 |
| -COFF-x86-64: file format COFF-x86-64 |
22 |
| -COFF-x86-64: Disassembly of section .text: |
23 |
| -COFF-x86-64: 0: 48 83 ec 28 subq $40, %rsp |
24 |
| -COFF-x86-64: 4: c7 44 24 24 00 00 00 00 movl $0, 36(%rsp) |
25 |
| -COFF-x86-64: c: 48 8d 0d 00 00 00 00 leaq (%rip), %rcx |
26 |
| -COFF-x86-64: 13: e8 00 00 00 00 callq 0 |
27 |
| -COFF-x86-64: 18: e8 00 00 00 00 callq 0 |
28 |
| -COFF-x86-64: 1d: 8b 44 24 24 movl 36(%rsp), %eax |
29 |
| -COFF-x86-64: 21: 48 83 c4 28 addq $40, %rsp |
30 |
| -COFF-x86-64: 25: c3 ret |
31 |
| - |
32 |
| - |
33 |
| -ELF-i386: file format ELF32-i386 |
34 |
| -ELF-i386: Disassembly of section .text: |
35 |
| -ELF-i386: 0: 83 ec 0c subl $12, %esp |
36 |
| -ELF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) |
37 |
| -ELF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) |
38 |
| -ELF-i386: 12: e8 fc ff ff ff calll -4 |
39 |
| -ELF-i386: 17: e8 fc ff ff ff calll -4 |
40 |
| -ELF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax |
41 |
| -ELF-i386: 20: 83 c4 0c addl $12, %esp |
42 |
| -ELF-i386: 23: c3 ret |
43 |
| - |
44 |
| -ELF-x86-64: file format ELF64-x86-64 |
45 |
| -ELF-x86-64: Disassembly of section .text: |
46 |
| -ELF-x86-64: 0: 48 83 ec 08 subq $8, %rsp |
47 |
| -ELF-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp) |
48 |
| -ELF-x86-64: c: bf 00 00 00 00 movl $0, %edi |
49 |
| -ELF-x86-64: 11: e8 00 00 00 00 callq 0 |
50 |
| -ELF-x86-64: 16: 30 c0 xorb %al, %al |
51 |
| -ELF-x86-64: 18: e8 00 00 00 00 callq 0 |
52 |
| -ELF-x86-64: 1d: 8b 44 24 04 movl 4(%rsp), %eax |
53 |
| -ELF-x86-64: 21: 48 83 c4 08 addq $8, %rsp |
54 |
| -ELF-x86-64: 25: c3 ret |
| 1 | +# RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-i386 \ |
| 2 | +# RUN: | FileCheck %s -check-prefix COFF-i386 |
| 3 | + |
| 4 | +# COFF-i386: file format COFF-i386 |
| 5 | +# COFF-i386: Disassembly of section .text: |
| 6 | +# COFF-i386: 0: 83 ec 0c subl $12, %esp |
| 7 | +# COFF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) |
| 8 | +# COFF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) |
| 9 | +# COFF-i386: 12: e8 00 00 00 00 calll 0 |
| 10 | +# COFF-i386: 17: e8 00 00 00 00 calll 0 |
| 11 | +# COFF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax |
| 12 | +# COFF-i386: 20: 83 c4 0c addl $12, %esp |
| 13 | +# COFF-i386: 23: c3 ret |
| 14 | + |
| 15 | +# RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-x86-64 \ |
| 16 | +# RUN: | FileCheck %s -check-prefix COFF-x86-64 |
| 17 | + |
| 18 | +# COFF-x86-64: file format COFF-x86-64 |
| 19 | +# COFF-x86-64: Disassembly of section .text: |
| 20 | +# COFF-x86-64: 0: 48 83 ec 28 subq $40, %rsp |
| 21 | +# COFF-x86-64: 4: c7 44 24 24 00 00 00 00 movl $0, 36(%rsp) |
| 22 | +# COFF-x86-64: c: 48 8d 0d 00 00 00 00 leaq (%rip), %rcx |
| 23 | +# COFF-x86-64: 13: e8 00 00 00 00 callq 0 |
| 24 | +# COFF-x86-64: 18: e8 00 00 00 00 callq 0 |
| 25 | +# COFF-x86-64: 1d: 8b 44 24 24 movl 36(%rsp), %eax |
| 26 | +# COFF-x86-64: 21: 48 83 c4 28 addq $40, %rsp |
| 27 | +# COFF-x86-64: 25: c3 ret |
| 28 | + |
| 29 | +# RUN: yaml2obj -docnum=1 %s > %t.elf-i386 |
| 30 | +# RUN: llvm-objdump -d %t.elf-i386 | FileCheck %s -check-prefix ELF-i386 |
| 31 | + |
| 32 | +# ELF-i386: file format ELF32-i386 |
| 33 | +# ELF-i386: Disassembly of section .text: |
| 34 | +# ELF-i386: 0: 83 ec 0c subl $12, %esp |
| 35 | +# ELF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) |
| 36 | +# ELF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) |
| 37 | +# ELF-i386: 12: e8 fc ff ff ff calll -4 |
| 38 | +# ELF-i386: 17: e8 fc ff ff ff calll -4 |
| 39 | +# ELF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax |
| 40 | +# ELF-i386: 20: 83 c4 0c addl $12, %esp |
| 41 | +# ELF-i386: 23: c3 ret |
| 42 | + |
| 43 | +--- !ELF |
| 44 | +FileHeader: |
| 45 | + Class: ELFCLASS32 |
| 46 | + Data: ELFDATA2LSB |
| 47 | + Type: ET_REL |
| 48 | + Machine: EM_386 |
| 49 | +Sections: |
| 50 | + - Name: .text |
| 51 | + Type: SHT_PROGBITS |
| 52 | + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] |
| 53 | + Content: 83EC0CC744240800000000C7042400000000E8FCFFFFFFE8FCFFFFFF8B44240883C40CC3 |
| 54 | + |
| 55 | +# RUN: yaml2obj -docnum=2 %s > %t.elf-x86-64 |
| 56 | +# RUN: llvm-objdump -d %t.elf-x86-64 | FileCheck %s -check-prefix ELF-x86-64 |
| 57 | + |
| 58 | +# ELF-x86-64: file format ELF64-x86-64 |
| 59 | +# ELF-x86-64: Disassembly of section .text: |
| 60 | +# ELF-x86-64: 0: 48 83 ec 08 subq $8, %rsp |
| 61 | +# ELF-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp) |
| 62 | +# ELF-x86-64: c: bf 00 00 00 00 movl $0, %edi |
| 63 | +# ELF-x86-64: 11: e8 00 00 00 00 callq 0 |
| 64 | +# ELF-x86-64: 16: 30 c0 xorb %al, %al |
| 65 | +# ELF-x86-64: 18: e8 00 00 00 00 callq 0 |
| 66 | +# ELF-x86-64: 1d: 8b 44 24 04 movl 4(%rsp), %eax |
| 67 | +# ELF-x86-64: 21: 48 83 c4 08 addq $8, %rsp |
| 68 | +# ELF-x86-64: 25: c3 ret |
| 69 | + |
| 70 | +--- !ELF |
| 71 | +FileHeader: |
| 72 | + Class: ELFCLASS64 |
| 73 | + Data: ELFDATA2LSB |
| 74 | + Type: ET_REL |
| 75 | + Machine: EM_X86_64 |
| 76 | +Sections: |
| 77 | + - Name: .text |
| 78 | + Type: SHT_PROGBITS |
| 79 | + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] |
| 80 | + Content: 4883EC08C744240400000000BF00000000E80000000030C0E8000000008B4424044883C408C3 |
0 commit comments