mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 19:09:27 +02:00
Add missing of pi_needs_got found by sparc compiler compiled with -dCHECK_PIC
git-svn-id: trunk@22548 -
This commit is contained in:
parent
b145028f35
commit
78d31eb3cd
@ -66,7 +66,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
cutils,
|
cutils,
|
||||||
globals,globtype,verbose,systems,
|
globals,globtype,verbose,systems,
|
||||||
fmodule,
|
fmodule, procinfo,
|
||||||
symsym,
|
symsym,
|
||||||
aasmtai,aasmdata,
|
aasmtai,aasmdata,
|
||||||
defutil,
|
defutil,
|
||||||
@ -1212,6 +1212,9 @@ implementation
|
|||||||
function TRTTIWriter.ref_rtti(def:tdef;rt:trttitype):tasmsymbol;
|
function TRTTIWriter.ref_rtti(def:tdef;rt:trttitype):tasmsymbol;
|
||||||
begin
|
begin
|
||||||
result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt));
|
result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt));
|
||||||
|
if (cs_create_pic in current_settings.moduleswitches) and
|
||||||
|
assigned(current_procinfo) then
|
||||||
|
include(current_procinfo.flags,pi_needs_got);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1245,16 +1248,25 @@ implementation
|
|||||||
function TRTTIWriter.get_rtti_label(def:tdef;rt:trttitype):tasmsymbol;
|
function TRTTIWriter.get_rtti_label(def:tdef;rt:trttitype):tasmsymbol;
|
||||||
begin
|
begin
|
||||||
result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt));
|
result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt));
|
||||||
|
if (cs_create_pic in current_settings.moduleswitches) and
|
||||||
|
assigned(current_procinfo) then
|
||||||
|
include(current_procinfo.flags,pi_needs_got);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRTTIWriter.get_rtti_label_ord2str(def:tdef;rt:trttitype):tasmsymbol;
|
function TRTTIWriter.get_rtti_label_ord2str(def:tdef;rt:trttitype):tasmsymbol;
|
||||||
begin
|
begin
|
||||||
result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt)+'_o2s');
|
result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt)+'_o2s');
|
||||||
|
if (cs_create_pic in current_settings.moduleswitches) and
|
||||||
|
assigned(current_procinfo) then
|
||||||
|
include(current_procinfo.flags,pi_needs_got);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRTTIWriter.get_rtti_label_str2ord(def:tdef;rt:trttitype):tasmsymbol;
|
function TRTTIWriter.get_rtti_label_str2ord(def:tdef;rt:trttitype):tasmsymbol;
|
||||||
begin
|
begin
|
||||||
result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt)+'_s2o');
|
result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt)+'_s2o');
|
||||||
|
if (cs_create_pic in current_settings.moduleswitches) and
|
||||||
|
assigned(current_procinfo) then
|
||||||
|
include(current_procinfo.flags,pi_needs_got);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -2812,6 +2812,9 @@ implementation
|
|||||||
begin
|
begin
|
||||||
result:=nil;
|
result:=nil;
|
||||||
expectloc:=LOC_REGISTER;
|
expectloc:=LOC_REGISTER;
|
||||||
|
{ Use of FPC_EMPTYCHAR label requires setting pi_needs_got flag }
|
||||||
|
if (cs_create_pic in current_settings.moduleswitches) then
|
||||||
|
include(current_procinfo.flags,pi_needs_got);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -3226,6 +3229,9 @@ implementation
|
|||||||
begin
|
begin
|
||||||
first_ansistring_to_pchar:=nil;
|
first_ansistring_to_pchar:=nil;
|
||||||
expectloc:=LOC_REGISTER;
|
expectloc:=LOC_REGISTER;
|
||||||
|
{ Use of FPC_EMPTYCHAR label requires setting pi_needs_got flag }
|
||||||
|
if (cs_create_pic in current_settings.moduleswitches) then
|
||||||
|
include(current_procinfo.flags,pi_needs_got);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
SysUtils,
|
SysUtils,
|
||||||
globals,verbose,systems,
|
globals,verbose,systems,
|
||||||
node,
|
node,procinfo,
|
||||||
symbase,symtable,symconst,symtype,defcmp,
|
symbase,symtable,symconst,symtype,defcmp,
|
||||||
dbgbase,
|
dbgbase,
|
||||||
ncgrtti,
|
ncgrtti,
|
||||||
@ -1039,6 +1039,9 @@ implementation
|
|||||||
len : byte;
|
len : byte;
|
||||||
begin
|
begin
|
||||||
current_asmdata.getdatalabel(p^.nl);
|
current_asmdata.getdatalabel(p^.nl);
|
||||||
|
if (cs_create_pic in current_settings.moduleswitches) and
|
||||||
|
assigned(current_procinfo) then
|
||||||
|
include(current_procinfo.flags,pi_needs_got);
|
||||||
if assigned(p^.l) then
|
if assigned(p^.l) then
|
||||||
writenames(list,p^.l);
|
writenames(list,p^.l);
|
||||||
list.concat(cai_align.create(const_align(sizeof(pint))));
|
list.concat(cai_align.create(const_align(sizeof(pint))));
|
||||||
@ -1059,6 +1062,9 @@ implementation
|
|||||||
if assigned(p^.l) then
|
if assigned(p^.l) then
|
||||||
writestrentry(list,p^.l);
|
writestrentry(list,p^.l);
|
||||||
|
|
||||||
|
if (cs_create_pic in current_settings.moduleswitches) and
|
||||||
|
assigned(current_procinfo) then
|
||||||
|
include(current_procinfo.flags,pi_needs_got);
|
||||||
{ write name label }
|
{ write name label }
|
||||||
list.concat(cai_align.create(const_align(sizeof(pint))));
|
list.concat(cai_align.create(const_align(sizeof(pint))));
|
||||||
list.concat(Tai_const.Create_sym(p^.nl));
|
list.concat(Tai_const.Create_sym(p^.nl));
|
||||||
@ -1083,6 +1089,9 @@ implementation
|
|||||||
if assigned(root) then
|
if assigned(root) then
|
||||||
writenames(list,root);
|
writenames(list,root);
|
||||||
|
|
||||||
|
if (cs_create_pic in current_settings.moduleswitches) and
|
||||||
|
assigned(current_procinfo) then
|
||||||
|
include(current_procinfo.flags,pi_needs_got);
|
||||||
{ now start writing of the message string table }
|
{ now start writing of the message string table }
|
||||||
current_asmdata.getlabel(result,alt_data);
|
current_asmdata.getlabel(result,alt_data);
|
||||||
list.concat(cai_align.create(const_align(sizeof(pint))));
|
list.concat(cai_align.create(const_align(sizeof(pint))));
|
||||||
@ -1103,6 +1112,9 @@ implementation
|
|||||||
if assigned(p^.l) then
|
if assigned(p^.l) then
|
||||||
writeintentry(list,p^.l);
|
writeintentry(list,p^.l);
|
||||||
|
|
||||||
|
if (cs_create_pic in current_settings.moduleswitches) and
|
||||||
|
assigned(current_procinfo) then
|
||||||
|
include(current_procinfo.flags,pi_needs_got);
|
||||||
{ write name label }
|
{ write name label }
|
||||||
list.concat(cai_align.create(const_align(sizeof(longint))));
|
list.concat(cai_align.create(const_align(sizeof(longint))));
|
||||||
list.concat(Tai_const.Create_32bit(p^.data.messageinf.i));
|
list.concat(Tai_const.Create_32bit(p^.data.messageinf.i));
|
||||||
@ -1124,6 +1136,9 @@ implementation
|
|||||||
{ insert all message handlers into a tree, sorted by name }
|
{ insert all message handlers into a tree, sorted by name }
|
||||||
_class.symtable.SymList.ForEachCall(@insertmsgint,@count);
|
_class.symtable.SymList.ForEachCall(@insertmsgint,@count);
|
||||||
|
|
||||||
|
if (cs_create_pic in current_settings.moduleswitches) and
|
||||||
|
assigned(current_procinfo) then
|
||||||
|
include(current_procinfo.flags,pi_needs_got);
|
||||||
{ now start writing of the message string table }
|
{ now start writing of the message string table }
|
||||||
current_asmdata.getlabel(r,alt_data);
|
current_asmdata.getlabel(r,alt_data);
|
||||||
list.concat(cai_align.create(const_align(sizeof(pint))));
|
list.concat(cai_align.create(const_align(sizeof(pint))));
|
||||||
@ -1385,6 +1400,9 @@ implementation
|
|||||||
function TVMTWriter.intf_get_vtbl_name(AImplIntf:TImplementedInterface): string;
|
function TVMTWriter.intf_get_vtbl_name(AImplIntf:TImplementedInterface): string;
|
||||||
begin
|
begin
|
||||||
result:=make_mangledname('VTBL',_class.owner,_class.objname^+'_$_'+AImplIntf.IntfDef.objname^);
|
result:=make_mangledname('VTBL',_class.owner,_class.objname^+'_$_'+AImplIntf.IntfDef.objname^);
|
||||||
|
if (cs_create_pic in current_settings.moduleswitches) and
|
||||||
|
assigned(current_procinfo) then
|
||||||
|
include(current_procinfo.flags,pi_needs_got);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user