1 ## This is a test for --headers and its alias -e.
2 ## Specifying --headers is equivalent to setting --file-headers,
3 ## --program-headers and --section-headers at the same time.
4 ## We test these options independently, so here we just check
5 ## that --headers triggers them.
7 # RUN: yaml2obj %s -o %t
9 ## Case A: test llvm-readelf output.
10 # RUN: llvm-readelf --headers %t > %t.headers.gnu.txt
11 # RUN: FileCheck %s --input-file=%t.headers.gnu.txt --check-prefix=GNU
14 # GNU: Section Headers:
15 # GNU: Program Headers:
16 # GNU: Section to Segment mapping:
18 # RUN: llvm-readelf -e %t > %t.e.gnu.txt
19 # RUN: cmp %t.headers.gnu.txt %t.e.gnu.txt
21 # RUN: llvm-readelf --file-headers --program-headers --section-headers %t > %t.all.gnu.txt
22 # RUN: cmp %t.headers.gnu.txt %t.all.gnu.txt
24 ## Case B: test llvm-readobj output.
25 # RUN: llvm-readobj --headers %t > %t.headers.llvm.txt
26 # RUN: FileCheck %s --input-file=%t.headers.llvm.txt --check-prefix=LLVM
30 # LLVM: ProgramHeaders [
32 # RUN: llvm-readobj -e %t > %t.e.llvm.txt
33 # RUN: cmp %t.headers.llvm.txt %t.e.llvm.txt
35 # RUN: llvm-readobj --file-headers --program-headers --section-headers %t > %t.all.llvm.txt
36 # RUN: cmp %t.headers.llvm.txt %t.all.llvm.txt