diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2020-10-03 13:51:29 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2020-10-10 17:23:10 +0100 |
commit | bb675539ba2f661c6bfab258847b41798a449432 (patch) | |
tree | 69b462b93a43b79af0a08f8d663bf0db0683b3d4 /gcc | |
parent | ecd616f68067cca5e7051c8872b76311b09d8f45 (diff) | |
download | gcc-bb675539ba2f661c6bfab258847b41798a449432.zip gcc-bb675539ba2f661c6bfab258847b41798a449432.tar.gz gcc-bb675539ba2f661c6bfab258847b41798a449432.tar.bz2 |
Darwin : Only emit Objective-C section switches for older linkers.
At one time, the system linkers needed to have at least a dummy
entry for every Objective-C section in use. This removes the extra
emitted code when it is not needed by the linker.
gcc/ChangeLog:
* config/darwin.c (output_objc_section_asm_op): Avoid extra
objective-c section switches unless the linker needs them.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/darwin.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index e101f8e..370ee5c 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -136,7 +136,7 @@ output_objc_section_asm_op (const void *directive) order in the object. The code below implements this by emitting a section header for each ObjC section the first time that an ObjC section is requested. */ - if (! been_here) + if (darwin_symbol_stubs && ! been_here) { section *saved_in_section = in_section; static const enum darwin_section_enum tomark[] = @@ -176,20 +176,21 @@ output_objc_section_asm_op (const void *directive) { objc2_method_names_section, objc2_message_refs_section, + objc2_selector_refs_section, + objc2_ivar_section, objc2_classdefs_section, objc2_metadata_section, objc2_classrefs_section, objc2_class_names_section, objc2_classlist_section, objc2_categorylist_section, - objc2_selector_refs_section, objc2_nonlazy_class_section, objc2_nonlazy_category_section, objc2_protocollist_section, objc2_protocolrefs_section, objc2_super_classrefs_section, + objc2_constant_string_object_section, objc2_image_info_section, - objc2_constant_string_object_section } ; size_t i; |