Home | History | Annotate | Download | only in Object
      1 RUN: llvm-nm %p/Inputs/archive-test.a-coff-i386 \
      2 RUN:         | FileCheck %s -check-prefix COFF
      3 
      4 COFF: trivial-object-test.coff-i386:
      5 COFF-NEXT: 00000000 d .data
      6 COFF-NEXT: 00000000 t .text
      7 COFF-NEXT: 00000000 d L_.str
      8 COFF-NEXT:          U _SomeOtherFunction
      9 COFF-NEXT: 00000000 T _main
     10 COFF-NEXT:          U _puts
     11 
     12 
     13 RUN: llvm-as %p/Inputs/trivial.ll -o=%t1
     14 RUN: rm -f %t2
     15 RUN: llvm-ar rcs %t2 %t1
     16 RUN: llvm-nm %t2 | FileCheck %s -check-prefix BITCODE
     17 
     18 BITCODE:          U SomeOtherFunction
     19 BITCODE-NEXT:          T main
     20 BITCODE-NEXT:          U puts
     21 BITCODE-NEXT:          D var
     22 
     23 
     24 Test we don't error with an archive with no symtab.
     25 RUN: llvm-nm %p/Inputs/archive-test.a-gnu-no-symtab
     26 
     27 
     28 Or in an archive with no symtab or string table.
     29 RUN: llvm-nm %p/Inputs/archive-test.a-gnu-minimal
     30 
     31 
     32 And don't crash when asked to print a non-existing symtab.
     33 RUN: llvm-nm -M %p/Inputs/archive-test.a-gnu-minimal
     34 
     35 Don't reject an empty archive.
     36 RUN: llvm-nm %p/Inputs/archive-test.a-empty
     37 
     38 This archive has an unaligned member and a unknown format member.
     39 GNU AR is able to parse the unaligned member and warns about the member with
     40 the unknown format. We should probably simply warn on both. For now just check
     41 that we don't produce an error.
     42 RUN: llvm-nm %p/Inputs/corrupt-archive.a
     43