Daniel Dunbar | 2080ffc | 2009-08-22 09:45:43 +0000 | [diff] [blame] | 1 | // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s |
Daniel Dunbar | 8fcefbe | 2009-08-21 18:29:01 +0000 | [diff] [blame] | 2 | |
| 3 | .data |
| 4 | .ascii "hello" |
| 5 | .byte 0xAB |
| 6 | .short 0xABCD |
| 7 | .long 0xABCDABCD |
| 8 | .quad 0xABCDABCDABCDABCD |
Daniel Dunbar | 3d153ff | 2009-08-21 23:07:38 +0000 | [diff] [blame] | 9 | .org 30 |
| 10 | .long 0xF000 // 34 |
| 11 | .p2align 3, 0xAB // 40 (0xAB * 6) |
| 12 | .short 0 // 42 |
| 13 | .p2alignw 3, 0xABCD // 48 (0xABCD * 2) |
| 14 | .short 0 // 50 |
| 15 | .p2alignw 3, 0xABCD, 5 // 50 |
Daniel Dunbar | 8fcefbe | 2009-08-21 18:29:01 +0000 | [diff] [blame] | 16 | |
| 17 | // CHECK: ('cputype', 7) |
| 18 | // CHECK: ('cpusubtype', 3) |
| 19 | // CHECK: ('filetype', 1) |
| 20 | // CHECK: ('num_load_commands', 1) |
| 21 | // CHECK: ('load_commands_size', 192) |
| 22 | // CHECK: ('flag', 0) |
| 23 | // CHECK: ('load_commands', [ |
| 24 | // CHECK: # Load Command 0 |
| 25 | // CHECK: (('command', 1) |
| 26 | // CHECK: ('size', 192) |
| 27 | // CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') |
| 28 | // CHECK: ('vm_addr', 0) |
Daniel Dunbar | 3d153ff | 2009-08-21 23:07:38 +0000 | [diff] [blame] | 29 | // CHECK: ('vm_size', 50) |
Daniel Dunbar | 8fcefbe | 2009-08-21 18:29:01 +0000 | [diff] [blame] | 30 | // CHECK: ('file_offset', 220) |
Daniel Dunbar | 3d153ff | 2009-08-21 23:07:38 +0000 | [diff] [blame] | 31 | // CHECK: ('file_size', 50) |
Daniel Dunbar | 8fcefbe | 2009-08-21 18:29:01 +0000 | [diff] [blame] | 32 | // CHECK: ('maxprot', 7) |
| 33 | // CHECK: ('initprot', 7) |
| 34 | // CHECK: ('num_sections', 2) |
| 35 | // CHECK: ('flags', 0) |
| 36 | // CHECK: ('sections', [ |
| 37 | // CHECK: # Section 0 |
| 38 | // CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') |
| 39 | // CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') |
| 40 | // CHECK: ('address', 0) |
| 41 | // CHECK: ('size', 0) |
| 42 | // CHECK: ('offset', 220) |
| 43 | // CHECK: ('alignment', 0) |
| 44 | // CHECK: ('reloc_offset', 0) |
| 45 | // CHECK: ('num_reloc', 0) |
| 46 | // CHECK: ('flags', 0x80000000) |
| 47 | // CHECK: ('reserved1', 0) |
| 48 | // CHECK: ('reserved2', 0) |
| 49 | // CHECK: ), |
| 50 | // CHECK: # Section 1 |
| 51 | // CHECK: (('section_name', '__data\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') |
| 52 | // CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') |
| 53 | // CHECK: ('address', 0) |
Daniel Dunbar | 3d153ff | 2009-08-21 23:07:38 +0000 | [diff] [blame] | 54 | // CHECK: ('size', 50) |
Daniel Dunbar | 8fcefbe | 2009-08-21 18:29:01 +0000 | [diff] [blame] | 55 | // CHECK: ('offset', 220) |
Daniel Dunbar | 3d153ff | 2009-08-21 23:07:38 +0000 | [diff] [blame] | 56 | // CHECK: ('alignment', 3) |
Daniel Dunbar | 8fcefbe | 2009-08-21 18:29:01 +0000 | [diff] [blame] | 57 | // CHECK: ('reloc_offset', 0) |
| 58 | // CHECK: ('num_reloc', 0) |
| 59 | // CHECK: ('flags', 0x0) |
| 60 | // CHECK: ('reserved1', 0) |
| 61 | // CHECK: ('reserved2', 0) |
| 62 | // CHECK: ), |
| 63 | // CHECK: ]) |
| 64 | // CHECK: ), |
| 65 | // CHECK: ]) |
| 66 | |
| 67 | // FIXME: Dump contents, so we can check those too. |