diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2020-09-26 10:15:28 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2020-10-10 17:04:45 +0100 |
commit | a788c4555c6d17a5b37516e28844e6fd6013eb3e (patch) | |
tree | f33fa20c14b152ec1f1f8756d111edb63c3110bd /gcc/config/darwin.c | |
parent | 900c0ca22673ec4d382ce588057de240f887be3a (diff) | |
download | gcc-a788c4555c6d17a5b37516e28844e6fd6013eb3e.zip gcc-a788c4555c6d17a5b37516e28844e6fd6013eb3e.tar.gz gcc-a788c4555c6d17a5b37516e28844e6fd6013eb3e.tar.bz2 |
Objective-C, Darwin : Use special string sections for V2 NeXT runtime.
Newer versions of the runtime expect to find strings for class, method
and method types in set-aside sections rather than the general c_strings
one.
gcc/ChangeLog:
* config/darwin-sections.def (objc2_class_names_section,
objc2_method_names_section, objc2_method_types_section): New
* config/darwin.c (output_objc_section_asm_op): Output new
sections. (darwin_objc2_section): Select new sections where
used.
gcc/objc/ChangeLog:
* objc-next-runtime-abi-02.c
(next_runtime_abi_02_init_metadata_attributes): Attach metadata
for the special string sections to class, method and method type
string sections.
Diffstat (limited to 'gcc/config/darwin.c')
-rw-r--r-- | gcc/config/darwin.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 2311648..7eb288e 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -174,10 +174,12 @@ output_objc_section_asm_op (const void *directive) /* 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, @@ -1447,6 +1449,12 @@ darwin_objc2_section (tree decl ATTRIBUTE_UNUSED, tree meta, section * base) 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]; |