".section __DATA, __objc_imageinfo, regular, no_dead_strip", 1)
DEF_SECTION (objc2_constant_string_object_section, 0,
".section __DATA, __objc_stringobj, regular, no_dead_strip", 1)
+
+/* Additions for compatibility with later runtime conventions especially for
+ sections containing strings. */
+DEF_SECTION (objc2_class_names_section, 0,
+ ".section __TEXT, __objc_classname, cstring_literals", 1)
+
+DEF_SECTION (objc2_method_names_section, 0,
+ ".section __TEXT, __objc_methname, cstring_literals", 1)
+
+DEF_SECTION (objc2_method_types_section, 0,
+ ".section __TEXT, __objc_methtype, cstring_literals", 1)
/* ABI=2 */
static const enum darwin_section_enum tomarkv2[] =
{
+ objc2_method_names_section,
objc2_message_refs_section,
objc2_classdefs_section,
objc2_metadata_section,
objc2_classrefs_section,
+ objc2_class_names_section,
objc2_classlist_section,
objc2_categorylist_section,
objc2_selector_refs_section,
first. */
if (!strncmp (p, "V2_BASE", 7))
return base;
+ else if (!strncmp (p, "V2_CNAM", 7))
+ return darwin_sections[objc2_class_names_section];
+ else if (!strncmp (p, "V2_MNAM", 7))
+ return darwin_sections[objc2_method_names_section];
+ else if (!strncmp (p, "V2_MTYP", 7))
+ return darwin_sections[objc2_method_types_section];
else if (!strncmp (p, "V2_STRG", 7))
return darwin_sections[cstring_section];
meta_sel_refs = get_identifier ("V2_SRFS");
- meta_class_name =
- meta_meth_name =
- meta_meth_type =
+ meta_class_name = get_identifier ("V2_CNAM");
+ meta_meth_name = get_identifier ("V2_MNAM");
+
+ meta_meth_type = get_identifier ("V2_MTYP");
meta_prop_name_attr = get_identifier ("V2_STRG");
meta_mref = get_identifier ("V2_MREF");