Ver Fonte

* specify AT_DATA when refering to the 'RESSTR' symbols; among other things,
this fixes resourcestring constants in the i8086 memory model.

git-svn-id: trunk@25796 -

nickysn há 11 anos atrás
pai
commit
7ff97d9b7d
2 ficheiros alterados com 3 adições e 3 exclusões
  1. 1 1
      compiler/ncgld.pas
  2. 2 2
      compiler/ngtcon.pas

+ 1 - 1
compiler/ncgld.pas

@@ -292,7 +292,7 @@ implementation
                 if tconstsym(symtableentry).consttyp=constresourcestring then
                   begin
                      location_reset_ref(location,LOC_CREFERENCE,OS_ADDR,sizeof(pint));
-                     location.reference.symbol:=current_asmdata.RefAsmSymbol(make_mangledname('RESSTR',symtableentry.owner,symtableentry.name));
+                     location.reference.symbol:=current_asmdata.RefAsmSymbol(make_mangledname('RESSTR',symtableentry.owner,symtableentry.name),AT_DATA);
                      { Resourcestring layout:
                          TResourceStringRecord = Packed Record
                             Name,

+ 2 - 2
compiler/ngtcon.pas

@@ -491,7 +491,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
               begin
                 current_asmdata.ResStrInits.Concat(
                   TTCInitItem.Create(tcsym,curoffset,
-                  current_asmdata.RefAsmSymbol(make_mangledname('RESSTR',hsym.owner,hsym.name)))
+                  current_asmdata.RefAsmSymbol(make_mangledname('RESSTR',hsym.owner,hsym.name),AT_DATA))
                 );
                 Include(tcsym.varoptions,vo_force_finalize);
               end;
@@ -959,7 +959,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
                       list.concat(Tai_const.Createname(tlabelsym(srsym).mangledname,offset));
                     constsym :
                       if tconstsym(srsym).consttyp=constresourcestring then
-                        list.concat(Tai_const.Createname(make_mangledname('RESSTR',tconstsym(srsym).owner,tconstsym(srsym).name),sizeof(pint)))
+                        list.concat(Tai_const.Createname(make_mangledname('RESSTR',tconstsym(srsym).owner,tconstsym(srsym).name),AT_DATA,sizeof(pint)))
                       else
                         Message(type_e_variable_id_expected);
                     else