• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
2_g:
3LFB2:
4	.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
5_g.eh:
6	.quad	LFB2-.
7
8// CHECK:      ('cputype', 16777223)
9// CHECK-NEXT: ('cpusubtype', 3)
10// CHECK-NEXT: ('filetype', 1)
11// CHECK-NEXT: ('num_load_commands', 3)
12// CHECK-NEXT: ('load_commands_size', 336)
13// CHECK-NEXT: ('flag', 0)
14// CHECK-NEXT: ('reserved', 0)
15// CHECK-NEXT: ('load_commands', [
16// CHECK-NEXT:   # Load Command 0
17// CHECK-NEXT:  (('command', 25)
18// CHECK-NEXT:   ('size', 232)
19// CHECK-NEXT:   ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
20// CHECK-NEXT:   ('vm_addr', 0)
21// CHECK-NEXT:   ('vm_size', 8)
22// CHECK-NEXT:   ('file_offset', 368)
23// CHECK-NEXT:   ('file_size', 8)
24// CHECK-NEXT:   ('maxprot', 7)
25// CHECK-NEXT:   ('initprot', 7)
26// CHECK-NEXT:   ('num_sections', 2)
27// CHECK-NEXT:   ('flags', 0)
28// CHECK-NEXT:   ('sections', [
29// CHECK-NEXT:    # Section 0
30// CHECK-NEXT:   (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
31// CHECK-NEXT:    ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
32// CHECK-NEXT:    ('address', 0)
33// CHECK-NEXT:    ('size', 0)
34// CHECK-NEXT:    ('offset', 368)
35// CHECK-NEXT:    ('alignment', 0)
36// CHECK-NEXT:    ('reloc_offset', 0)
37// CHECK-NEXT:    ('num_reloc', 0)
38// CHECK-NEXT:    ('flags', 0x80000000)
39// CHECK-NEXT:    ('reserved1', 0)
40// CHECK-NEXT:    ('reserved2', 0)
41// CHECK-NEXT:    ('reserved3', 0)
42// CHECK-NEXT:   ),
43// CHECK-NEXT:  ('_relocations', [
44// CHECK-NEXT:  ])
45// CHECK-NEXT:  ('_section_data', '')
46// CHECK-NEXT:    # Section 1
47// CHECK-NEXT:   (('section_name', '__eh_frame\x00\x00\x00\x00\x00\x00')
48// CHECK-NEXT:    ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
49// CHECK-NEXT:    ('address', 0)
50// CHECK-NEXT:    ('size', 8)
51// CHECK-NEXT:    ('offset', 368)
52// CHECK-NEXT:    ('alignment', 0)
53// CHECK-NEXT:    ('reloc_offset', 376)
54// CHECK-NEXT:    ('num_reloc', 2)
55// CHECK-NEXT:    ('flags', 0x6800000b)
56// CHECK-NEXT:    ('reserved1', 0)
57// CHECK-NEXT:    ('reserved2', 0)
58// CHECK-NEXT:    ('reserved3', 0)
59// CHECK-NEXT:   ),
60// CHECK-NEXT:  ('_relocations', [
61// CHECK-NEXT:    # Relocation 0
62// CHECK-NEXT:    (('word-0', 0x0),
63// CHECK-NEXT:     ('word-1', 0x5e000001)),
64// CHECK-NEXT:    # Relocation 1
65// CHECK-NEXT:    (('word-0', 0x0),
66// CHECK-NEXT:     ('word-1', 0xe000000)),
67// CHECK-NEXT:  ])
68// CHECK-NEXT:  ('_section_data', '00000000 00000000')
69// CHECK-NEXT:  ])
70// CHECK-NEXT: ),
71// CHECK-NEXT:  # Load Command 1
72// CHECK-NEXT: (('command', 2)
73// CHECK-NEXT:  ('size', 24)
74// CHECK-NEXT:  ('symoff', 392)
75// CHECK-NEXT:  ('nsyms', 2)
76// CHECK-NEXT:  ('stroff', 424)
77// CHECK-NEXT:  ('strsize', 12)
78// CHECK-NEXT:  ('_string_data', '\x00_g\x00_g.eh\x00\x00\x00')
79// CHECK-NEXT:  ('_symbols', [
80// CHECK-NEXT:    # Symbol 0
81// CHECK-NEXT:   (('n_strx', 1)
82// CHECK-NEXT:    ('n_type', 0xe)
83// CHECK-NEXT:    ('n_sect', 1)
84// CHECK-NEXT:    ('n_desc', 0)
85// CHECK-NEXT:    ('n_value', 0)
86// CHECK-NEXT:    ('_string', '_g')
87// CHECK-NEXT:   ),
88// CHECK-NEXT:    # Symbol 1
89// CHECK-NEXT:   (('n_strx', 4)
90// CHECK-NEXT:    ('n_type', 0xe)
91// CHECK-NEXT:    ('n_sect', 2)
92// CHECK-NEXT:    ('n_desc', 0)
93// CHECK-NEXT:    ('n_value', 0)
94// CHECK-NEXT:    ('_string', '_g.eh')
95// CHECK-NEXT:   ),
96// CHECK-NEXT:  ])
97// CHECK-NEXT: ),
98// CHECK-NEXT:  # Load Command 2
99// CHECK-NEXT: (('command', 11)
100// CHECK-NEXT:  ('size', 80)
101// CHECK-NEXT:  ('ilocalsym', 0)
102// CHECK-NEXT:  ('nlocalsym', 2)
103// CHECK-NEXT:  ('iextdefsym', 2)
104// CHECK-NEXT:  ('nextdefsym', 0)
105// CHECK-NEXT:  ('iundefsym', 2)
106// CHECK-NEXT:  ('nundefsym', 0)
107// CHECK-NEXT:  ('tocoff', 0)
108// CHECK-NEXT:  ('ntoc', 0)
109// CHECK-NEXT:  ('modtaboff', 0)
110// CHECK-NEXT:  ('nmodtab', 0)
111// CHECK-NEXT:  ('extrefsymoff', 0)
112// CHECK-NEXT:  ('nextrefsyms', 0)
113// CHECK-NEXT:  ('indirectsymoff', 0)
114// CHECK-NEXT:  ('nindirectsyms', 0)
115// CHECK-NEXT:  ('extreloff', 0)
116// CHECK-NEXT:  ('nextrel', 0)
117// CHECK-NEXT:  ('locreloff', 0)
118// CHECK-NEXT:  ('nlocrel', 0)
119// CHECK-NEXT:  ('_indirect_symbols', [
120// CHECK-NEXT:  ])
121// CHECK-NEXT: ),
122// CHECK-NEXT:])
123