54 lines · plain
1## Show that disassembly is printed correctly, for only the desired sections.2# RUN: yaml2obj %s -o %t.o3# RUN: llvm-objdump %t.o -d | FileCheck %s --implicit-check-not=Disassembly4# RUN: llvm-objdump %t.o --disassemble-all | FileCheck %s --check-prefixes=CHECK,ALL5 6## Show that disassembly is enabled by default for --traceback-table, even for non-XCOFF objects.7# RUN: llvm-objdump %t.o --traceback-table | FileCheck %s --implicit-check-not=Disassembly8 9# CHECK: Disassembly of section .executable:10# CHECK-EMPTY:11# CHECK-NEXT: 0000000000001000 <.executable>:12# CHECK-NEXT: 0: 90 nop13# ALL-EMPTY:14# ALL-NEXT: Disassembly of section .writable:15# ALL-EMPTY:16# ALL-NEXT: 0000000000002000 <.writable>:17# ALL-NEXT: 0: c3 retq18# ALL-EMPTY:19# ALL-NEXT: Disassembly of section .readonly:20# ALL-EMPTY:21# ALL-NEXT: 0000000000003000 <.readonly>:22# ALL-NEXT: 0: 01 00 addl %eax, (%rax)23# ALL-EMPTY:24# ALL-NEXT: Disassembly of section .nobits:25# ALL-EMPTY:26# ALL-NEXT: 0000000000004000 <.nobits>:27# ALL-NEXT: ...28 29--- !ELF30FileHeader:31 Class: ELFCLASS6432 Data: ELFDATA2LSB33 Type: ET_REL34 Machine: EM_X86_6435Sections:36 - Name: .executable37 Type: SHT_PROGBITS38 Address: 0x100039 Flags: [SHF_EXECINSTR]40 Content: '90'41 - Name: .writable42 Type: SHT_PROGBITS43 Address: 0x200044 Flags: [SHF_WRITE]45 Content: 'c3'46 - Name: .readonly47 Type: SHT_PROGBITS48 Address: 0x300049 Content: '0100'50 - Name: .nobits51 Type: SHT_NOBITS52 Address: 0x400053 Size: 454