Files
clang-p2996/llvm/test/tools/llvm-objdump/all-headers.test
James Henderson 2e0d0d377d [llvm-objdump]Improve testing of some switches #1
This is the first in a set of patches I have to improve testing of
llvm-objdump. This patch targets --all-headers, --section, and
--full-contents. In the --section case, it deletes a pre-canned binary
which is only used by the one test and replaces it with yaml.

Reviewed by: grimar, MaskRay

Differential Revision: https://reviews.llvm.org/D61941

llvm-svn: 360893
2019-05-16 13:28:36 +00:00

49 lines
1.3 KiB
Plaintext

# RUN: yaml2obj %s > %t
# RUN: llvm-objdump --all-headers %t | FileCheck %s
## Check we print file format, architecture and start address followed by the
## other data when using --all-headers.
# CHECK: file format ELF64-x86-64
# CHECK-EMPTY:
# CHECK-NEXT: architecture: x86_64
# CHECK-NEXT: start address: 0x0000000000000000
# CHECK-EMPTY:
# CHECK-NEXT: Sections:
# CHECK: SYMBOL TABLE:
# CHECK: Program Header:
# CHECK: Dynamic Section:
## Check how we dump the archives.
## Check we dump the appropriate headers for each file in the archive.
# RUN: cp %t %t2
# RUN: rm -f %t.a
# RUN: llvm-ar rcs %t.a %t %t2
# RUN: llvm-objdump --all-headers %t.a | FileCheck %s --check-prefix=ARCHIVE
# ARCHIVE: {{.*}}.a({{.*}}): file format ELF64-x86-64
# ARCHIVE: architecture: x86_64
# ARCHIVE: start address: 0x0000000000000000
# ARCHIVE: rw-r--r--
# ARCHIVE: Sections:
# ARCHIVE: SYMBOL TABLE:
# ARCHIVE: Program Header:
# ARCHIVE: Dynamic Section:
# ARCHIVE: {{.*}}.a({{.*}}2): file format ELF64-x86-64
# ARCHIVE: architecture: x86_64
# ARCHIVE: start address: 0x0000000000000000
# ARCHIVE: rw-r--r--
# ARCHIVE: Sections:
# ARCHIVE: SYMBOL TABLE:
# ARCHIVE: Program Header:
# ARCHIVE: Dynamic Section:
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections: