1 RUN: llvm-objdump -d -symbolize %p/../Inputs/trivial-object-test.elf-x86-64 \ 2 RUN: | FileCheck %s -check-prefix ELF-x86-64 3 RUN: llvm-objdump -d -symbolize %p/../Inputs/trivial-object-test.macho-x86-64 \ 4 RUN: | FileCheck %s -check-prefix MACHO-x86-64 5 6 # Generate this using: 7 # ld trivial-object-test.macho-x86-64 -undefined dynamic_lookup 8 RUN: llvm-objdump -d -symbolize %p/../Inputs/trivial-executable-test.macho-x86-64 \ 9 RUN: | FileCheck %s -check-prefix MACHO-STUBS-x86-64 10 11 ELF-x86-64: file format ELF64-x86-64 12 ELF-x86-64: Disassembly of section .text: 13 ELF-x86-64: main: 14 ELF-x86-64: 0: 48 83 ec 08 subq $8, %rsp 15 ELF-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp) 16 ELF-x86-64: c: bf 00 00 00 00 movl $.rodata.str1.1, %edi 17 ELF-x86-64: 11: e8 00 00 00 00 callq puts-4 18 ELF-x86-64: 16: 30 c0 xorb %al, %al 19 ELF-x86-64: 18: e8 00 00 00 00 callq SomeOtherFunction-4 20 ELF-x86-64: 1d: 8b 44 24 04 movl 4(%rsp), %eax 21 ELF-x86-64: 21: 48 83 c4 08 addq $8, %rsp 22 ELF-x86-64: 25: c3 ret 23 24 MACHO-x86-64: file format Mach-O 64-bit x86-64 25 MACHO-x86-64: Disassembly of section __TEXT,__text: 26 MACHO-x86-64: _main: 27 MACHO-x86-64: 0: 48 83 ec 08 subq $8, %rsp 28 MACHO-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp) 29 MACHO-x86-64: c: 48 8d 3d 00 00 00 00 leaq L_.str(%rip), %rdi ## literal pool for: Hello World! 30 MACHO-x86-64: 13: e8 00 00 00 00 callq _puts 31 MACHO-x86-64: 18: 30 c0 xorb %al, %al 32 MACHO-x86-64: 1a: e8 00 00 00 00 callq _SomeOtherFunction 33 MACHO-x86-64: 1f: 8b 44 24 04 movl 4(%rsp), %eax 34 MACHO-x86-64: 23: 48 83 c4 08 addq $8, %rsp 35 MACHO-x86-64: 27: c3 ret 36 37 MACHO-STUBS-x86-64: file format Mach-O 64-bit x86-64 38 MACHO-STUBS-x86-64: Disassembly of section __TEXT,__text: 39 MACHO-STUBS-x86-64: _main: 40 MACHO-STUBS-x86-64: 1f90: 48 83 ec 08 subq $8, %rsp 41 MACHO-STUBS-x86-64: 1f94: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp) 42 MACHO-STUBS-x86-64: 1f9c: 48 8d 3d 45 00 00 00 leaq 69(%rip), %rdi ## literal pool for: Hello World! 43 MACHO-STUBS-x86-64: 1fa3: e8 16 00 00 00 callq puts 44 MACHO-STUBS-x86-64: 1fa8: 30 c0 xorb %al, %al 45 MACHO-STUBS-x86-64: 1faa: e8 09 00 00 00 callq SomeOtherFunction 46 MACHO-STUBS-x86-64: 1faf: 8b 44 24 04 movl 4(%rsp), %eax 47 MACHO-STUBS-x86-64: 1fb3: 48 83 c4 08 addq $8, %rsp 48 MACHO-STUBS-x86-64: 1fb7: c3 ret 49 50 51 RUN: llvm-objdump -d -symbolize %p/../Inputs/relocation-relocatable.elf-i386 \ 52 RUN: | FileCheck %s -check-prefix ELF-i386-REL 53 54 ELF-i386-REL: Disassembly of section .text: 55 ELF-i386-REL-NEXT: f: 56 ELF-i386-REL-NEXT: 0: e9 fc ff ff ff jmp h 57 ELF-i386-REL: g: 58 ELF-i386-REL-NEXT: 5: e9 fc ff ff ff jmp f 59 60 61 RUN: llvm-objdump -d -symbolize %p/../Inputs/relocation-dynamic.elf-i386 \ 62 RUN: | FileCheck %s -check-prefix ELF-i386-DYN 63 64 ELF-i386-DYN: Disassembly of section .text: 65 ELF-i386-DYN-NEXT: f: 66 ELF-i386-DYN-NEXT: 1a4: e9 fc ff ff ff jmp h 67 ELF-i386-DYN: g: 68 ELF-i386-DYN-NEXT: 1a9: e9 fc ff ff ff jmp f 69