| Kevin Enderby | 403258f | 2014-05-19 20:36:02 +0000 | [diff] [blame] | 1 | RUN: llvm-size -A %p/Inputs/macho-text-data-bss.macho-x86_64 \ |
| 2 | RUN: | FileCheck %s -check-prefix A |
| 3 | RUN: llvm-size -B %p/Inputs/macho-text-data-bss.macho-x86_64 \ |
| 4 | RUN: | FileCheck %s -check-prefix B |
| Kevin Enderby | 246a460 | 2014-06-17 17:54:13 +0000 | [diff] [blame] | 5 | RUN: llvm-size -format darwin %p/Inputs/macho-text-data-bss.macho-x86_64 \ |
| 6 | RUN: | FileCheck %s -check-prefix m |
| 7 | RUN: llvm-size %p/Inputs/macho-archive-x86_64.a \ |
| 8 | RUN: | FileCheck %s -check-prefix AR |
| 9 | RUN: llvm-size -format darwin %p/Inputs/macho-archive-x86_64.a \ |
| 10 | RUN: | FileCheck %s -check-prefix mAR |
| Kevin Enderby | 14a96ac | 2014-06-20 00:04:16 +0000 | [diff] [blame] | 11 | RUN: llvm-size -m -x -l %p/Inputs/hello-world.macho-x86_64 \ |
| Kevin Enderby | 246a460 | 2014-06-17 17:54:13 +0000 | [diff] [blame] | 12 | RUN: | FileCheck %s -check-prefix mxl |
| Kevin Enderby | afef4c9 | 2014-07-01 17:19:10 +0000 | [diff] [blame] | 13 | RUN: llvm-size -arch all %p/Inputs/macho-universal.x86_64.i386 \ |
| Kevin Enderby | 4b8fc28 | 2014-06-18 22:04:40 +0000 | [diff] [blame] | 14 | RUN: | FileCheck %s -check-prefix u |
| Kevin Enderby | afef4c9 | 2014-07-01 17:19:10 +0000 | [diff] [blame] | 15 | RUN: llvm-size -arch i386 %p/Inputs/macho-universal.x86_64.i386 \ |
| 16 | RUN: | FileCheck %s -check-prefix u-i386 |
| 17 | RUN: llvm-size -arch all %p/Inputs/macho-universal-archive.x86_64.i386 \ |
| Kevin Enderby | 4b8fc28 | 2014-06-18 22:04:40 +0000 | [diff] [blame] | 18 | RUN: | FileCheck %s -check-prefix uAR |
| Kevin Enderby | afef4c9 | 2014-07-01 17:19:10 +0000 | [diff] [blame] | 19 | RUN: llvm-size -arch x86_64 %p/Inputs/macho-universal-archive.x86_64.i386 \ |
| 20 | RUN: | FileCheck %s -check-prefix uAR-x86_64 |
| Kevin Enderby | 403258f | 2014-05-19 20:36:02 +0000 | [diff] [blame] | 21 | |
| 22 | A: section size addr |
| 23 | A: __text 12 0 |
| 24 | A: __data 4 12 |
| 25 | A: __bss 4 112 |
| 26 | A: __compact_unwind 32 16 |
| 27 | A: __eh_frame 64 48 |
| 28 | A: Total 116 |
| 29 | |
| Kevin Enderby | 246a460 | 2014-06-17 17:54:13 +0000 | [diff] [blame] | 30 | B: __TEXT __DATA __OBJC others dec hex |
| 31 | B: 76 8 0 32 116 74 |
| 32 | |
| 33 | m: Segment : 116 |
| 34 | m: Section (__TEXT, __text): 12 |
| 35 | m: Section (__DATA, __data): 4 |
| 36 | m: Section (__DATA, __bss): 4 |
| 37 | m: Section (__LD, __compact_unwind): 32 |
| 38 | m: Section (__TEXT, __eh_frame): 64 |
| 39 | m: total 116 |
| 40 | m: total 116 |
| 41 | |
| 42 | AR: __TEXT __DATA __OBJC others dec hex |
| 43 | AR: 70 0 0 32 102 66 {{.*}}/macho-archive-x86_64.a(foo.o) |
| 44 | AR: 0 4 0 0 4 4 {{.*}}/macho-archive-x86_64.a(bar.o) |
| 45 | |
| 46 | mAR: {{.*}}/macho-archive-x86_64.a(foo.o): |
| 47 | mAR: Segment : 104 |
| 48 | mAR: Section (__TEXT, __text): 6 |
| 49 | mAR: Section (__LD, __compact_unwind): 32 |
| 50 | mAR: Section (__TEXT, __eh_frame): 64 |
| 51 | mAR: total 102 |
| 52 | mAR: total 104 |
| 53 | mAR: {{.*}}/macho-archive-x86_64.a(bar.o): |
| 54 | mAR: Segment : 4 |
| 55 | mAR: Section (__TEXT, __text): 0 |
| 56 | mAR: Section (__DATA, __data): 4 |
| 57 | mAR: total 4 |
| 58 | mAR: total 4 |
| 59 | |
| 60 | |
| 61 | mxl: Segment __PAGEZERO: 0x100000000 (vmaddr 0x0 fileoff 0) |
| 62 | mxl: Segment __TEXT: 0x1000 (vmaddr 0x100000000 fileoff 0) |
| 63 | mxl: Section __text: 0x3b (addr 0x100000f30 offset 3888) |
| 64 | mxl: Section __stubs: 0x6 (addr 0x100000f6c offset 3948) |
| 65 | mxl: Section __stub_helper: 0x1a (addr 0x100000f74 offset 3956) |
| 66 | mxl: Section __cstring: 0xd (addr 0x100000f8e offset 3982) |
| 67 | mxl: Section __unwind_info: 0x48 (addr 0x100000f9b offset 3995) |
| 68 | mxl: Section __eh_frame: 0x18 (addr 0x100000fe8 offset 4072) |
| 69 | mxl: total 0xc8 |
| 70 | mxl: Segment __DATA: 0x1000 (vmaddr 0x100001000 fileoff 4096) |
| 71 | mxl: Section __nl_symbol_ptr: 0x10 (addr 0x100001000 offset 4096) |
| 72 | mxl: Section __la_symbol_ptr: 0x8 (addr 0x100001010 offset 4112) |
| 73 | mxl: total 0x18 |
| 74 | mxl: Segment __LINKEDIT: 0x1000 (vmaddr 0x100002000 fileoff 8192) |
| 75 | mxl: total 0x100003000 |
| Kevin Enderby | 4b8fc28 | 2014-06-18 22:04:40 +0000 | [diff] [blame] | 76 | |
| 77 | u: __TEXT __DATA __OBJC others dec hex |
| Kevin Enderby | 1983fcf | 2014-06-19 22:03:18 +0000 | [diff] [blame] | 78 | u: 4096 0 0 4294971392 4294975488 100002000 {{.*}}/macho-universal.x86_64.i386 (for architecture x86_64) |
| 79 | u: 4096 0 0 8192 12288 3000 {{.*}}/macho-universal.x86_64.i386 (for architecture i386) |
| Kevin Enderby | 4b8fc28 | 2014-06-18 22:04:40 +0000 | [diff] [blame] | 80 | |
| Kevin Enderby | afef4c9 | 2014-07-01 17:19:10 +0000 | [diff] [blame] | 81 | u-i386: __TEXT __DATA __OBJC others dec hex |
| 82 | u-i386: 4096 0 0 8192 12288 3000 |
| 83 | |
| Kevin Enderby | 4b8fc28 | 2014-06-18 22:04:40 +0000 | [diff] [blame] | 84 | uAR: __TEXT __DATA __OBJC others dec hex |
| Kevin Enderby | 1983fcf | 2014-06-19 22:03:18 +0000 | [diff] [blame] | 85 | uAR: 136 0 0 32 168 a8 {{.*}}/macho-universal-archive.x86_64.i386(hello.o) (for architecture x86_64) |
| 86 | uAR: 5 4 0 0 9 9 {{.*}}/macho-universal-archive.x86_64.i386(foo.o) (for architecture i386) |
| Kevin Enderby | afef4c9 | 2014-07-01 17:19:10 +0000 | [diff] [blame] | 87 | |
| 88 | uAR-x86_64: __TEXT __DATA __OBJC others dec hex |
| 89 | uAR-x86_64: 136 0 0 32 168 a8 {{.*}}/macho-universal-archive.x86_64.i386(hello.o) |