1 /* Mach-O object file format
2 Copyright 2009, 2011 Free Software Foundation, Inc.
4 This file is part of GAS, the GNU Assembler.
6 GAS is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as
8 published by the Free Software Foundation; either version 3,
9 or (at your option) any later version.
11 GAS is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
14 the GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GAS; see the file COPYING. If not, write to the Free
18 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
21 /* Here we handle the mach-o directives that are common to all architectures.
23 Most significant are mach-o named sections and a variety of symbol type
26 /* Mach-O supports multiple, named segments each of which may contain
27 multiple named sections. Thus the concept of subsectioning is
28 handled by (say) having a __TEXT segment with appropriate flags from
29 which subsections are generated like __text, __const etc.
31 The well-known as short-hand section switch directives like .text, .data
32 etc. are mapped onto predefined segment/section pairs using facilites
33 supplied by the mach-o port of bfd.
35 A number of additional mach-o short-hand section switch directives are
38 #define OBJ_HEADER "obj-macho.h"
45 #include "mach-o/loader.h"
46 #include "obj-macho.h"
48 /* TODO: Implement "-dynamic"/"-static" command line options. */
50 static int obj_mach_o_is_static
;
52 /* Allow for special re-ordering on output. */
54 static int seen_objc_section
;
56 /* Remember the subsections_by_symbols state in case we need to reset
58 static int obj_mach_o_subsections_by_symbols
;
61 obj_mach_o_weak (int ignore ATTRIBUTE_UNUSED
)
69 /* Get symbol name. */
70 name
= input_line_pointer
;
71 c
= get_symbol_end ();
72 symbolP
= symbol_find_or_make (name
);
74 *input_line_pointer
= c
;
82 while (*input_line_pointer
!= '\n');
83 demand_empty_rest_of_line ();
86 /* This will put at most 16 characters (terminated by a ',' or newline) from
87 the input stream into dest. If there are more than 16 chars before the
88 delimiter, a warning is given and the string is truncated. On completion of
89 this function, input_line_pointer will point to the char after the ',' or
92 It trims leading and trailing space. */
95 collect_16char_name (char *dest
, const char *msg
, int require_comma
)
100 namstart
= input_line_pointer
;
102 while ( (c
= *input_line_pointer
) != ','
103 && !is_end_of_line
[(unsigned char) c
])
104 input_line_pointer
++;
107 int len
= input_line_pointer
- namstart
; /* could be zero. */
108 /* lose any trailing space. */
109 while (len
> 0 && namstart
[len
-1] == ' ')
113 *input_line_pointer
= '\0'; /* make a temp string. */
114 as_bad (_("the %s name '%s' is too long (maximum 16 characters)"),
116 *input_line_pointer
= c
; /* restore for printing. */
120 memcpy (dest
, namstart
, len
);
123 if (c
!= ',' && require_comma
)
125 as_bad (_("expected a %s name followed by a `,'"), msg
);
134 The '.section' specification syntax looks like:
135 .section <segment> , <section> [, type [, attribs [, size]]]
137 White space is allowed everywhere between elements.
139 <segment> and <section> may be from 0 to 16 chars in length - they may
140 contain spaces but leading and trailing space will be trimmed. It is
141 mandatory that they be present (or that zero-length names are indicated
144 There is only a single section type for any entry.
146 There may be multiple attributes, they are delimited by `+'.
148 Not all section types and attributes are accepted by the Darwin system
149 assemblers as user-specifiable - although, at present, we do here. */
152 obj_mach_o_section (int ignore ATTRIBUTE_UNUSED
)
156 unsigned int sectype
= BFD_MACH_O_S_REGULAR
;
157 unsigned int defsectype
= BFD_MACH_O_S_REGULAR
;
158 unsigned int sectype_given
= 0;
159 unsigned int secattr
= 0;
160 unsigned int defsecattr
= 0;
161 int secattr_given
= 0;
162 unsigned int secalign
= 0;
163 offsetT sizeof_stub
= 0;
164 const mach_o_section_name_xlat
* xlat
;
166 flagword oldflags
, flags
;
168 bfd_mach_o_section
*msect
;
172 /* Zero-length segment and section names are allowed. */
173 /* Parse segment name. */
174 memset (segname
, 0, sizeof(segname
));
175 if (collect_16char_name (segname
, "segment", 1))
177 ignore_rest_of_line ();
180 input_line_pointer
++; /* Skip the terminating ',' */
182 /* Parse section name. */
183 memset (sectname
, 0, sizeof(sectname
));
184 collect_16char_name (sectname
, "section", 0);
187 if (*input_line_pointer
== ',')
191 input_line_pointer
++;
193 p
= input_line_pointer
;
194 while ((c
= *input_line_pointer
) != ','
195 && !is_end_of_line
[(unsigned char) c
])
196 input_line_pointer
++;
198 len
= input_line_pointer
- p
;
199 /* strip trailing spaces. */
200 while (len
> 0 && p
[len
-1] == ' ')
204 /* Temporarily make a string from the token. */
206 sectype
= bfd_mach_o_get_section_type_from_name (p
);
207 if (sectype
> 255) /* Max Section ID == 255. */
209 as_bad (_("unknown or invalid section type '%s'"), p
);
210 sectype
= BFD_MACH_O_S_REGULAR
;
218 TODO: check validity of attributes for section type. */
219 if (sectype_given
&& c
== ',')
225 /* Skip initial `,' and subsequent `+'. */
226 input_line_pointer
++;
228 p
= input_line_pointer
;
229 while ((c
= *input_line_pointer
) != '+'
231 && !is_end_of_line
[(unsigned char) c
])
232 input_line_pointer
++;
234 len
= input_line_pointer
- p
;
235 /* strip trailing spaces. */
236 while (len
> 0 && p
[len
-1] == ' ')
240 /* Temporarily make a string from the token. */
242 attr
= bfd_mach_o_get_section_attribute_from_name (p
);
244 as_bad (_("unknown or invalid section attribute '%s'"), p
);
253 while (*input_line_pointer
== '+');
255 /* Parse sizeof_stub. */
256 if (*input_line_pointer
== ',')
258 if (sectype
!= BFD_MACH_O_S_SYMBOL_STUBS
)
259 as_bad (_("unexpected sizeof_stub expression"));
261 input_line_pointer
++;
262 sizeof_stub
= get_absolute_expression ();
264 else if (sectype
== BFD_MACH_O_S_SYMBOL_STUBS
)
265 as_bad (_("missing sizeof_stub expression"));
268 demand_empty_rest_of_line ();
270 flags
= SEC_NO_FLAGS
;
271 /* This provides default bfd flags and default mach-o section type and
272 attributes along with the canonical name. */
273 xlat
= bfd_mach_o_section_data_for_mach_sect (stdoutput
, segname
, sectname
);
276 name
= xstrdup (xlat
->bfd_name
);
277 flags
= xlat
->bfd_flags
;
278 defsectype
= xlat
->macho_sectype
;
279 defsecattr
= xlat
->macho_secattr
;
280 secalign
= xlat
->sectalign
;
284 /* There is no normal BFD section name for this section. Create one.
285 The name created doesn't really matter as it will never be written
287 size_t seglen
= strlen (segname
);
288 size_t sectlen
= strlen (sectname
);
291 n
= xmalloc (seglen
+ 1 + sectlen
+ 1);
292 memcpy (n
, segname
, seglen
);
294 memcpy (n
+ seglen
+ 1, sectname
, sectlen
);
295 n
[seglen
+ 1 + sectlen
] = 0;
299 #ifdef md_flush_pending_output
300 md_flush_pending_output ();
303 /* Sub-segments don't exists as is on Mach-O. */
304 sec
= subseg_new (name
, 0);
306 oldflags
= bfd_get_section_flags (stdoutput
, sec
);
307 msect
= bfd_mach_o_get_mach_o_section (sec
);
308 if (oldflags
== SEC_NO_FLAGS
)
310 if (! bfd_set_section_flags (stdoutput
, sec
, flags
))
311 as_warn (_("error setting flags for \"%s\": %s"),
312 bfd_section_name (stdoutput
, sec
),
313 bfd_errmsg (bfd_get_error ()));
314 strncpy (msect
->segname
, segname
, sizeof (msect
->segname
));
315 msect
->segname
[16] = 0;
316 strncpy (msect
->sectname
, sectname
, sizeof (msect
->sectname
));
317 msect
->sectname
[16] = 0;
318 msect
->align
= secalign
;
321 msect
->flags
= sectype
;
323 msect
->flags
|= secattr
;
325 msect
->flags
|= defsecattr
;
328 msect
->flags
= defsectype
| defsecattr
;
329 msect
->reserved2
= sizeof_stub
;
331 else if (flags
!= SEC_NO_FLAGS
)
333 if (flags
!= oldflags
334 || msect
->flags
!= (secattr
| sectype
))
335 as_warn (_("Ignoring changed section attributes for %s"), name
);
340 obj_mach_o_segT_from_bfd_name (const char *nam
, int must_succeed
)
342 const mach_o_section_name_xlat
*xlat
;
346 /* BFD has tables of flags and default attributes for all the sections that
347 have a 'canonical' name. */
348 xlat
= bfd_mach_o_section_data_for_bfd_name (stdoutput
, nam
, &segn
);
352 as_fatal (_("BFD is out of sync with GAS, "
353 "unhandled well-known section type `%s'"), nam
);
357 sec
= bfd_get_section_by_name (stdoutput
, nam
);
360 bfd_mach_o_section
*msect
;
362 sec
= subseg_force_new (xlat
->bfd_name
, 0);
364 /* Set default type, attributes and alignment. */
365 msect
= bfd_mach_o_get_mach_o_section (sec
);
366 msect
->flags
= xlat
->macho_sectype
| xlat
->macho_secattr
;
367 msect
->align
= xlat
->sectalign
;
369 if ((msect
->flags
& BFD_MACH_O_SECTION_TYPE_MASK
)
370 == BFD_MACH_O_S_ZEROFILL
)
371 seg_info (sec
)->bss
= 1;
377 static const char * const known_sections
[] =
382 /* 2 */ ".static_const",
386 /* 6 */ ".literal16",
387 /* 7 */ ".constructor",
388 /* 8 */ ".destructor",
391 /* 10 */ ".const_data",
392 /* 11 */ ".static_data",
393 /* 12 */ ".mod_init_func",
394 /* 13 */ ".mod_term_func",
399 /* Interface for a known non-optional section directive. */
402 obj_mach_o_known_section (int sect_index
)
406 #ifdef md_flush_pending_output
407 md_flush_pending_output ();
410 section
= obj_mach_o_segT_from_bfd_name (known_sections
[sect_index
], 1);
412 subseg_set (section
, 0);
414 /* else, we leave the section as it was; there was a fatal error anyway. */
417 static const char * const objc_sections
[] =
420 /* 1 */ ".objc_class",
421 /* 2 */ ".objc_meta_class",
422 /* 3 */ ".objc_cat_cls_meth",
423 /* 4 */ ".objc_cat_inst_meth",
424 /* 5 */ ".objc_protocol",
425 /* 6 */ ".objc_string_object",
426 /* 7 */ ".objc_cls_meth",
427 /* 8 */ ".objc_inst_meth",
428 /* 9 */ ".objc_cls_refs",
429 /* 10 */ ".objc_message_refs",
430 /* 11 */ ".objc_symbols",
431 /* 12 */ ".objc_category",
432 /* 13 */ ".objc_class_vars",
433 /* 14 */ ".objc_instance_vars",
434 /* 15 */ ".objc_module_info",
435 /* 16 */ ".cstring", /* objc_class_names Alias for .cstring */
436 /* 17 */ ".cstring", /* Alias objc_meth_var_types for .cstring */
437 /* 18 */ ".cstring", /* objc_meth_var_names Alias for .cstring */
438 /* 19 */ ".objc_selector_strs",
439 /* 20 */ ".objc_image_info", /* extension. */
440 /* 21 */ ".objc_selector_fixup", /* extension. */
441 /* 22 */ ".objc1_class_ext", /* ObjC-1 extension. */
442 /* 23 */ ".objc1_property_list", /* ObjC-1 extension. */
443 /* 24 */ ".objc1_protocol_ext" /* ObjC-1 extension. */
446 /* This currently does the same as known_sections, but kept separate for
447 ease of maintenance. */
450 obj_mach_o_objc_section (int sect_index
)
454 #ifdef md_flush_pending_output
455 md_flush_pending_output ();
458 section
= obj_mach_o_segT_from_bfd_name (objc_sections
[sect_index
], 1);
461 seen_objc_section
= 1; /* We need to ensure that certain sections are
462 present and in the right order. */
463 subseg_set (section
, 0);
466 /* else, we leave the section as it was; there was a fatal error anyway. */
469 /* Debug section directives. */
471 static const char * const debug_sections
[] =
475 /* 1 */ ".debug_frame",
476 /* 2 */ ".debug_info",
477 /* 3 */ ".debug_abbrev",
478 /* 4 */ ".debug_aranges",
479 /* 5 */ ".debug_macinfo",
480 /* 6 */ ".debug_line",
481 /* 7 */ ".debug_loc",
482 /* 8 */ ".debug_pubnames",
483 /* 9 */ ".debug_pubtypes",
484 /* 10 */ ".debug_str",
485 /* 11 */ ".debug_ranges",
486 /* 12 */ ".debug_macro"
489 /* ??? Maybe these should be conditional on gdwarf-*.
490 It`s also likely that we will need to be able to set them from the cfi
494 obj_mach_o_debug_section (int sect_index
)
498 #ifdef md_flush_pending_output
499 md_flush_pending_output ();
502 section
= obj_mach_o_segT_from_bfd_name (debug_sections
[sect_index
], 1);
504 subseg_set (section
, 0);
506 /* else, we leave the section as it was; there was a fatal error anyway. */
509 /* This could be moved to the tc-xx files, but there is so little dependency
510 there, that the code might as well be shared. */
519 /* The extensions here are for specific sections that are generated by GCC
520 and Darwin system tools, but don't have directives in the `system as'. */
522 static const struct opt_tgt_sect tgt_sections
[] =
524 /* 0 */ { NULL
, 0, 0},
525 /* 1 */ { ".lazy_symbol_pointer", 0, 0},
526 /* 2 */ { ".lazy_symbol_pointer2", 0, 0}, /* X86 - extension */
527 /* 3 */ { ".lazy_symbol_pointer3", 0, 0}, /* X86 - extension */
528 /* 4 */ { ".non_lazy_symbol_pointer", 0, 0},
529 /* 5 */ { ".non_lazy_symbol_pointer_x86", 0, 0}, /* X86 - extension */
530 /* 6 */ { ".symbol_stub", 16, 20},
531 /* 7 */ { ".symbol_stub1", 0, 16}, /* PPC - extension */
532 /* 8 */ { ".picsymbol_stub", 26, 36},
533 /* 9 */ { ".picsymbol_stub1", 0, 32}, /* PPC - extension */
534 /* 10 */ { ".picsymbol_stub2", 25, 0}, /* X86 - extension */
535 /* 11 */ { ".picsymbol_stub3", 5, 0}, /* X86 - extension */
538 /* Interface for an optional section directive. */
541 obj_mach_o_opt_tgt_section (int sect_index
)
543 const struct opt_tgt_sect
*tgtsct
= &tgt_sections
[sect_index
];
546 #ifdef md_flush_pending_output
547 md_flush_pending_output ();
550 section
= obj_mach_o_segT_from_bfd_name (tgtsct
->name
, 0);
553 as_bad (_("%s is not used for the selected target"), tgtsct
->name
);
554 /* Leave the section as it is. */
558 bfd_mach_o_section
*mo_sec
= bfd_mach_o_get_mach_o_section (section
);
559 subseg_set (section
, 0);
560 #if defined (TC_I386)
561 mo_sec
->reserved2
= tgtsct
->x86_val
;
562 #elif defined (TC_PPC)
563 mo_sec
->reserved2
= tgtsct
->ppc_val
;
565 mo_sec
->reserved2
= 0;
570 /* We don't necessarily have the three 'base' sections on mach-o.
571 Normally, we would start up with only the 'text' section defined.
572 However, even that can be suppressed with (TODO) c/l option "-n".
573 Thus, we have to be able to create all three sections on-demand. */
576 obj_mach_o_base_section (int sect_index
)
580 #ifdef md_flush_pending_output
581 md_flush_pending_output ();
584 /* We don't support numeric (or any other) qualifications on the
585 well-known section shorthands. */
586 demand_empty_rest_of_line ();
590 /* Handle the three sections that are globally known within GAS.
591 For Mach-O, these are created on demand rather than at startup. */
593 if (text_section
== NULL
)
594 text_section
= obj_mach_o_segT_from_bfd_name (TEXT_SECTION_NAME
, 1);
595 if (obj_mach_o_is_static
)
597 bfd_mach_o_section
*mo_sec
598 = bfd_mach_o_get_mach_o_section (text_section
);
599 mo_sec
->flags
&= ~BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS
;
601 section
= text_section
;
604 if (data_section
== NULL
)
605 data_section
= obj_mach_o_segT_from_bfd_name (DATA_SECTION_NAME
, 1);
606 section
= data_section
;
609 /* ??? maybe this achieves very little, as an addition. */
610 if (bss_section
== NULL
)
612 bss_section
= obj_mach_o_segT_from_bfd_name (BSS_SECTION_NAME
, 1);
613 seg_info (bss_section
)->bss
= 1;
615 section
= bss_section
;
618 as_fatal (_("internal error: base section index out of range"));
622 subseg_set (section
, 0);
625 /* This finishes off parsing a .comm or .lcomm statement, which both can have
626 an (optional) alignment field. It also allows us to create the bss section
630 obj_mach_o_common_parse (int is_local
, symbolS
*symbolP
,
635 /* Both comm and lcomm take an optional alignment, as a power
636 of two between 1 and 15. */
637 if (*input_line_pointer
== ',')
639 /* We expect a power of 2. */
640 align
= parse_align (0);
641 if (align
== (addressT
) -1)
645 as_warn (_("Alignment (%lu) too large: 15 assumed."),
646 (unsigned long)align
);
653 /* Create the BSS section on demand. */
654 if (bss_section
== NULL
)
656 bss_section
= obj_mach_o_segT_from_bfd_name (BSS_SECTION_NAME
, 1);
657 seg_info (bss_section
)->bss
= 1;
659 bss_alloc (symbolP
, size
, align
);
660 S_CLEAR_EXTERNAL (symbolP
);
664 S_SET_VALUE (symbolP
, size
);
665 S_SET_ALIGN (symbolP
, align
);
666 S_SET_EXTERNAL (symbolP
);
667 S_SET_SEGMENT (symbolP
, bfd_com_section_ptr
);
670 symbol_get_bfdsym (symbolP
)->flags
|= BSF_OBJECT
;
676 obj_mach_o_comm (int is_local
)
678 s_comm_internal (is_local
, obj_mach_o_common_parse
);
681 /* Set properties that apply to the whole file. At present, the only
682 one defined, is subsections_via_symbols. */
684 typedef enum obj_mach_o_file_properties
{
685 OBJ_MACH_O_FILE_PROP_NONE
= 0,
686 OBJ_MACH_O_FILE_PROP_SUBSECTS_VIA_SYMS
,
687 OBJ_MACH_O_FILE_PROP_MAX
688 } obj_mach_o_file_properties
;
691 obj_mach_o_fileprop (int prop
)
693 if (prop
< 0 || prop
>= OBJ_MACH_O_FILE_PROP_MAX
)
694 as_fatal (_("internal error: bad file property ID %d"), prop
);
696 switch ((obj_mach_o_file_properties
) prop
)
698 case OBJ_MACH_O_FILE_PROP_SUBSECTS_VIA_SYMS
:
699 obj_mach_o_subsections_by_symbols
= 1;
700 if (!bfd_set_private_flags (stdoutput
,
701 BFD_MACH_O_MH_SUBSECTIONS_VIA_SYMBOLS
))
702 as_bad (_("failed to set subsections by symbols"));
703 demand_empty_rest_of_line ();
710 /* Dummy function to allow test-code to work while we are working
714 obj_mach_o_placeholder (int arg ATTRIBUTE_UNUSED
)
716 ignore_rest_of_line ();
719 const pseudo_typeS mach_o_pseudo_table
[] =
721 /* Section directives. */
722 { "comm", obj_mach_o_comm
, 0 },
723 { "lcomm", obj_mach_o_comm
, 1 },
725 { "text", obj_mach_o_base_section
, 1},
726 { "data", obj_mach_o_base_section
, 2},
727 { "bss", obj_mach_o_base_section
, 3}, /* extension */
729 { "const", obj_mach_o_known_section
, 1},
730 { "static_const", obj_mach_o_known_section
, 2},
731 { "cstring", obj_mach_o_known_section
, 3},
732 { "literal4", obj_mach_o_known_section
, 4},
733 { "literal8", obj_mach_o_known_section
, 5},
734 { "literal16", obj_mach_o_known_section
, 6},
735 { "constructor", obj_mach_o_known_section
, 7},
736 { "destructor", obj_mach_o_known_section
, 8},
737 { "eh_frame", obj_mach_o_known_section
, 9},
739 { "const_data", obj_mach_o_known_section
, 10},
740 { "static_data", obj_mach_o_known_section
, 11},
741 { "mod_init_func", obj_mach_o_known_section
, 12},
742 { "mod_term_func", obj_mach_o_known_section
, 13},
743 { "dyld", obj_mach_o_known_section
, 14},
744 { "cfstring", obj_mach_o_known_section
, 15},
746 { "objc_class", obj_mach_o_objc_section
, 1},
747 { "objc_meta_class", obj_mach_o_objc_section
, 2},
748 { "objc_cat_cls_meth", obj_mach_o_objc_section
, 3},
749 { "objc_cat_inst_meth", obj_mach_o_objc_section
, 4},
750 { "objc_protocol", obj_mach_o_objc_section
, 5},
751 { "objc_string_object", obj_mach_o_objc_section
, 6},
752 { "objc_cls_meth", obj_mach_o_objc_section
, 7},
753 { "objc_inst_meth", obj_mach_o_objc_section
, 8},
754 { "objc_cls_refs", obj_mach_o_objc_section
, 9},
755 { "objc_message_refs", obj_mach_o_objc_section
, 10},
756 { "objc_symbols", obj_mach_o_objc_section
, 11},
757 { "objc_category", obj_mach_o_objc_section
, 12},
758 { "objc_class_vars", obj_mach_o_objc_section
, 13},
759 { "objc_instance_vars", obj_mach_o_objc_section
, 14},
760 { "objc_module_info", obj_mach_o_objc_section
, 15},
761 { "objc_class_names", obj_mach_o_objc_section
, 16}, /* Alias for .cstring */
762 { "objc_meth_var_types", obj_mach_o_objc_section
, 17}, /* Alias for .cstring */
763 { "objc_meth_var_names", obj_mach_o_objc_section
, 18}, /* Alias for .cstring */
764 { "objc_selector_strs", obj_mach_o_objc_section
, 19},
765 { "objc_image_info", obj_mach_o_objc_section
, 20}, /* extension. */
766 { "objc_selector_fixup", obj_mach_o_objc_section
, 21}, /* extension. */
767 { "objc1_class_ext", obj_mach_o_objc_section
, 22}, /* ObjC-1 extension. */
768 { "objc1_property_list", obj_mach_o_objc_section
, 23}, /* ObjC-1 extension. */
769 { "objc1_protocol_ext", obj_mach_o_objc_section
, 24}, /* ObjC-1 extension. */
771 { "debug_frame", obj_mach_o_debug_section
, 1}, /* extension. */
772 { "debug_info", obj_mach_o_debug_section
, 2}, /* extension. */
773 { "debug_abbrev", obj_mach_o_debug_section
, 3}, /* extension. */
774 { "debug_aranges", obj_mach_o_debug_section
, 4}, /* extension. */
775 { "debug_macinfo", obj_mach_o_debug_section
, 5}, /* extension. */
776 { "debug_line", obj_mach_o_debug_section
, 6}, /* extension. */
777 { "debug_loc", obj_mach_o_debug_section
, 7}, /* extension. */
778 { "debug_pubnames", obj_mach_o_debug_section
, 8}, /* extension. */
779 { "debug_pubtypes", obj_mach_o_debug_section
, 9}, /* extension. */
780 { "debug_str", obj_mach_o_debug_section
, 10}, /* extension. */
781 { "debug_ranges", obj_mach_o_debug_section
, 11}, /* extension. */
782 { "debug_macro", obj_mach_o_debug_section
, 12}, /* extension. */
784 { "lazy_symbol_pointer", obj_mach_o_opt_tgt_section
, 1},
785 { "lazy_symbol_pointer2", obj_mach_o_opt_tgt_section
, 2}, /* extension. */
786 { "lazy_symbol_pointer3", obj_mach_o_opt_tgt_section
, 3}, /* extension. */
787 { "non_lazy_symbol_pointer", obj_mach_o_opt_tgt_section
, 4},
788 { "non_lazy_symbol_pointer_x86", obj_mach_o_opt_tgt_section
, 5}, /* extension. */
789 { "symbol_stub", obj_mach_o_opt_tgt_section
, 6},
790 { "symbol_stub1", obj_mach_o_opt_tgt_section
, 7}, /* extension. */
791 { "picsymbol_stub", obj_mach_o_opt_tgt_section
, 8}, /* extension. */
792 { "picsymbol_stub1", obj_mach_o_opt_tgt_section
, 9}, /* extension. */
793 { "picsymbol_stub2", obj_mach_o_opt_tgt_section
, 4}, /* extension. */
794 { "picsymbol_stub3", obj_mach_o_opt_tgt_section
, 4}, /* extension. */
796 { "section", obj_mach_o_section
, 0},
798 /* Symbol-related. */
799 { "indirect_symbol", obj_mach_o_placeholder
, 0},
800 { "weak_definition", obj_mach_o_placeholder
, 0},
801 { "private_extern", obj_mach_o_placeholder
, 0},
802 { "weak", obj_mach_o_weak
, 0}, /* extension */
805 { "subsections_via_symbols", obj_mach_o_fileprop
,
806 OBJ_MACH_O_FILE_PROP_SUBSECTS_VIA_SYMS
},