Kevin Enderby | c28eff1 | 2014-06-30 18:45:23 +0000 | [diff] [blame] | 1 | RUN: llvm-nm -arch all %p/Inputs/macho-universal.x86_64.i386 \ |
Kevin Enderby | 14963a6 | 2014-05-14 21:18:50 +0000 | [diff] [blame] | 2 | RUN: | FileCheck %s -check-prefix CHECK-OBJ |
Kevin Enderby | f5d5db7 | 2016-06-20 22:16:18 +0000 | [diff] [blame] | 3 | RUN: llvm-nm -arch all %p/Inputs/macho-universal64.x86_64.i386 \ |
| 4 | RUN: | FileCheck %s -check-prefix CHECK-64-OBJ |
Kevin Enderby | c28eff1 | 2014-06-30 18:45:23 +0000 | [diff] [blame] | 5 | RUN: llvm-nm -arch x86_64 %p/Inputs/macho-universal.x86_64.i386 \ |
| 6 | RUN: | FileCheck %s -check-prefix CHECK-OBJ-x86_64 |
Rafael Espindola | d272237 | 2014-08-08 16:18:29 +0000 | [diff] [blame] | 7 | RUN: not llvm-nm -arch armv7m %p/Inputs/macho-universal.x86_64.i386 2>&1 \ |
| 8 | RUN: | FileCheck %s -check-prefix CHECK-OBJ-armv7m |
| 9 | RUN: not llvm-nm -arch foobar %p/Inputs/macho-universal.x86_64.i386 2>&1 \ |
| 10 | RUN: | FileCheck %s -check-prefix CHECK-OBJ-foobar |
Kevin Enderby | c28eff1 | 2014-06-30 18:45:23 +0000 | [diff] [blame] | 11 | RUN: llvm-nm -arch all %p/Inputs/macho-universal-archive.x86_64.i386 \ |
Kevin Enderby | 14963a6 | 2014-05-14 21:18:50 +0000 | [diff] [blame] | 12 | RUN: | FileCheck %s -check-prefix CHECK-AR |
Kevin Enderby | f5d5db7 | 2016-06-20 22:16:18 +0000 | [diff] [blame] | 13 | RUN: llvm-nm -arch all %p/Inputs/macho-universal64-archive.x86_64.i386 \ |
| 14 | RUN: | FileCheck %s -check-prefix CHECK-64-AR |
Kevin Enderby | c28eff1 | 2014-06-30 18:45:23 +0000 | [diff] [blame] | 15 | RUN: llvm-nm -arch i386 %p/Inputs/macho-universal-archive.x86_64.i386 \ |
| 16 | RUN: | FileCheck %s -check-prefix CHECK-AR-i386 |
Kevin Enderby | fb0326c | 2014-07-24 23:31:52 +0000 | [diff] [blame] | 17 | RUN: llvm-nm -o -arch all %p/Inputs/macho-universal-archive.x86_64.i386 \ |
| 18 | RUN: | FileCheck %s -check-prefix CHECK-AR-o |
Alexey Samsonov | 9c22f87 | 2013-06-18 15:03:28 +0000 | [diff] [blame] | 19 | |
Kevin Enderby | c28016e | 2014-06-19 22:03:18 +0000 | [diff] [blame] | 20 | CHECK-OBJ: macho-universal.x86_64.i386 (for architecture x86_64): |
Kevin Enderby | 14963a6 | 2014-05-14 21:18:50 +0000 | [diff] [blame] | 21 | CHECK-OBJ: 0000000100000f60 T _main |
Kevin Enderby | c28016e | 2014-06-19 22:03:18 +0000 | [diff] [blame] | 22 | CHECK-OBJ: macho-universal.x86_64.i386 (for architecture i386): |
Kevin Enderby | 14963a6 | 2014-05-14 21:18:50 +0000 | [diff] [blame] | 23 | CHECK-OBJ: 00001fa0 T _main |
| 24 | |
Kevin Enderby | f5d5db7 | 2016-06-20 22:16:18 +0000 | [diff] [blame] | 25 | CHECK-64-OBJ: macho-universal64.x86_64.i386 (for architecture x86_64): |
| 26 | CHECK-64-OBJ: 0000000100000f60 T _main |
| 27 | CHECK-64-OBJ: macho-universal64.x86_64.i386 (for architecture i386): |
| 28 | CHECK-64-OBJ: 00001fa0 T _main |
| 29 | |
Kevin Enderby | c28eff1 | 2014-06-30 18:45:23 +0000 | [diff] [blame] | 30 | CHECK-OBJ-x86_64: 0000000100000000 T __mh_execute_header |
| 31 | CHECK-OBJ-x86_64: 0000000100000f60 T _main |
| 32 | CHECK-OBJ-x86_64: U dyld_stub_binder |
| 33 | |
Rafael Espindola | d272237 | 2014-08-08 16:18:29 +0000 | [diff] [blame] | 34 | CHECK-OBJ-armv7m-NOT: Unknown architecture named |
| 35 | CHECK-OBJ-armv7m: does not contain architecture |
| 36 | |
| 37 | CHECK-OBJ-foobar: Unknown architecture named |
| 38 | CHECK-OBJ-foobar: does not contain architecture |
| 39 | |
Kevin Enderby | c28016e | 2014-06-19 22:03:18 +0000 | [diff] [blame] | 40 | CHECK-AR: macho-universal-archive.x86_64.i386(hello.o) (for architecture x86_64): |
Kevin Enderby | 14963a6 | 2014-05-14 21:18:50 +0000 | [diff] [blame] | 41 | CHECK-AR: 0000000000000068 s EH_frame0 |
| 42 | CHECK-AR: 000000000000003b s L_.str |
| 43 | CHECK-AR: 0000000000000000 T _main |
| 44 | CHECK-AR: 0000000000000080 S _main.eh |
Kevin Enderby | b38059a | 2014-05-20 23:04:47 +0000 | [diff] [blame] | 45 | CHECK-AR: U _printf |
Kevin Enderby | c28016e | 2014-06-19 22:03:18 +0000 | [diff] [blame] | 46 | CHECK-AR: macho-universal-archive.x86_64.i386(foo.o) (for architecture i386): |
Kevin Enderby | f7b992bd | 2014-06-19 22:49:21 +0000 | [diff] [blame] | 47 | CHECK-AR: 00000008 D _bar |
Kevin Enderby | 14963a6 | 2014-05-14 21:18:50 +0000 | [diff] [blame] | 48 | CHECK-AR: 00000000 T _foo |
Kevin Enderby | c28eff1 | 2014-06-30 18:45:23 +0000 | [diff] [blame] | 49 | |
Kevin Enderby | f5d5db7 | 2016-06-20 22:16:18 +0000 | [diff] [blame] | 50 | CHECK-64-AR: macho-universal64-archive.x86_64.i386(foo.o) (for architecture i386): |
| 51 | CHECK-64-AR: 00000008 D _bar |
| 52 | CHECK-64-AR: 00000000 T _foo |
| 53 | CHECK-64-AR: macho-universal64-archive.x86_64.i386(hello.o) (for architecture x86_64): |
| 54 | CHECK-64-AR: 0000000000000068 s EH_frame0 |
| 55 | CHECK-64-AR: 000000000000003b s L_.str |
| 56 | CHECK-64-AR: 0000000000000000 T _main |
| 57 | CHECK-64-AR: 0000000000000080 S _main.eh |
| 58 | CHECK-64-AR: U _printf |
| 59 | |
Kevin Enderby | c28eff1 | 2014-06-30 18:45:23 +0000 | [diff] [blame] | 60 | CHECK-AR-i386: macho-universal-archive.x86_64.i386(foo.o): |
| 61 | CHECK-AR-i386: 00000008 D _bar |
| 62 | CHECK-AR-i386: 00000000 T _foo |
Kevin Enderby | fb0326c | 2014-07-24 23:31:52 +0000 | [diff] [blame] | 63 | |
| 64 | CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 0000000000000068 s EH_frame0 |
| 65 | CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 000000000000003b s L_.str |
| 66 | CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 0000000000000000 T _main |
| 67 | CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: 0000000000000080 S _main.eh |
| 68 | CHECK-AR-o: (for architecture x86_64):{{.*}}/macho-universal-archive.x86_64.i386:hello.o: U _printf |
| 69 | CHECK-AR-o: (for architecture i386):{{.*}}/macho-universal-archive.x86_64.i386:foo.o: 00000008 D _bar |
| 70 | CHECK-AR-o: (for architecture i386):{{.*}}/macho-universal-archive.x86_64.i386:foo.o: 00000000 T _foo |