Jelajahi Sumber

* fix for Mantis #37559: the adjustment of the section type should only be done for internal COFF writers

git-svn-id: trunk@46410 -
svenbarth 5 tahun lalu
induk
melakukan
17d583a419
1 mengubah file dengan 8 tambahan dan 5 penghapusan
  1. 8 5
      compiler/ogbase.pas

+ 8 - 5
compiler/ogbase.pas

@@ -1315,12 +1315,15 @@ implementation
           {arm_attribute} [oso_data]
         );
       begin
-        if (aType in [sec_rodata,sec_rodata_norel]) then
+        if target_asm.id in asms_int_coff then
           begin
-            if (target_info.system in systems_all_windows) then
-              aType:=sec_rodata_norel
-            else
-              aType:=sec_data;
+            if (aType in [sec_rodata,sec_rodata_norel]) then
+              begin
+                if (target_info.system in systems_all_windows) then
+                  aType:=sec_rodata_norel
+                else
+                  aType:=sec_data;
+              end;
           end;
         result:=secoptions[atype];
 {$ifdef OMFOBJSUPPORT}