2
0
Эх сурвалжийг харах

* create new object file when creating new section for ansistring/
unicodestring constants so they can be smartlinked away on
platforms using library-based smartlinking (mantis #22888)

git-svn-id: trunk@22417 -

Jonas Maebe 13 жил өмнө
parent
commit
a13c9d93ff
1 өөрчлөгдсөн 5 нэмэгдсэн , 1 устгасан
  1. 5 1
      compiler/asmutils.pas

+ 5 - 1
compiler/asmutils.pas

@@ -60,7 +60,10 @@ uses
         current_asmdata.getdatalabel(result.lab);
         result.ofs:=0;
         if NewSection then
-          new_section(list,sec_rodata,result.lab.name,const_align(sizeof(pint)));
+          begin
+            maybe_new_object_file(list);
+            new_section(list,sec_rodata,result.lab.name,const_align(sizeof(pint)));
+          end;
         { put label before header on Darwin, because there the linker considers
           a global symbol to be the start of a new subsection }
         if target_info.system in systems_darwin then
@@ -101,6 +104,7 @@ uses
       begin
         current_asmdata.getdatalabel(result.lab);
         result.ofs:=0;
+        maybe_new_object_file(list);
         new_section(list,sec_rodata,result.lab.name,const_align(sizeof(pint)));
         strlength := getlengthwidestring(pcompilerwidestring(data));
         if Winlike then