mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 00:03:08 +02:00
+ enabled library-based smart linking for the ZX Spectrum target (not fully working yet)
git-svn-id: branches/z80@45071 -
This commit is contained in:
parent
91289fddf4
commit
3580c53b05
@ -34,7 +34,7 @@ unit i_zxspectrum;
|
||||
name : 'ZX Spectrum';
|
||||
shortname : 'zxspectrum';
|
||||
flags : [tf_needs_symbol_size,tf_files_case_sensitive,
|
||||
tf_smartlink_sections];
|
||||
tf_smartlink_library];
|
||||
cpu : cpu_sys_z80;
|
||||
unit_env : '';
|
||||
extradefines : '';
|
||||
|
@ -954,6 +954,45 @@ unit agsdasz80;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
ait_cutobject :
|
||||
begin
|
||||
if SmartAsm then
|
||||
begin
|
||||
{ only reset buffer if nothing has changed }
|
||||
if not writer.ClearIfEmpty then
|
||||
begin
|
||||
{if SmartAsm then
|
||||
begin
|
||||
WriteSmartExternals;
|
||||
FreeExternChainList;
|
||||
end;
|
||||
WriteGroups;}
|
||||
writer.AsmClose;
|
||||
DoAssemble;
|
||||
writer.AsmCreate(tai_cutobject(hp).place);
|
||||
{ResetSectionsList;
|
||||
WriteHeader;}
|
||||
end;
|
||||
{ avoid empty files }
|
||||
LastSecType:=sec_none;
|
||||
//LastSecName:='';
|
||||
//LastAlign:=4;
|
||||
while assigned(hp.next) and (tai(hp.next).typ in [ait_cutobject,ait_section,ait_comment]) do
|
||||
begin
|
||||
if tai(hp.next).typ=ait_section then
|
||||
begin
|
||||
LastSecType:=tai_section(hp.next).sectype;
|
||||
{LastSecName:=tai_section(hp.next).name^;
|
||||
LastAlign:=tai_section(hp.next).secalign;}
|
||||
end;
|
||||
hp:=tai(hp.next);
|
||||
end;
|
||||
{if LastSecType<>sec_none then
|
||||
WriteSection(LastSecType,LastSecName,LastAlign);}
|
||||
writer.MarkEmpty;
|
||||
//NewObject:=true;
|
||||
end;
|
||||
end;
|
||||
ait_marker :
|
||||
if tai_marker(hp).kind=mark_NoLineInfoStart then
|
||||
inc(InlineLevel)
|
||||
@ -1016,7 +1055,7 @@ unit agsdasz80;
|
||||
|
||||
idtxt : 'SDCC-SDASZ80';
|
||||
asmbin : 'sdasz80';
|
||||
asmcmd : '-o $OBJ $EXTRAOPT $ASM';
|
||||
asmcmd : '-g -o $OBJ $EXTRAOPT $ASM';
|
||||
supported_targets : [system_Z80_embedded];
|
||||
flags : [af_needar,af_smartlink_sections];
|
||||
labelprefix : '.L';
|
||||
|
Loading…
Reference in New Issue
Block a user