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 -s %t.a | FileCheck %s
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
11 CHECK: trivial-object-test.elf-x86-64:
12 CHECK-NEXT: U SomeOtherFunction
13 CHECK-NEXT: 00000000 T main
15 CHECK-NEXT: trivial-object-test2.elf-x86-64:
16 CHECK-NEXT: 00000000 t bar
17 CHECK-NEXT: 00000006 T foo
18 CHECK-NEXT: 00000016 T main
21 RUN: llvm-ar rcS %t.a %p/Inputs/trivial-object-test.elf-x86-64 %p/Inputs/trivial-object-test2.elf-x86-64
22 RUN: llvm-nm -s %t.a | FileCheck %s --check-prefix=NOMAP
24 NOMAP-NOT: Archive map
27 RUN: llvm-nm -s %t.a | FileCheck %s
29 check that the archive does have a corrupt symbol table.
31 RUN: cp %p/Inputs/archive-test.a-corrupt-symbol-table %t.a
32 RUN: llvm-nm -s %t.a | FileCheck %s --check-prefix=CORRUPT
35 CORRUPT-NEXT: mbin in trivial-object-test.elf-x86-64
36 CORRUPT-NEXT: foo in trivial-object-test2.elf-x86-64
37 CORRUPT-NEXT: main in trivial-object-test2.elf-x86-64
39 CORRUPT: trivial-object-test.elf-x86-64:
40 CORRUPT-NEXT: U SomeOtherFunction
41 CORRUPT-NEXT: 00000000 T main
43 CORRUPT-NEXT: trivial-object-test2.elf-x86-64:
44 CORRUPT-NEXT: 00000000 t bar
45 CORRUPT-NEXT: 00000006 T foo
46 CORRUPT-NEXT: 00000016 T main
48 check that the we *don't* update the symbol table.
50 RUN: llvm-nm -s %t.a | FileCheck %s --check-prefix=CORRUPT
52 repeate the test with llvm-ranlib
55 RUN: llvm-ar rcS %t.a %p/Inputs/trivial-object-test.elf-x86-64 %p/Inputs/trivial-object-test2.elf-x86-64
56 RUN: llvm-nm -s %t.a | FileCheck %s --check-prefix=NOMAP
59 RUN: llvm-nm -s %t.a | FileCheck %s