[llvm-commits] [llvm-gcc-4.0] r42166 - /llvm-gcc-4.0/trunk/gcc/config/darwin.c
Devang Patel
dpatel at apple.com
Thu Sep 20 10:50:05 PDT 2007
Author: dpatel
Date: Thu Sep 20 12:50:05 2007
New Revision: 42166
URL: http://llvm.org/viewvc/llvm-project?rev=42166&view=rev
Log:
Fix darwin objective-c sections.
Modified:
llvm-gcc-4.0/trunk/gcc/config/darwin.c
Modified: llvm-gcc-4.0/trunk/gcc/config/darwin.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/config/darwin.c?rev=42166&r1=42165&r2=42166&view=diff
==============================================================================
--- llvm-gcc-4.0/trunk/gcc/config/darwin.c (original)
+++ llvm-gcc-4.0/trunk/gcc/config/darwin.c Thu Sep 20 12:50:05 2007
@@ -1425,7 +1425,9 @@
else if (!strncmp (name, "CATEGORY_", 9))
return "__OBJC,__category,regular,no_dead_strip";
else if (!strncmp (name, "SELECTOR_REFERENCES", 19))
- return "__OBJC,__message_refs,literal_pointers,no_dead_strip";
+ return (flag_objc_abi == 1 ?
+ "__OBJC,__message_refs,literal_pointers,no_dead_strip" :
+ "__DATA, __objc_selrefs, regular, no_dead_strip");
else if (!strncmp (name, "SELECTOR_FIXUP", 14))
return "__OBJC,__sel_fixup,regular";/*,no_dead_strip";*/
else if (!strncmp (name, "SYMBOLS", 7))
@@ -1433,7 +1435,9 @@
else if (!strncmp (name, "MODULES", 7))
return "__OBJC,__module_info,regular,no_dead_strip";
else if (!strncmp (name, "IMAGE_INFO", 10))
- return "__OBJC,__image_info,regular";/*,no_dead_strip";*/
+ return (flag_objc_abi == 1 ?
+ "__OBJC,__image_info,regular" /*,no_dead_strip";*/ :
+ "__DATA, __objc_imageinfo, regular, no_dead_strip");
else if (!strncmp (name, "PROTOCOL_INSTANCE_METHODS_", 26))
return "__OBJC,__cat_inst_meth,regular,no_dead_strip";
else if (!strncmp (name, "PROTOCOL_CLASS_METHODS_", 23))
@@ -1442,7 +1446,28 @@
return "__OBJC,__cat_cls_meth,regular,no_dead_strip";
else if (!strncmp (name, "PROTOCOL_", 9))
return "__OBJC,__protocol,regular,no_dead_strip";
- else
+ else if (flag_objc_abi == 2) {
+ if (!strncmp (name, "CLASSLIST_REFERENCES_", 21))
+ return "__DATA, __objc_classrefs, regular, no_dead_strip";
+ else if (!strncmp (name, "CLASSLIST_SUP_REFS_", 19))
+ return "__DATA, __objc_superrefs, regular, no_dead_strip";
+ else if (!strncmp (name, "MESSAGE_REF", 11))
+ return "__DATA, __objc_msgrefs, regular, no_dead_strip";
+ else if (!strncmp (name, "LABEL_CLASS_", 12))
+ return "__DATA, __objc_classlist, regular, no_dead_strip";
+ else if (!strncmp (name, "LABEL_PROTOCOL_", 15))
+ return "__DATA, __objc_protolist, regular, no_dead_strip";
+ else if (!strncmp (name, "LABEL_CATEGORY_", 15))
+ return "__DATA, __objc_catlist, regular, no_dead_strip";
+ else if (!strncmp (name, "LABEL_NONLAZY_CLASS_", 20))
+ return "__DATA, __objc_nlclslist, regular, no_dead_strip";
+ else if (!strncmp (name, "LABEL_NONLAZY_CAGEGORY_", 23))
+ return "__DATA, __objc_nlcatlist, regular, no_dead_strip";
+ else if (!strncmp (name, "PROTOCOL_REFERENCE_", 19))
+ return "__DATA, __objc_protorefs, regular, no_dead_strip";
+ else
+ return 0;
+ } else
return 0;
}
#endif
More information about the llvm-commits
mailing list