mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 14:29:21 +02:00
* moved darwin/aix-specific code for resource string sections to
ttai_lowleveltypedconstbuilder (will have to be handled differently for llvm) git-svn-id: trunk@32427 -
This commit is contained in:
parent
72c7cb2770
commit
f60a33f5af
@ -450,6 +450,7 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure mark_anon_aggregate_alignment; override;
|
procedure mark_anon_aggregate_alignment; override;
|
||||||
procedure insert_marked_aggregate_alignment(def: tdef); override;
|
procedure insert_marked_aggregate_alignment(def: tdef); override;
|
||||||
|
procedure finalize_asmlist(sym: tasmsymbol; def: tdef; section: TAsmSectiontype; const secname: TSymStr; alignment: shortint; const options: ttcasmlistoptions); override;
|
||||||
public
|
public
|
||||||
{ set the default value for caggregateinformation (= tlowlevelaggregateinformation) }
|
{ set the default value for caggregateinformation (= tlowlevelaggregateinformation) }
|
||||||
class constructor classcreate;
|
class constructor classcreate;
|
||||||
@ -945,11 +946,9 @@ implementation
|
|||||||
sym: tasmsymbol;
|
sym: tasmsymbol;
|
||||||
secname: TSymStr;
|
secname: TSymStr;
|
||||||
sectype: TAsmSectiontype;
|
sectype: TAsmSectiontype;
|
||||||
customsecname,
|
customsecname: boolean;
|
||||||
secend: boolean;
|
|
||||||
begin
|
begin
|
||||||
fvectorized_finalize_called:=true;
|
fvectorized_finalize_called:=true;
|
||||||
secend:=false;
|
|
||||||
customsecname:=get_vectorized_dead_strip_custom_section_name(basename,st,secname);
|
customsecname:=get_vectorized_dead_strip_custom_section_name(basename,st,secname);
|
||||||
if customsecname then
|
if customsecname then
|
||||||
sectype:=sec_user
|
sectype:=sec_user
|
||||||
@ -972,7 +971,6 @@ implementation
|
|||||||
sym:=get_vectorized_dead_strip_section_symbol_end(basename,st,true);
|
sym:=get_vectorized_dead_strip_section_symbol_end(basename,st,true);
|
||||||
if not customsecname then
|
if not customsecname then
|
||||||
make_mangledname(basename,st,'3_END');
|
make_mangledname(basename,st,'3_END');
|
||||||
secend:=true;
|
|
||||||
end
|
end
|
||||||
else if tcalo_vectorized_dead_strip_item in options then
|
else if tcalo_vectorized_dead_strip_item in options then
|
||||||
begin
|
begin
|
||||||
@ -982,18 +980,6 @@ implementation
|
|||||||
exclude(options,tcalo_vectorized_dead_strip_item);
|
exclude(options,tcalo_vectorized_dead_strip_item);
|
||||||
end;
|
end;
|
||||||
finalize_asmlist(sym,def,sectype,secname,alignment,options);
|
finalize_asmlist(sym,def,sectype,secname,alignment,options);
|
||||||
{ The darwin/ppc64 assembler or linker seems to have trouble }
|
|
||||||
{ if a section ends with a global label without any data after it. }
|
|
||||||
{ So for safety, just put a dummy value here. }
|
|
||||||
{ Further, the regular linker also kills this symbol when turning }
|
|
||||||
{ on smart linking in case no value appears after it, so put the }
|
|
||||||
{ dummy byte there always }
|
|
||||||
{ Update: the Mac OS X 10.6 linker orders data that needs to be }
|
|
||||||
{ relocated before all other data, so make this data relocatable, }
|
|
||||||
{ otherwise the end label won't be moved with the rest }
|
|
||||||
if secend and
|
|
||||||
(target_info.system in (systems_darwin+systems_aix)) then
|
|
||||||
fasmlist.concat(Tai_const.create_sym(sym));
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1888,6 +1874,23 @@ implementation
|
|||||||
info.anonrecmarker:=nil;
|
info.anonrecmarker:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure ttai_lowleveltypedconstbuilder.finalize_asmlist(sym: tasmsymbol; def: tdef; section: TAsmSectiontype; const secname: TSymStr; alignment: shortint; const options: ttcasmlistoptions);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
{ The darwin/ppc64 assembler or linker seems to have trouble }
|
||||||
|
{ if a section ends with a global label without any data after it. }
|
||||||
|
{ So for safety, just put a dummy value here. }
|
||||||
|
{ Further, the regular linker also kills this symbol when turning }
|
||||||
|
{ on smart linking in case no value appears after it, so put the }
|
||||||
|
{ dummy byte there always }
|
||||||
|
{ Update: the Mac OS X 10.6 linker orders data that needs to be }
|
||||||
|
{ relocated before all other data, so make this data relocatable, }
|
||||||
|
{ otherwise the end label won't be moved with the rest }
|
||||||
|
if (tcalo_vectorized_dead_strip_end in options) and
|
||||||
|
(target_info.system in (systems_darwin+systems_aix)) then
|
||||||
|
fasmlist.concat(Tai_const.create_sym(sym));
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user