* 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 -
This commit is contained in:
nickysn 2013-10-15 22:06:16 +00:00
parent ea1370a89e
commit 7ff97d9b7d
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -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