blob: 1fce0eea6452b86d6a6e7ca9b61d2d7302415a4f [file] [log] [blame]
Kevin Enderbyc28eff12014-06-30 18:45:23 +00001RUN: llvm-nm -arch all %p/Inputs/macho-universal.x86_64.i386 \
Kevin Enderby14963a62014-05-14 21:18:50 +00002RUN: | FileCheck %s -check-prefix CHECK-OBJ
Kevin Enderbyf5d5db72016-06-20 22:16:18 +00003RUN: llvm-nm -arch all %p/Inputs/macho-universal64.x86_64.i386 \
4RUN: | FileCheck %s -check-prefix CHECK-64-OBJ
Kevin Enderbyc28eff12014-06-30 18:45:23 +00005RUN: llvm-nm -arch x86_64 %p/Inputs/macho-universal.x86_64.i386 \
6RUN: | FileCheck %s -check-prefix CHECK-OBJ-x86_64
Rafael Espindolad2722372014-08-08 16:18:29 +00007RUN: not llvm-nm -arch armv7m %p/Inputs/macho-universal.x86_64.i386 2>&1 \
8RUN: | FileCheck %s -check-prefix CHECK-OBJ-armv7m
9RUN: not llvm-nm -arch foobar %p/Inputs/macho-universal.x86_64.i386 2>&1 \
10RUN: | FileCheck %s -check-prefix CHECK-OBJ-foobar
Kevin Enderbyc28eff12014-06-30 18:45:23 +000011RUN: llvm-nm -arch all %p/Inputs/macho-universal-archive.x86_64.i386 \
Kevin Enderby14963a62014-05-14 21:18:50 +000012RUN: | FileCheck %s -check-prefix CHECK-AR
Kevin Enderbyf5d5db72016-06-20 22:16:18 +000013RUN: llvm-nm -arch all %p/Inputs/macho-universal64-archive.x86_64.i386 \
14RUN: | FileCheck %s -check-prefix CHECK-64-AR
Kevin Enderbyc28eff12014-06-30 18:45:23 +000015RUN: llvm-nm -arch i386 %p/Inputs/macho-universal-archive.x86_64.i386 \
16RUN: | FileCheck %s -check-prefix CHECK-AR-i386
Kevin Enderbyfb0326c2014-07-24 23:31:52 +000017RUN: llvm-nm -o -arch all %p/Inputs/macho-universal-archive.x86_64.i386 \
18RUN: | FileCheck %s -check-prefix CHECK-AR-o
Alexey Samsonov9c22f872013-06-18 15:03:28 +000019
Kevin Enderbyc28016e2014-06-19 22:03:18 +000020CHECK-OBJ: macho-universal.x86_64.i386 (for architecture x86_64):
Kevin Enderby14963a62014-05-14 21:18:50 +000021CHECK-OBJ: 0000000100000f60 T _main
Kevin Enderbyc28016e2014-06-19 22:03:18 +000022CHECK-OBJ: macho-universal.x86_64.i386 (for architecture i386):
Kevin Enderby14963a62014-05-14 21:18:50 +000023CHECK-OBJ: 00001fa0 T _main
24
Kevin Enderbyf5d5db72016-06-20 22:16:18 +000025CHECK-64-OBJ: macho-universal64.x86_64.i386 (for architecture x86_64):
26CHECK-64-OBJ: 0000000100000f60 T _main
27CHECK-64-OBJ: macho-universal64.x86_64.i386 (for architecture i386):
28CHECK-64-OBJ: 00001fa0 T _main
29
Kevin Enderbyc28eff12014-06-30 18:45:23 +000030CHECK-OBJ-x86_64: 0000000100000000 T __mh_execute_header
31CHECK-OBJ-x86_64: 0000000100000f60 T _main
32CHECK-OBJ-x86_64: U dyld_stub_binder
33
Rafael Espindolad2722372014-08-08 16:18:29 +000034CHECK-OBJ-armv7m-NOT: Unknown architecture named
35CHECK-OBJ-armv7m: does not contain architecture
36
37CHECK-OBJ-foobar: Unknown architecture named
38CHECK-OBJ-foobar: does not contain architecture
39
Kevin Enderbyc28016e2014-06-19 22:03:18 +000040CHECK-AR: macho-universal-archive.x86_64.i386(hello.o) (for architecture x86_64):
Kevin Enderby14963a62014-05-14 21:18:50 +000041CHECK-AR: 0000000000000068 s EH_frame0
42CHECK-AR: 000000000000003b s L_.str
43CHECK-AR: 0000000000000000 T _main
44CHECK-AR: 0000000000000080 S _main.eh
Kevin Enderbyb38059a2014-05-20 23:04:47 +000045CHECK-AR: U _printf
Kevin Enderbyc28016e2014-06-19 22:03:18 +000046CHECK-AR: macho-universal-archive.x86_64.i386(foo.o) (for architecture i386):
Kevin Enderbyf7b992bd2014-06-19 22:49:21 +000047CHECK-AR: 00000008 D _bar
Kevin Enderby14963a62014-05-14 21:18:50 +000048CHECK-AR: 00000000 T _foo
Kevin Enderbyc28eff12014-06-30 18:45:23 +000049
Kevin Enderbyf5d5db72016-06-20 22:16:18 +000050CHECK-64-AR: macho-universal64-archive.x86_64.i386(foo.o) (for architecture i386):
51CHECK-64-AR: 00000008 D _bar
52CHECK-64-AR: 00000000 T _foo
53CHECK-64-AR: macho-universal64-archive.x86_64.i386(hello.o) (for architecture x86_64):
54CHECK-64-AR: 0000000000000068 s EH_frame0
55CHECK-64-AR: 000000000000003b s L_.str
56CHECK-64-AR: 0000000000000000 T _main
57CHECK-64-AR: 0000000000000080 S _main.eh
58CHECK-64-AR: U _printf
59
Kevin Enderbyc28eff12014-06-30 18:45:23 +000060CHECK-AR-i386: macho-universal-archive.x86_64.i386(foo.o):
61CHECK-AR-i386: 00000008 D _bar
62CHECK-AR-i386: 00000000 T _foo
Kevin Enderbyfb0326c2014-07-24 23:31:52 +000063
64CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 0000000000000068 s EH_frame0
65CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 000000000000003b s L_.str
66CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 0000000000000000 T _main
67CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 0000000000000080 S _main.eh
68CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: U _printf
69CHECK-AR-o: (for architecture i386):{{.*}}/macho-universal-archive.x86_64.i386:foo.o: 00000008 D _bar
70CHECK-AR-o: (for architecture i386):{{.*}}/macho-universal-archive.x86_64.i386:foo.o: 00000000 T _foo