1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-objdump --all-headers %t | FileCheck %s
3 # RUN: llvm-objdump -x %t | FileCheck %s
5 ## Note: --all-headers (-x) is an alias for --archive-headers --file-headers
6 ## --section-headers --private-headers --reloc --syms (-afhprt). Test for them
7 ## in the following order which provides GNU objdump compatability.
9 # CHECK: file format elf64-x86-64
10 # CHECK-NEXT: architecture: x86_64
11 # CHECK-NEXT: start address: 0x0000000000000000
13 # CHECK-NEXT: Program Header:
15 # CHECK-NEXT: Dynamic Section:
18 # CHECK-NEXT: Sections:
19 # CHECK: 6 .shstrtab 0000002e 0000000000000000
21 # CHECK-NEXT: SYMBOL TABLE:
22 # CHECK-NEXT: 0000000000000000 l .text 0000000000000000 foo
24 # CHECK-NEXT: RELOCATION RECORDS FOR [.text]:
26 ## Check how we dump the archives.
27 ## Check we dump the appropriate headers for each file in the archive.
31 # RUN: llvm-ar rcs %t.a %t %t2
32 # RUN: llvm-objdump --all-headers %t.a | FileCheck %s --check-prefix=ARCHIVE
34 # ARCHIVE: {{.*}}.a({{.*}}): file format elf64-x86-64
36 # ARCHIVE: architecture: x86_64
37 # ARCHIVE: start address: 0x0000000000000000
38 # ARCHIVE: Program Header:
39 # ARCHIVE: Dynamic Section:
41 # ARCHIVE: SYMBOL TABLE:
42 # ARCHIVE: RELOCATION RECORDS FOR [.text]:
43 # ARCHIVE: {{.*}}.a({{.*}}2): file format elf64-x86-64
45 # ARCHIVE: architecture: x86_64
46 # ARCHIVE: start address: 0x0000000000000000
47 # ARCHIVE: Program Header:
48 # ARCHIVE: Dynamic Section:
50 # ARCHIVE: SYMBOL TABLE:
51 # ARCHIVE: RELOCATION RECORDS FOR [.text]:
71 Flags: [ SHF_WRITE, SHF_ALLOC ]
72 EntSize: 0x0000000000000010
75 Value: 0x00000000000006A0
77 Value: 0x0000000000000000