b6455b07cef06216ed967a596b780b7f9d78449d
[lldb.git] / lldb / lit / Modules / MachO / subsections.yaml
1 # RUN: yaml2obj %s > %t
2 # RUN: lldb-test object-file %t | FileCheck %s
3
4 #CHECK:     Showing 2 sections
5 #CHECK-NEXT:  Index: 0
6 #CHECK-NEXT:  Name: __PAGEZERO
7 #CHECK-NEXT:  Type: container
8 #CHECK-NEXT:  Permissions: ---
9 #CHECK-NEXT:  Thread specific: no
10 #CHECK-NEXT:  VM address: 0x0
11 #CHECK-NEXT:  VM size: 4294967296
12 #CHECK-NEXT:  File size: 0
13 #CHECK-NEXT:  There are no subsections
14 #
15 #CHECK:       Index: 1
16 #CHECK-NEXT:  Name: __TEXT
17 #CHECK-NEXT:  Type: container
18 #CHECK-NEXT:  Permissions: r-x
19 #CHECK-NEXT:  Thread specific: no
20 #CHECK-NEXT:  VM address: 0x100000000
21 #CHECK-NEXT:  VM size: 4096
22 #CHECK-NEXT:  File size: 4096
23 #CHECK-NEXT:  Showing 3 subsections
24 #CHECK-NEXT:    Index: 0
25 #CHECK-NEXT:    Name: __text
26 #CHECK-NEXT:    Type: code
27 #CHECK-NEXT:    Permissions: r-x
28 #CHECK-NEXT:    Thread specific: no
29 #CHECK-NEXT:    VM address: 0x100000f30
30 #CHECK-NEXT:    VM size: 22
31 #CHECK-NEXT:    File size: 22
32 #
33 #CHECK:         Index: 1
34 #CHECK-NEXT:    Name: __unwind_info
35 #CHECK-NEXT:    Type: compact-unwind
36 #CHECK-NEXT:    Permissions: r-x
37 #CHECK-NEXT:    Thread specific: no
38 #CHECK-NEXT:    VM address: 0x100000f48
39 #CHECK-NEXT:    VM size: 76
40 #CHECK-NEXT:    File size: 76
41 #
42 #CHECK:         Index: 2
43 #CHECK-NEXT:    Name: __eh_frame
44 #CHECK-NEXT:    Type: eh-frame
45 #CHECK-NEXT:    Permissions: r-x
46 #CHECK-NEXT:    Thread specific: no
47 #CHECK-NEXT:    VM address: 0x100000f98
48 #CHECK-NEXT:    VM size: 104
49 #CHECK-NEXT:    File size: 104
50
51 --- !mach-o
52 FileHeader:      
53   magic:           0xFEEDFACF
54   cputype:         0x01000007
55   cpusubtype:      0x00000003
56   filetype:        0x00000002
57   ncmds:           12
58   sizeofcmds:      728
59   flags:           0x00000085
60   reserved:        0x00000000
61 LoadCommands:    
62   - cmd:             LC_SEGMENT_64
63     cmdsize:         72
64     segname:         __PAGEZERO
65     vmaddr:          0
66     vmsize:          4294967296
67     fileoff:         0
68     filesize:        0
69     maxprot:         0
70     initprot:        0
71     nsects:          0
72     flags:           0
73   - cmd:             LC_SEGMENT_64
74     cmdsize:         312
75     segname:         __TEXT
76     vmaddr:          4294967296
77     vmsize:          4096
78     fileoff:         0
79     filesize:        4096
80     maxprot:         7
81     initprot:        5
82     nsects:          3
83     flags:           0
84     Sections:        
85       - sectname:        __text
86         segname:         __TEXT
87         addr:            0x0000000100000F30
88         size:            22
89         offset:          0x00000F30
90         align:           4
91         reloff:          0x00000000
92         nreloc:          0
93         flags:           0x80000400
94         reserved1:       0x00000000
95         reserved2:       0x00000000
96         reserved3:       0x00000000
97       - sectname:        __unwind_info
98         segname:         __TEXT
99         addr:            0x0000000100000F48
100         size:            76
101         offset:          0x00000F48
102         align:           2
103         reloff:          0x00000000
104         nreloc:          0
105         flags:           0x00000000
106         reserved1:       0x00000000
107         reserved2:       0x00000000
108         reserved3:       0x00000000
109       - sectname:        __eh_frame
110         segname:         __TEXT
111         addr:            0x0000000100000F98
112         size:            104
113         offset:          0x00000F98
114         align:           3
115         reloff:          0x00000000
116         nreloc:          0
117         flags:           0x0000000B
118         reserved1:       0x00000000
119         reserved2:       0x00000000
120         reserved3:       0x00000000
121 ...