Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/tools/llvm-objdump/X86/disassemble-no-section.test
## This test checks -d disassembles an ELF file without section headers. | ## This test checks -d disassembles an ELF file without section headers. | ||||
## Such files include kcore files extracted by linux perf tools, or | ## Such files include kcore files extracted by linux perf tools, or | ||||
## executables with section headers stripped by e.g. | ## executables with section headers stripped by e.g. | ||||
## llvm-strip --strip-sections. | ## llvm-strip --strip-sections. | ||||
# RUN: yaml2obj %s -o %t | # RUN: yaml2obj %s -o %t | ||||
# RUN: llvm-objdump -d %t | FileCheck %s | # RUN: llvm-objdump -d %t | FileCheck %s | ||||
# CHECK: Disassembly of section : | # CHECK: Disassembly of section PT_LOAD#0: | ||||
# CHECK-EMPTY: | # CHECK-EMPTY: | ||||
# CHECK-NEXT: <>: | # CHECK-NEXT: <PT_LOAD#0>: | ||||
# CHECK-NEXT: 55 pushq %rbp | # CHECK-NEXT: 55 pushq %rbp | ||||
# CHECK-NEXT: 48 89 e5 movq %rsp, %rbp | # CHECK-NEXT: 48 89 e5 movq %rsp, %rbp | ||||
# CHECK-NEXT: 0f 1f 40 00 nopl (%rax) | # CHECK-NEXT: 0f 1f 40 00 nopl (%rax) | ||||
# CHECK-NEXT: 5d popq %rbp | # CHECK-NEXT: 5d popq %rbp | ||||
# CHECK-NEXT: c3 retq | # CHECK-NEXT: c3 retq | ||||
## Check disassembly with an address range. | ## Check disassembly with an address range. | ||||
# RUN: llvm-objdump -d --start-address=0xffffffff00000000 \ | # RUN: llvm-objdump -d --start-address=0xffffffff00000000 \ | ||||
# RUN: --stop-address=0xffffffff00000004 %t 2>&1 | \ | # RUN: --stop-address=0xffffffff00000004 %t 2>&1 | \ | ||||
# RUN: FileCheck %s --check-prefix RANGE | # RUN: FileCheck %s --check-prefix RANGE | ||||
# RANGE: no section overlaps the range | # RANGE: no section overlaps the range | ||||
# RANGE-EMPTY: | # RANGE-EMPTY: | ||||
# RANGE-NEXT: Disassembly of section : | # RANGE-NEXT: Disassembly of section PT_LOAD#0: | ||||
# RANGE-EMPTY: | # RANGE-EMPTY: | ||||
# RANGE-NEXT: <>: | # RANGE-NEXT: <PT_LOAD#0>: | ||||
# RANGE-NEXT: 55 pushq %rbp | # RANGE-NEXT: 55 pushq %rbp | ||||
# RANGE-NEXT: 48 89 e5 movq %rsp, %rbp | # RANGE-NEXT: 48 89 e5 movq %rsp, %rbp | ||||
# RANGE-EMPTY: | # RANGE-EMPTY: | ||||
!ELF | !ELF | ||||
FileHeader: | FileHeader: | ||||
Class: ELFCLASS64 | Class: ELFCLASS64 | ||||
Data: ELFDATA2LSB | Data: ELFDATA2LSB | ||||
Show All 16 Lines |