1 Verify that llvm-ar uses COFF archive format by ensuring that archive map is sorted.
3 RUN: rm -rf %t.dir && split-file %s %t.dir && cd %t.dir
5 RUN: yaml2obj coff-symtab.yaml -o coff-symtab.obj
6 RUN: llvm-ar crs out.a coff-symtab.obj
7 RUN: llvm-nm --print-armap out.a | FileCheck %s
9 RUN: llvm-as coff-symtab.ll -o coff-symtab.bc
10 RUN: llvm-ar crs out2.a coff-symtab.bc
11 RUN: llvm-nm --print-armap out2.a | FileCheck %s
13 RUN: yaml2obj elf.yaml -o coff-symtab.o
14 RUN: llvm-ar crs --format coff out3.a coff-symtab.o
15 RUN: llvm-nm --print-armap out3.a | FileCheck %s
17 Create an empty archive with no symbol map, add a COFF file to it and check that the output archive is a COFF archive.
19 RUN: llvm-ar --format coff rcS out4.a
20 RUN: llvm-ar rs out4.a coff-symtab.obj
21 RUN: llvm-nm --print-armap out4.a | FileCheck %s
24 CHECK-NEXT: a in coff-symtab
25 CHECK-NEXT: b in coff-symtab
26 CHECK-NEXT: c in coff-symtab
32 Machine: IMAGE_FILE_MACHINE_UNKNOWN
36 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
43 SimpleType: IMAGE_SYM_TYPE_NULL
44 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
45 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
49 SimpleType: IMAGE_SYM_TYPE_NULL
50 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
51 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
55 SimpleType: IMAGE_SYM_TYPE_NULL
56 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
57 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
62 target triple = "x86_64-unknown-windows-msvc"
64 define void @b() { ret void }
65 define void @c() { ret void }
66 define void @a() { ret void }
78 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
79 AddressAlign: 0x0000000000000004