4 # RUN: yaml2obj --docnum=1 %s -o %t/1.o
5 # RUN: yaml2obj --docnum=2 %s -o %t/2.o
6 # RUN: yaml2obj --docnum=3 %s -o %t/3.o
7 # RUN: llvm-ar rcT %t.a %t/1.o %t/2.o %t/3.o
9 # Test that basic dumping works for all members.
10 # RUN: llvm-readobj --all %t.a | FileCheck %s --check-prefixes=LLVM,COFF
11 # RUN: llvm-readelf --all %t.a | FileCheck %s --check-prefixes=GNU,COFF
13 # LLVM: File: {{.*}}1.o
14 # LLVM: Format: elf64-x86-64
16 # LLVM: SectionHeaderCount: 3
22 # GNU: Number of section headers: 3
23 # GNU: Section Headers:
25 # LLVM: File: {{.*}}2.o
26 # LLVM: Format: elf32-i386
28 # LLVM: SectionHeaderCount: 4
34 # GNU: Number of section headers: 4
35 # GNU: Section Headers:
37 # LLVM: File: {{.*}}3.o
38 # LLVM: Format: COFF-ARM
39 # COFF: ImageFileHeader {
44 # Overwrite one of the members with a member of a different size to show that
45 # the size field in the member header is not relevant.
47 # RUN: cp %t/1.o %t/2.o
48 # RUN: llvm-readobj --file-headers %t.a | FileCheck %s --check-prefix=RESIZED
50 # RESIZED: File: {{.*}}1.o
51 # RESIZED: Format: elf64-x86-64
52 # RESIZED: File: {{.*}}2.o
53 # RESIZED: Format: elf64-x86-64
55 # Remove the second member and show that the first can still be dumped, but that the last isn't.
57 # RUN: not llvm-readobj --file-headers %t.a 2> %t.err | FileCheck %s --check-prefix=MISSING
58 # RUN: FileCheck -DMSG=%errc_ENOENT %s --check-prefix=ERR --input-file=%t.err
60 # MISSING: File: {{.*}}1.o
61 # MISSING: Format: elf64-x86-64
62 # MISSING-NOT: File: {{.*}}3.o
63 # ERR: error: '{{.*}}.a': '{{.*}}2.o': [[MSG]]
84 Machine: IMAGE_FILE_MACHINE_ARMNT