blob: 0cced1829c3f62d1646344e8e7229c6f9e1fc60e [file] [log] [blame]
Kevin Enderby4c8dfe42014-06-30 18:45:23 +00001RUN: llvm-nm -arch all %p/Inputs/macho-universal.x86_64.i386 \
Kevin Enderbye858a652014-05-14 21:18:50 +00002RUN: | FileCheck %s -check-prefix CHECK-OBJ
Kevin Enderby4c8dfe42014-06-30 18:45:23 +00003RUN: llvm-nm -arch x86_64 %p/Inputs/macho-universal.x86_64.i386 \
4RUN: | FileCheck %s -check-prefix CHECK-OBJ-x86_64
Rafael Espindola40f54462014-08-08 16:18:29 +00005RUN: not llvm-nm -arch armv7m %p/Inputs/macho-universal.x86_64.i386 2>&1 \
6RUN: | FileCheck %s -check-prefix CHECK-OBJ-armv7m
7RUN: not llvm-nm -arch foobar %p/Inputs/macho-universal.x86_64.i386 2>&1 \
8RUN: | FileCheck %s -check-prefix CHECK-OBJ-foobar
Kevin Enderby4c8dfe42014-06-30 18:45:23 +00009RUN: llvm-nm -arch all %p/Inputs/macho-universal-archive.x86_64.i386 \
Kevin Enderbye858a652014-05-14 21:18:50 +000010RUN: | FileCheck %s -check-prefix CHECK-AR
Kevin Enderby4c8dfe42014-06-30 18:45:23 +000011RUN: llvm-nm -arch i386 %p/Inputs/macho-universal-archive.x86_64.i386 \
12RUN: | FileCheck %s -check-prefix CHECK-AR-i386
Kevin Enderby08e1bbd2014-07-24 23:31:52 +000013RUN: llvm-nm -o -arch all %p/Inputs/macho-universal-archive.x86_64.i386 \
14RUN: | FileCheck %s -check-prefix CHECK-AR-o
Alexey Samsonove6388e62013-06-18 15:03:28 +000015
Kevin Enderby1983fcf2014-06-19 22:03:18 +000016CHECK-OBJ: macho-universal.x86_64.i386 (for architecture x86_64):
Kevin Enderbye858a652014-05-14 21:18:50 +000017CHECK-OBJ: 0000000100000f60 T _main
Kevin Enderby1983fcf2014-06-19 22:03:18 +000018CHECK-OBJ: macho-universal.x86_64.i386 (for architecture i386):
Kevin Enderbye858a652014-05-14 21:18:50 +000019CHECK-OBJ: 00001fa0 T _main
20
Kevin Enderby4c8dfe42014-06-30 18:45:23 +000021CHECK-OBJ-x86_64: 0000000100000000 T __mh_execute_header
22CHECK-OBJ-x86_64: 0000000100000f60 T _main
23CHECK-OBJ-x86_64: U dyld_stub_binder
24
Rafael Espindola40f54462014-08-08 16:18:29 +000025CHECK-OBJ-armv7m-NOT: Unknown architecture named
26CHECK-OBJ-armv7m: does not contain architecture
27
28CHECK-OBJ-foobar: Unknown architecture named
29CHECK-OBJ-foobar: does not contain architecture
30
Kevin Enderby1983fcf2014-06-19 22:03:18 +000031CHECK-AR: macho-universal-archive.x86_64.i386(hello.o) (for architecture x86_64):
Kevin Enderbye858a652014-05-14 21:18:50 +000032CHECK-AR: 0000000000000068 s EH_frame0
33CHECK-AR: 000000000000003b s L_.str
34CHECK-AR: 0000000000000000 T _main
35CHECK-AR: 0000000000000080 S _main.eh
Kevin Enderby1b985af2014-05-20 23:04:47 +000036CHECK-AR: U _printf
Kevin Enderby1983fcf2014-06-19 22:03:18 +000037CHECK-AR: macho-universal-archive.x86_64.i386(foo.o) (for architecture i386):
Kevin Enderby1e1b9922014-06-19 22:49:21 +000038CHECK-AR: 00000008 D _bar
Kevin Enderbye858a652014-05-14 21:18:50 +000039CHECK-AR: 00000000 T _foo
Kevin Enderby4c8dfe42014-06-30 18:45:23 +000040
41CHECK-AR-i386: macho-universal-archive.x86_64.i386(foo.o):
42CHECK-AR-i386: 00000008 D _bar
43CHECK-AR-i386: 00000000 T _foo
Kevin Enderby08e1bbd2014-07-24 23:31:52 +000044
45CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 0000000000000068 s EH_frame0
46CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 000000000000003b s L_.str
47CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 0000000000000000 T _main
48CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 0000000000000080 S _main.eh
49CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: U _printf
50CHECK-AR-o: (for architecture i386):{{.*}}/macho-universal-archive.x86_64.i386:foo.o: 00000008 D _bar
51CHECK-AR-o: (for architecture i386):{{.*}}/macho-universal-archive.x86_64.i386:foo.o: 00000000 T _foo