mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-23 19:29:44 +01:00
* 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:
parent
bd32ab4ad1
commit
2bd5aca1b5
@ -156,7 +156,7 @@ uses
|
|||||||
maybe_new_object_file(current_asmdata.asmlists[al_resourcestrings]);
|
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));
|
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(
|
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 }
|
{ Write unitname entry }
|
||||||
namelab:=WriteValueString(@current_module.localsymtable.name^[1],length(current_module.localsymtable.name^));
|
namelab:=WriteValueString(@current_module.localsymtable.name^[1],length(current_module.localsymtable.name^));
|
||||||
@ -172,7 +172,7 @@ uses
|
|||||||
R:=TResourceStringItem(List.First);
|
R:=TResourceStringItem(List.First);
|
||||||
while assigned(R) do
|
while assigned(R) do
|
||||||
begin
|
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 }
|
{ Write default value }
|
||||||
if assigned(R.value) and (R.len<>0) then
|
if assigned(R.value) and (R.len<>0) then
|
||||||
valuelab:=WriteValueString(R.Value,R.Len)
|
valuelab:=WriteValueString(R.Value,R.Len)
|
||||||
@ -190,7 +190,7 @@ uses
|
|||||||
HashValue : LongWord;
|
HashValue : LongWord;
|
||||||
end;
|
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);
|
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_symbol.Create_global(resstrlab,0));
|
||||||
current_asmdata.asmlists[al_resourcestrings].concat(tai_const.create_sym(namelab));
|
current_asmdata.asmlists[al_resourcestrings].concat(tai_const.create_sym(namelab));
|
||||||
@ -205,7 +205,7 @@ uses
|
|||||||
end;
|
end;
|
||||||
new_section(current_asmdata.asmlists[al_resourcestrings],sec_data,'resstridx_'+current_module.localsymtable.name^+'_end',sizeof(aint));
|
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(
|
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;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -296,8 +296,8 @@ implementation
|
|||||||
begin
|
begin
|
||||||
If (hp.flags and uf_has_resourcestrings)=uf_has_resourcestrings then
|
If (hp.flags and uf_has_resourcestrings)=uf_has_resourcestrings then
|
||||||
begin
|
begin
|
||||||
ResourceStringTables.concat(Tai_const.Createname(make_mangledname('RESSTR',hp.localsymtable,'START'),0));
|
ResourceStringTables.concat(Tai_const.Createname(make_mangledname('RESSTR',hp.localsymtable,'_1_START'),0));
|
||||||
ResourceStringTables.concat(Tai_const.Createname(make_mangledname('RESSTR',hp.localsymtable,'END'),0));
|
ResourceStringTables.concat(Tai_const.Createname(make_mangledname('RESSTR',hp.localsymtable,'_3_END'),0));
|
||||||
inc(count);
|
inc(count);
|
||||||
end;
|
end;
|
||||||
hp:=tmodule(hp.next);
|
hp:=tmodule(hp.next);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user