83
|
1 RUN: llvm-nm -a %p/Inputs/archive-test.a-coff-i386 \
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 RUN: | FileCheck %s -check-prefix COFF
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 COFF: trivial-object-test.coff-i386:
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 COFF-NEXT: 00000000 d .data
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 COFF-NEXT: 00000000 t .text
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 COFF-NEXT: 00000000 d L_.str
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 COFF-NEXT: U _SomeOtherFunction
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 COFF-NEXT: 00000000 T _main
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 COFF-NEXT: U _puts
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11
|
83
|
12 RUN: llvm-nm -a -o %p/Inputs/archive-test.a-coff-i386 \
|
77
|
13 RUN: | FileCheck %s -check-prefix COFF-o
|
|
14
|
|
15 COFF-o: {{.*}}/archive-test.a-coff-i386:trivial-object-test.coff-i386: 00000000 d .data
|
|
16 COFF-o: {{.*}}/archive-test.a-coff-i386:trivial-object-test.coff-i386: 00000000 t .text
|
|
17 COFF-o: {{.*}}/archive-test.a-coff-i386:trivial-object-test.coff-i386: 00000000 d L_.str
|
|
18 COFF-o: {{.*}}/archive-test.a-coff-i386:trivial-object-test.coff-i386: U _SomeOtherFunction
|
|
19 COFF-o: {{.*}}/archive-test.a-coff-i386:trivial-object-test.coff-i386: 00000000 T _main
|
|
20 COFF-o: {{.*}}/archive-test.a-coff-i386:trivial-object-test.coff-i386: U _puts
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
22 RUN: llvm-as %p/Inputs/trivial.ll -o=%t1
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
23 RUN: rm -f %t2
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
24 RUN: llvm-ar rcs %t2 %t1
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
25 RUN: llvm-nm %t2 | FileCheck %s -check-prefix BITCODE
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
26
|
95
|
27 RUN: rm -f %t2
|
|
28 RUN: llvm-lib /out:%t2 %t1
|
|
29 RUN: llvm-nm %t2 | FileCheck %s -check-prefix BITCODE
|
|
30
|
|
31 RUN: rm -f %t2
|
|
32 RUN: echo /out:%t2 %t1 > %t.rsp
|
|
33 RUN: llvm-lib @%t.rsp
|
|
34 RUN: llvm-nm %t2 | FileCheck %s -check-prefix BITCODE
|
|
35
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
36 BITCODE: U SomeOtherFunction
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
37 BITCODE-NEXT: T main
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
38 BITCODE-NEXT: U puts
|
77
|
39 BITCODE-NEXT: D var
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
40
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
41
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
42 Test we don't error with an archive with no symtab.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
43 RUN: llvm-nm %p/Inputs/archive-test.a-gnu-no-symtab
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
44
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
45
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
46 Or in an archive with no symtab or string table.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
47 RUN: llvm-nm %p/Inputs/archive-test.a-gnu-minimal
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
48
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
49
|
33
|
50 And don't crash when asked to print a non-existing symtab.
|
77
|
51 RUN: llvm-nm -M %p/Inputs/archive-test.a-gnu-minimal
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
52
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
53 Don't reject an empty archive.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
54 RUN: llvm-nm %p/Inputs/archive-test.a-empty
|
77
|
55
|
|
56 This archive has an unaligned member and a unknown format member.
|
|
57 GNU AR is able to parse the unaligned member and warns about the member with
|
|
58 the unknown format. We should probably simply warn on both. For now just check
|
|
59 that we don't produce an error.
|
|
60 RUN: llvm-nm %p/Inputs/corrupt-archive.a
|
95
|
61
|
|
62
|
|
63 RUN: llvm-nm %p/Inputs/thin.a | FileCheck %s -check-prefix THIN
|
|
64
|
|
65 THIN: IsNAN.o:
|
|
66 THIN: 00000014 T _ZN4llvm5IsNANEd
|
|
67 THIN: 00000000 T _ZN4llvm5IsNANEf
|
|
68 THIN: U __isnan
|
|
69 THIN: U __isnanf
|