Просмотр исходного кода

* tcgguidconstnode: create a new object section before emitting data, otherwise data ends up in arbitrary section, causing e.g. IE 200602289 if it happens to be .bss.

git-svn-id: trunk@19640 -
sergei 13 лет назад
Родитель
Сommit
c56ef119a1
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      compiler/ncgcon.pas

+ 3 - 2
compiler/ncgcon.pas

@@ -458,7 +458,7 @@ implementation
 
 
 
 
 {*****************************************************************************
 {*****************************************************************************
-                          TCGPOINTERCONSTNODE
+                          TCGGUIDCONSTNODE
 *****************************************************************************}
 *****************************************************************************}
 
 
     procedure tcgguidconstnode.pass_generate_code;
     procedure tcgguidconstnode.pass_generate_code;
@@ -469,7 +469,8 @@ implementation
         location_reset_ref(location,LOC_CREFERENCE,OS_NO,const_align(16));
         location_reset_ref(location,LOC_CREFERENCE,OS_NO,const_align(16));
         { label for GUID }
         { label for GUID }
         current_asmdata.getdatalabel(tmplabel);
         current_asmdata.getdatalabel(tmplabel);
-        current_asmdata.asmlists[al_typedconsts].concat(tai_align.create(const_align(16)));
+        maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
+        new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata_norel,tmplabel.name,const_align(16));
         current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(tmplabel));
         current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(tmplabel));
         current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_32bit(longint(value.D1)));
         current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_32bit(longint(value.D1)));
         current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_16bit(value.D2));
         current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_16bit(value.D2));