[AVX512] Add vpermil variable version
[oota-llvm.git] / test / Object / archive-symtab.test
1 RUN: rm -f %t.a
2 RUN: llvm-ar rcs %t.a %p/Inputs/trivial-object-test.elf-x86-64 %p/Inputs/trivial-object-test2.elf-x86-64
3 RUN: llvm-nm -M %t.a | FileCheck %s
4
5 CHECK: Archive map
6 CHECK-NEXT: main in trivial-object-test.elf-x86-64
7 CHECK-NEXT: foo in trivial-object-test2.elf-x86-64
8 CHECK-NEXT: main in trivial-object-test2.elf-x86-64
9 CHECK-NOT: bar
10
11 CHECK: trivial-object-test.elf-x86-64:
12 CHECK-NEXT:                  U SomeOtherFunction
13 CHECK-NEXT: 0000000000000000 T main
14 CHECK-NEXT:                  U puts
15
16 CHECK: trivial-object-test2.elf-x86-64:
17 CHECK-NEXT: 0000000000000000 t bar
18 CHECK-NEXT: 0000000000000006 T foo
19 CHECK-NEXT: 0000000000000016 T main
20
21 RUN: rm -f %t.a
22 RUN: llvm-ar rcS %t.a %p/Inputs/trivial-object-test.elf-x86-64 %p/Inputs/trivial-object-test2.elf-x86-64
23 RUN: llvm-nm -M %t.a | FileCheck %s --check-prefix=NOMAP
24
25 NOMAP-NOT: Archive map
26
27 RUN: llvm-ar s %t.a
28 RUN: llvm-nm -M %t.a | FileCheck %s
29
30 check that the archive does have a corrupt symbol table.
31 RUN: rm -f %t.a
32 RUN: cp %p/Inputs/archive-test.a-corrupt-symbol-table %t.a
33 RUN: llvm-nm -M %t.a | FileCheck %s --check-prefix=CORRUPT
34
35 CORRUPT: Archive map
36 CORRUPT-NEXT: mbin in trivial-object-test.elf-x86-64
37 CORRUPT-NEXT: foo in trivial-object-test2.elf-x86-64
38 CORRUPT-NEXT: main in trivial-object-test2.elf-x86-64
39
40 CORRUPT: trivial-object-test.elf-x86-64:
41 CORRUPT-NEXT:                  U SomeOtherFunction
42 CORRUPT-NEXT: 0000000000000000 T main
43 CORRUPT-NEXT:                  U puts
44
45 CORRUPT: trivial-object-test2.elf-x86-64:
46 CORRUPT-NEXT: 0000000000000000 t bar
47 CORRUPT-NEXT: 0000000000000006 T foo
48 CORRUPT-NEXT: 0000000000000016 T main
49
50 check that the we *don't* update the symbol table.
51 RUN: llvm-ar s %t.a
52 RUN: llvm-nm -M %t.a | FileCheck %s --check-prefix=CORRUPT
53
54 repeate the test with llvm-ranlib
55
56 RUN: rm -f %t.a
57 RUN: llvm-ar rcS %t.a %p/Inputs/trivial-object-test.elf-x86-64 %p/Inputs/trivial-object-test2.elf-x86-64
58 RUN: llvm-nm -M %t.a | FileCheck %s --check-prefix=NOMAP
59
60 RUN: llvm-ranlib %t.a
61 RUN: llvm-nm -M %t.a | FileCheck %s
62
63 RUN: llvm-nm -M %p/Inputs/macho-archive-x86_64.a | FileCheck %s --check-prefix=BSD-MachO
64
65 BSD-MachO: Archive map
66 BSD-MachO: _bar in bar.o
67 BSD-MachO: _foo in foo.o