1 # RUN: yaml2obj %s -o %t
4 # RUN: llvm-ar crs %t.a %t
5 # RUN: cp %t.a %t.copy.a
6 # RUN: llvm-objcopy %t.a %t2.a
7 # RUN: llvm-objcopy %t %t2
8 # RUN: llvm-ar p %t2.a > %t3
11 # RUN: llvm-readobj --sections %t2 | FileCheck %s
12 # RUN: llvm-nm --print-armap %t.a | FileCheck --check-prefix=INDEX-TABLE %s
13 # RUN: llvm-nm --print-armap %t2.a | FileCheck --check-prefix=INDEX-TABLE %s
14 # Verify that llvm-objcopy has not modifed the input.
15 # RUN: cmp %t.copy.a %t.a
17 # INDEX-TABLE: Archive map
18 # INDEX-TABLE-NEXT: foo in
20 # RUN: rm -f %t.no.index.a
21 # RUN: llvm-ar crS %t.no.index.a %t
22 # RUN: llvm-objcopy %t.no.index.a %t2.no.index.a
23 # RUN: llvm-ar p %t2.no.index.a > %t4
25 # RUN: llvm-nm --print-armap %t.no.index.a | FileCheck --check-prefix=NO-INDEX-TABLE %s
26 # RUN: llvm-nm --print-armap %t2.no.index.a | FileCheck --check-prefix=NO-INDEX-TABLE %s
29 # NO-INDEX-TABLE-NOT: Archive map
30 # NO-INDEX-TABLE-NOT: foo in
42 AddressAlign: 0x0000000000000010
46 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
47 AddressAlign: 0x0000000000000010
56 # CHECK: Type: SHT_NULL
59 # CHECK-NEXT: Type: SHT_NOBITS
61 # CHECK-NEXT: SHF_ALLOC
63 # CHECK-NEXT: Address:
65 # CHECK-NEXT: Size: 64
68 # CHECK-NEXT: Type: SHT_PROGBITS
70 # CHECK-NEXT: SHF_ALLOC
71 # CHECK-NEXT: SHF_EXECINSTR
73 # CHECK-NEXT: Address:
77 # CHECK: Name: .symtab
78 # CHECK-NEXT: Type: SHT_SYMTAB
79 # CHECK-NEXT: Flags [ (0x0)
81 # CHECK-NEXT: Address:
83 # CHECK-NEXT: Size: 48
85 # CHECK: Name: .strtab
86 # CHECK-NEXT: Type: SHT_STRTAB
87 # CHECK-NEXT: Flags [ (0x0)
89 # CHECK-NEXT: Address:
93 # CHECK: Name: .shstrtab
94 # CHECK-NEXT: Type: SHT_STRTAB
97 # CHECK-NEXT: Address:
99 # CHECK-NEXT: Size: 38