mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-26 21:09:26 +02:00
* also add the forced indirect symbols of data symbols to the public assembler symbols
* export the forced indirect symbols of data symbols on systems without indirect imports git-svn-id: trunk@34313 -
This commit is contained in:
parent
690f784c4d
commit
ad2facb10d
@ -42,7 +42,8 @@ implementation
|
||||
uses
|
||||
globals,cutils,systems,
|
||||
aasmtai,aasmcnst,
|
||||
symdef;
|
||||
symdef,
|
||||
fmodule;
|
||||
|
||||
|
||||
function TAsmDataDef.DefineAsmSymbolByClass(symclass: TAsmSymbolClass; const s: TSymStr; _bind: TAsmSymBind; _typ: Tasmsymtype; def: tdef): TAsmSymbol;
|
||||
@ -73,6 +74,8 @@ function TAsmDataDef.DefineAsmSymbolByClass(symclass: TAsmSymbolClass; const s:
|
||||
lower(symind.name),
|
||||
const_align(ptrdef.alignment)));
|
||||
tcb.free;
|
||||
if _typ=AT_DATA_FORCEINDIRECT then
|
||||
current_module.add_public_asmsym(symind.name,AB_INDIRECT,AT_DATA);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -218,6 +218,9 @@ implementation
|
||||
|
||||
|
||||
procedure export_unit(u: tmodule);
|
||||
var
|
||||
i : longint;
|
||||
sym : tasmsymbol;
|
||||
begin
|
||||
u.globalsymtable.symlist.ForEachCall(@insert_export,u.globalsymtable);
|
||||
{ check localsymtable for exports too to get public symbols }
|
||||
@ -235,6 +238,14 @@ implementation
|
||||
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;
|
||||
|
||||
if not (target_info.system in systems_indirect_var_imports) then
|
||||
for i:=0 to u.publicasmsyms.count-1 do
|
||||
begin
|
||||
sym:=tasmsymbol(u.publicasmsyms[i]);
|
||||
if sym.bind=AB_INDIRECT then
|
||||
varexport(sym.name);
|
||||
end;
|
||||
end;
|
||||
|
||||
Function RewritePPU(const PPUFn:String;OutStream:TCStream):Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user