blob: 631e821134f357d501f38eb1c13efe3dd52e12f5 [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
Rafael Espindola02eac9a2014-02-05 04:36:47 +000011RUN: llvm-nm %p/Inputs/absolute.elf-x86-64 \
12RUN: | FileCheck %s -check-prefix ABSOLUTE-ELF
Danil Malyshevcbe72fc2011-11-29 17:40:10 +000013RUN: llvm-nm %p/Inputs/trivial-object-test.macho-i386 \
14RUN: | FileCheck %s -check-prefix macho
15RUN: llvm-nm %p/Inputs/trivial-object-test.macho-x86-64 \
16RUN: | FileCheck %s -check-prefix macho64
Rafael Espindolafb66ef02014-02-04 23:18:52 +000017RUN: llvm-nm %p/Inputs/common.coff-i386 \
18RUN: | FileCheck %s -check-prefix COFF-COMMON
Michael J. Spencer2d67ed82011-01-20 06:39:15 +000019
20COFF: 00000000 d .data
21COFF: 00000000 t .text
22COFF: 00000000 d L{{_?}}.str
23COFF: U {{_?}}SomeOtherFunction
24COFF: 00000000 T {{_?}}main
25COFF: U {{_?}}puts
26
Rafael Espindolafb66ef02014-02-04 23:18:52 +000027COFF-COMMON: 00000000 b .bss
28COFF-COMMON-NEXT: 00000000 d .data
29COFF-COMMON-NEXT: 00000000 d .drectve
30COFF-COMMON-NEXT: 00000000 n .file
31COFF-COMMON-NEXT: 00000000 r .rdata$zzz
32COFF-COMMON-NEXT: 00000000 t .text
33COFF-COMMON-NEXT: C _a
34
35
Rafael Espindola0d6b3472013-07-22 19:24:34 +000036ELF-NOT: U
Michael J. Spencer2d67ed82011-01-20 06:39:15 +000037ELF: U SomeOtherFunction
38ELF: 00000000 T main
39ELF: U puts
Danil Malyshevcbe72fc2011-11-29 17:40:10 +000040
Rafael Espindolaf42c58d2014-02-04 23:53:15 +000041WEAK-ELF: w f1
42WEAK-ELF: 00000000 W f2
43WEAK-ELF: v x1
44WEAK-ELF: 00000000 V x2
Danil Malyshevcbe72fc2011-11-29 17:40:10 +000045
Rafael Espindola02eac9a2014-02-05 04:36:47 +000046ABSOLUTE-ELF: 00000123 a a1
47ABSOLUTE-ELF: 00000123 A a2
48
Danil Malyshevcbe72fc2011-11-29 17:40:10 +000049macho: 00000000 U _SomeOtherFunction
Rafael Espindolaa1356322013-11-02 05:03:24 +000050macho: 00000000 T _main
Danil Malyshevcbe72fc2011-11-29 17:40:10 +000051macho: 00000000 U _puts
52
53macho64: 00000028 s L_.str
Rafael Espindolaa1356322013-11-02 05:03:24 +000054macho64: 00000000 U _SomeOtherFunction
55macho64: 00000000 T _main
56macho64: 00000000 U _puts