mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-25 21:46:50 +00:00
efc447827d
the tool is given multiple files. Also fix the same issue with Mach-O universal files. And fix the newline spacing to separate the output in these cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211405 91177308-0d34-0410-b5e6-96231b3b80d8
62 lines
2.0 KiB
Plaintext
62 lines
2.0 KiB
Plaintext
RUN: rm -f %t.a
|
|
RUN: llvm-ar rcs %t.a %p/Inputs/trivial-object-test.elf-x86-64 %p/Inputs/trivial-object-test2.elf-x86-64
|
|
RUN: llvm-nm -s %t.a | FileCheck %s
|
|
|
|
CHECK: Archive map
|
|
CHECK-NEXT: main in trivial-object-test.elf-x86-64
|
|
CHECK-NEXT: foo in trivial-object-test2.elf-x86-64
|
|
CHECK-NEXT: main in trivial-object-test2.elf-x86-64
|
|
CHECK-NOT: bar
|
|
|
|
CHECK: trivial-object-test.elf-x86-64:
|
|
CHECK-NEXT: U SomeOtherFunction
|
|
CHECK-NEXT: 0000000000000000 T main
|
|
CHECK-NEXT: U puts
|
|
|
|
CHECK: trivial-object-test2.elf-x86-64:
|
|
CHECK-NEXT: 0000000000000000 t bar
|
|
CHECK-NEXT: 0000000000000006 T foo
|
|
CHECK-NEXT: 0000000000000016 T main
|
|
|
|
RUN: rm -f %t.a
|
|
RUN: llvm-ar rcS %t.a %p/Inputs/trivial-object-test.elf-x86-64 %p/Inputs/trivial-object-test2.elf-x86-64
|
|
RUN: llvm-nm -s %t.a | FileCheck %s --check-prefix=NOMAP
|
|
|
|
NOMAP-NOT: Archive map
|
|
|
|
RUN: llvm-ar s %t.a
|
|
RUN: llvm-nm -s %t.a | FileCheck %s
|
|
|
|
check that the archive does have a corrupt symbol table.
|
|
RUN: rm -f %t.a
|
|
RUN: cp %p/Inputs/archive-test.a-corrupt-symbol-table %t.a
|
|
RUN: llvm-nm -s %t.a | FileCheck %s --check-prefix=CORRUPT
|
|
|
|
CORRUPT: Archive map
|
|
CORRUPT-NEXT: mbin in trivial-object-test.elf-x86-64
|
|
CORRUPT-NEXT: foo in trivial-object-test2.elf-x86-64
|
|
CORRUPT-NEXT: main in trivial-object-test2.elf-x86-64
|
|
|
|
CORRUPT: trivial-object-test.elf-x86-64:
|
|
CORRUPT-NEXT: U SomeOtherFunction
|
|
CORRUPT-NEXT: 0000000000000000 T main
|
|
CORRUPT-NEXT: U puts
|
|
|
|
CORRUPT: trivial-object-test2.elf-x86-64:
|
|
CORRUPT-NEXT: 0000000000000000 t bar
|
|
CORRUPT-NEXT: 0000000000000006 T foo
|
|
CORRUPT-NEXT: 0000000000000016 T main
|
|
|
|
check that the we *don't* update the symbol table.
|
|
RUN: llvm-ar s %t.a
|
|
RUN: llvm-nm -s %t.a | FileCheck %s --check-prefix=CORRUPT
|
|
|
|
repeate the test with llvm-ranlib
|
|
|
|
RUN: rm -f %t.a
|
|
RUN: llvm-ar rcS %t.a %p/Inputs/trivial-object-test.elf-x86-64 %p/Inputs/trivial-object-test2.elf-x86-64
|
|
RUN: llvm-nm -s %t.a | FileCheck %s --check-prefix=NOMAP
|
|
|
|
RUN: llvm-ranlib %t.a
|
|
RUN: llvm-nm -s %t.a | FileCheck %s
|