* register the start and end symbols of resource strings in the extern assembler list of the program/library

* export the start and end symbols of resource strings from the package

git-svn-id: trunk@34186 -
This commit is contained in:
svenbarth 2016-07-22 16:03:16 +00:00
parent 947c876ba3
commit ccb4b23949
2 changed files with 8 additions and 3 deletions

View File

@ -1250,11 +1250,11 @@ implementation
If (hp.flags and uf_has_resourcestrings)=uf_has_resourcestrings then
begin
tcb.emit_tai(Tai_const.Create_sym(
ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_start('RESSTR',hp.localsymtable,[tcdssso_use_indirect])),
ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_start('RESSTR',hp.localsymtable,[tcdssso_register_asmsym,tcdssso_use_indirect])),
voidpointertype
);
tcb.emit_tai(Tai_const.Create_sym(
ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_end('RESSTR',hp.localsymtable,[tcdssso_use_indirect])),
ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_end('RESSTR',hp.localsymtable,[tcdssso_register_asmsym,tcdssso_use_indirect])),
voidpointertype
);
inc(count);

View File

@ -45,7 +45,7 @@ implementation
globtype,systems,
cutils,
globals,verbose,
aasmbase,aasmdata,
aasmbase,aasmdata,aasmcnst,
symtype,symconst,symsym,symdef,symbase,symtable,
psub,pdecsub,
ncgutil,
@ -216,6 +216,11 @@ implementation
procexport(make_mangledname('FINALIZE$',u.globalsymtable,''));
if (u.flags and uf_threadvars)=uf_threadvars then
varexport(make_mangledname('THREADVARLIST',u.globalsymtable,''));
if (u.flags and uf_has_resourcestrings)<>0 then
begin
varexport(ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_start('RESSTR',u.localsymtable,[]).name);
varexport(ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_end('RESSTR',u.localsymtable,[]).name);
end;
end;
Function RewritePPU(const PPUFn:String;OutStream:TCStream):Boolean;