mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 06:49:27 +02:00
* reference the RTTI assembler symbols if they're queried from a different unit than the own they're declared in
git-svn-id: trunk@34347 -
This commit is contained in:
parent
c2ba68df44
commit
f50671fe44
@ -1591,27 +1591,42 @@ implementation
|
||||
|
||||
|
||||
function TRTTIWriter.get_rtti_label(def:tdef;rt:trttitype;indirect:boolean):tasmsymbol;
|
||||
var
|
||||
name : tsymstr;
|
||||
begin
|
||||
result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt),AT_DATA,indirect);
|
||||
name:=def.rtti_mangledname(rt);
|
||||
result:=current_asmdata.RefAsmSymbol(name,AT_DATA,indirect);
|
||||
if (cs_create_pic in current_settings.moduleswitches) and
|
||||
assigned(current_procinfo) then
|
||||
include(current_procinfo.flags,pi_needs_got);
|
||||
if assigned(current_module) and (findunitsymtable(def.owner).moduleid<>current_module.moduleid) then
|
||||
current_module.add_extern_asmsym(name,AB_EXTERNAL,AT_DATA);
|
||||
end;
|
||||
|
||||
function TRTTIWriter.get_rtti_label_ord2str(def:tdef;rt:trttitype;indirect:boolean):tasmsymbol;
|
||||
var
|
||||
name : tsymstr;
|
||||
begin
|
||||
result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt)+'_o2s',AT_DATA,indirect);
|
||||
name:=def.rtti_mangledname(rt)+'_o2s';
|
||||
result:=current_asmdata.RefAsmSymbol(name,AT_DATA,indirect);
|
||||
if (cs_create_pic in current_settings.moduleswitches) and
|
||||
assigned(current_procinfo) then
|
||||
include(current_procinfo.flags,pi_needs_got);
|
||||
if assigned(current_module) and (findunitsymtable(def.owner).moduleid<>current_module.moduleid) then
|
||||
current_module.add_extern_asmsym(name,AB_EXTERNAL,AT_DATA);
|
||||
end;
|
||||
|
||||
function TRTTIWriter.get_rtti_label_str2ord(def:tdef;rt:trttitype;indirect:boolean):tasmsymbol;
|
||||
var
|
||||
name : tsymstr;
|
||||
begin
|
||||
result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt)+'_s2o',AT_DATA,indirect);
|
||||
name:=def.rtti_mangledname(rt)+'_s2o';
|
||||
result:=current_asmdata.RefAsmSymbol(name,AT_DATA,indirect);
|
||||
if (cs_create_pic in current_settings.moduleswitches) and
|
||||
assigned(current_procinfo) then
|
||||
include(current_procinfo.flags,pi_needs_got);
|
||||
if assigned(current_module) and (findunitsymtable(def.owner).moduleid<>current_module.moduleid) then
|
||||
current_module.add_extern_asmsym(name,AB_EXTERNAL,AT_DATA);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user