Browse Source

* changed some Objective-C section declarations to match what's outputted by
current clang versions

git-svn-id: trunk@26333 -

Jonas Maebe 11 years ago
parent
commit
5cbcfca33f
1 changed files with 21 additions and 3 deletions
  1. 21 3
      compiler/aggas.pas

+ 21 - 3
compiler/aggas.pas

@@ -1792,7 +1792,10 @@ implementation
               end;
               end;
             sec_objc_image_info:
             sec_objc_image_info:
               begin
               begin
-                result:='.section __OBJC, __image_info, regular, no_dead_strip';
+                if (target_info.system in systems_objc_nfabi) then
+                  result:='.section __DATA,__objc_imageinfo,regular,no_dead_strip'
+                else
+                  result:='.section __OBJC, __image_info, regular, no_dead_strip';
                 exit;
                 exit;
               end;
               end;
             sec_objc_cstring_object:
             sec_objc_cstring_object:
@@ -1821,12 +1824,27 @@ implementation
                     exit;
                     exit;
                   end;
                   end;
               end;
               end;
-            sec_objc_meth_var_names,
+            sec_objc_meth_var_types:
+              begin
+                if (target_info.system in systems_objc_nfabi) then
+                  begin
+                    result:='.section __TEXT,__objc_methtype,cstring_literals';
+                    exit
+                  end;
+              end;
+            sec_objc_meth_var_names:
+              begin
+                if (target_info.system in systems_objc_nfabi) then
+                  begin
+                    result:='.section __TEXT,__objc_methname,cstring_literals';
+                    exit
+                  end;
+              end;
             sec_objc_class_names:
             sec_objc_class_names:
               begin
               begin
                 if (target_info.system in systems_objc_nfabi) then
                 if (target_info.system in systems_objc_nfabi) then
                   begin
                   begin
-                    result:='.cstring';
+                    result:='.section __TEXT,__objc_classname,cstring_literals';
                     exit
                     exit
                   end;
                   end;
               end;
               end;