blob: c2d2ebb14b54a11ce0841933a66805a04d71b376 [file] [log] [blame]
Matt Beaumont-Gay99fc2e12012-08-02 21:52:49 +00001RUN: yaml2obj %p/Inputs/COFF/i386.yaml | llvm-nm \
2RUN: | FileCheck %s -check-prefix COFF
3RUN: yaml2obj %p/Inputs/COFF/x86-64.yaml | llvm-nm \
Rafael Espindola37212572013-04-26 17:54:46 +00004RUN: | FileCheck %s -check-prefix COFF
Matt Beaumont-Gay1c1a2b82011-10-31 23:56:52 +00005RUN: llvm-nm %p/Inputs/trivial-object-test.elf-i386 \
Michael J. Spencer2d67ed82011-01-20 06:39:15 +00006RUN: | FileCheck %s -check-prefix ELF
Matt Beaumont-Gay1c1a2b82011-10-31 23:56:52 +00007RUN: llvm-nm %p/Inputs/trivial-object-test.elf-x86-64 \
Michael J. Spencer2d67ed82011-01-20 06:39:15 +00008RUN: | FileCheck %s -check-prefix ELF
Rafael Espindolaf42c58d2014-02-04 23:53:15 +00009RUN: llvm-nm %p/Inputs/weak.elf-x86-64 \
10RUN: | FileCheck %s -check-prefix WEAK-ELF
Danil Malyshevcbe72fc2011-11-29 17:40:10 +000011RUN: llvm-nm %p/Inputs/trivial-object-test.macho-i386 \
12RUN: | FileCheck %s -check-prefix macho
13RUN: llvm-nm %p/Inputs/trivial-object-test.macho-x86-64 \
14RUN: | FileCheck %s -check-prefix macho64
Rafael Espindolafb66ef02014-02-04 23:18:52 +000015RUN: llvm-nm %p/Inputs/common.coff-i386 \
16RUN: | FileCheck %s -check-prefix COFF-COMMON
Michael J. Spencer2d67ed82011-01-20 06:39:15 +000017
18COFF: 00000000 d .data
19COFF: 00000000 t .text
20COFF: 00000000 d L{{_?}}.str
21COFF: U {{_?}}SomeOtherFunction
22COFF: 00000000 T {{_?}}main
23COFF: U {{_?}}puts
24
Rafael Espindolafb66ef02014-02-04 23:18:52 +000025COFF-COMMON: 00000000 b .bss
26COFF-COMMON-NEXT: 00000000 d .data
27COFF-COMMON-NEXT: 00000000 d .drectve
28COFF-COMMON-NEXT: 00000000 n .file
29COFF-COMMON-NEXT: 00000000 r .rdata$zzz
30COFF-COMMON-NEXT: 00000000 t .text
31COFF-COMMON-NEXT: C _a
32
33
Rafael Espindola0d6b3472013-07-22 19:24:34 +000034ELF-NOT: U
Michael J. Spencer2d67ed82011-01-20 06:39:15 +000035ELF: U SomeOtherFunction
36ELF: 00000000 T main
37ELF: U puts
Danil Malyshevcbe72fc2011-11-29 17:40:10 +000038
Rafael Espindolaf42c58d2014-02-04 23:53:15 +000039WEAK-ELF: w f1
40WEAK-ELF: 00000000 W f2
41WEAK-ELF: v x1
42WEAK-ELF: 00000000 V x2
Danil Malyshevcbe72fc2011-11-29 17:40:10 +000043
44macho: 00000000 U _SomeOtherFunction
Rafael Espindolaa1356322013-11-02 05:03:24 +000045macho: 00000000 T _main
Danil Malyshevcbe72fc2011-11-29 17:40:10 +000046macho: 00000000 U _puts
47
48macho64: 00000028 s L_.str
Rafael Espindolaa1356322013-11-02 05:03:24 +000049macho64: 00000000 U _SomeOtherFunction
50macho64: 00000000 T _main
51macho64: 00000000 U _puts