* add number prefix to resstr symbols so the get ordered correctly when the

sections are sorted

git-svn-id: trunk@4003 -
This commit is contained in:
peter 2006-06-29 20:50:55 +00:00
parent bd32ab4ad1
commit 2bd5aca1b5
2 changed files with 6 additions and 6 deletions

View File

@ -156,7 +156,7 @@ uses
maybe_new_object_file(current_asmdata.asmlists[al_resourcestrings]);
new_section(current_asmdata.asmlists[al_resourcestrings],sec_data,'resstridx_'+current_module.localsymtable.name^+'_start',sizeof(aint));
current_asmdata.AsmLists[al_resourcestrings].concat(tai_symbol.createname_global(
make_mangledname('RESSTR',current_module.localsymtable,'START'),AT_DATA,0));
make_mangledname('RESSTR',current_module.localsymtable,'_1_START'),AT_DATA,0));
{ Write unitname entry }
namelab:=WriteValueString(@current_module.localsymtable.name^[1],length(current_module.localsymtable.name^));
@ -172,7 +172,7 @@ uses
R:=TResourceStringItem(List.First);
while assigned(R) do
begin
new_section(current_asmdata.asmlists[al_const],sec_rodata,'resstrdata_'+R.name,sizeof(aint));
new_section(current_asmdata.asmlists[al_const],sec_rodata,make_mangledname('RESSTR',current_module.localsymtable,'_2_'+r.name),sizeof(aint));
{ Write default value }
if assigned(R.value) and (R.len<>0) then
valuelab:=WriteValueString(R.Value,R.Len)
@ -190,7 +190,7 @@ uses
HashValue : LongWord;
end;
}
new_section(current_asmdata.asmlists[al_resourcestrings],sec_data,'resstridx_'+r.name,sizeof(aint));
new_section(current_asmdata.asmlists[al_resourcestrings],sec_data,make_mangledname('RESSTR',current_module.localsymtable,'_i_'+r.name),sizeof(aint));
resstrlab:=current_asmdata.DefineAsmSymbol(make_mangledname('RESSTR',R.Sym.owner,R.Sym.name),AB_GLOBAL,AT_DATA);
current_asmdata.asmlists[al_resourcestrings].concat(tai_symbol.Create_global(resstrlab,0));
current_asmdata.asmlists[al_resourcestrings].concat(tai_const.create_sym(namelab));
@ -205,7 +205,7 @@ uses
end;
new_section(current_asmdata.asmlists[al_resourcestrings],sec_data,'resstridx_'+current_module.localsymtable.name^+'_end',sizeof(aint));
current_asmdata.AsmLists[al_resourcestrings].concat(tai_symbol.createname_global(
make_mangledname('RESSTR',current_module.localsymtable,'END'),AT_DATA,0));
make_mangledname('RESSTR',current_module.localsymtable,'_3_END'),AT_DATA,0));
end;

View File

@ -296,8 +296,8 @@ implementation
begin
If (hp.flags and uf_has_resourcestrings)=uf_has_resourcestrings then
begin
ResourceStringTables.concat(Tai_const.Createname(make_mangledname('RESSTR',hp.localsymtable,'START'),0));
ResourceStringTables.concat(Tai_const.Createname(make_mangledname('RESSTR',hp.localsymtable,'END'),0));
ResourceStringTables.concat(Tai_const.Createname(make_mangledname('RESSTR',hp.localsymtable,'_1_START'),0));
ResourceStringTables.concat(Tai_const.Createname(make_mangledname('RESSTR',hp.localsymtable,'_3_END'),0));
inc(count);
end;
hp:=tmodule(hp.next);