mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 01:38:07 +02:00
m68k: enable named sections for vasm generated objects. have a separate as_m68k_as_aout for a.out objects which doesn't have named sections. amiga and atari gas defaults to a.out, so have it default on these systems. finally enable section smartlinking for amiga and atari, which will be used with vasm assembler
git-svn-id: trunk@35112 -
This commit is contained in:
parent
66e651bed0
commit
4e51dc2298
@ -447,9 +447,14 @@ implementation
|
||||
writer.AsmLn;
|
||||
case target_info.system of
|
||||
system_i386_OS2,
|
||||
system_i386_EMX,
|
||||
system_i386_EMX: ;
|
||||
system_m68k_atari, { atari tos/mint GNU AS also doesn't seem to like .section (KB) }
|
||||
system_m68k_amiga: ; { amiga has old GNU AS (2.14), which blews up from .section (KB) }
|
||||
system_m68k_amiga: { amiga has old GNU AS (2.14), which blews up from .section (KB) }
|
||||
begin
|
||||
{ ... but vasm is GAS compatible on amiga/atari, and supports named sections }
|
||||
if create_smartlink_sections then
|
||||
writer.AsmWrite('.section ');
|
||||
end;
|
||||
system_powerpc_darwin,
|
||||
system_i386_darwin,
|
||||
system_i386_iphonesim,
|
||||
|
@ -320,13 +320,29 @@ interface
|
||||
idtxt : 'AS';
|
||||
asmbin : 'as';
|
||||
asmcmd : '$ARCH -o $OBJ $EXTRAOPT $ASM';
|
||||
supported_targets : [system_m68k_Amiga,system_m68k_Atari,system_m68k_Mac,system_m68k_linux,system_m68k_PalmOS,system_m68k_netbsd,system_m68k_openbsd,system_m68k_embedded];
|
||||
supported_targets : [system_m68k_Mac,system_m68k_linux,system_m68k_PalmOS,system_m68k_netbsd,system_m68k_openbsd,system_m68k_embedded];
|
||||
flags : [af_needar,af_smartlink_sections];
|
||||
labelprefix : '.L';
|
||||
comment : '# ';
|
||||
dollarsign: '$';
|
||||
);
|
||||
|
||||
as_m68k_as_aout_info : tasminfo =
|
||||
(
|
||||
id : as_m68k_as_aout;
|
||||
idtxt : 'AS';
|
||||
asmbin : 'as';
|
||||
asmcmd : '$ARCH -o $OBJ $EXTRAOPT $ASM';
|
||||
supported_targets : [system_m68k_Amiga,system_m68k_Atari];
|
||||
flags : [af_needar];
|
||||
labelprefix : '.L';
|
||||
comment : '# ';
|
||||
dollarsign: '$';
|
||||
);
|
||||
|
||||
|
||||
|
||||
initialization
|
||||
RegisterAssembler(as_m68k_as_info,Tm68kGNUAssembler);
|
||||
RegisterAssembler(as_m68k_as_aout_info,Tm68kGNUAssembler);
|
||||
end.
|
||||
|
@ -67,8 +67,10 @@ unit ag68kvasm;
|
||||
result:=asminfo^.asmcmd;
|
||||
|
||||
case target_info.system of
|
||||
{ a.out doesn't support named sections }
|
||||
system_m68k_amiga: objtype:='-Fhunk';
|
||||
system_m68k_atari: objtype:='-Fvobj'; // fix me?
|
||||
{ atari never had a standard object format, a.out is limited, vasm/vlink author recommends vobj }
|
||||
system_m68k_atari: objtype:='-Fvobj';
|
||||
system_m68k_linux: objtype:='-Felf';
|
||||
else
|
||||
internalerror(2016052601);
|
||||
|
@ -225,6 +225,7 @@
|
||||
,as_clang
|
||||
,as_solaris_as
|
||||
,as_m68k_vasm
|
||||
,as_m68k_as_aout
|
||||
);
|
||||
|
||||
tlink = (ld_none,
|
||||
|
@ -34,7 +34,7 @@ unit i_amiga;
|
||||
system : system_m68k_Amiga;
|
||||
name : 'Commodore Amiga';
|
||||
shortname : 'amiga';
|
||||
flags : [tf_files_case_aware,tf_requires_proper_alignment,tf_has_winlike_resources];
|
||||
flags : [tf_files_case_aware,tf_requires_proper_alignment,tf_has_winlike_resources,tf_smartlink_sections];
|
||||
cpu : cpu_m68k;
|
||||
unit_env : 'AMIGAUNITS';
|
||||
extradefines : 'HASAMIGA;AMIGA68K';
|
||||
@ -61,8 +61,8 @@ unit i_amiga;
|
||||
Cprefix : '';
|
||||
newline : #10;
|
||||
dirsep : '/';
|
||||
assem : as_gas;
|
||||
assemextern : as_gas;
|
||||
assem : as_m68k_as_aout;
|
||||
assemextern : as_m68k_as_aout;
|
||||
link : ld_none;
|
||||
linkextern : ld_amiga;
|
||||
ar : ar_gnu_ar;
|
||||
|
@ -34,7 +34,7 @@ unit i_atari;
|
||||
system : system_m68k_Atari;
|
||||
name : 'Atari ST/STE';
|
||||
shortname : 'atari';
|
||||
flags : [tf_use_8_3,tf_requires_proper_alignment];
|
||||
flags : [tf_use_8_3,tf_requires_proper_alignment,tf_smartlink_sections];
|
||||
cpu : cpu_m68k;
|
||||
unit_env : '';
|
||||
extradefines : '';
|
||||
@ -61,8 +61,8 @@ unit i_atari;
|
||||
Cprefix : '_';
|
||||
newline : #10;
|
||||
dirsep : '/';
|
||||
assem : as_gas;
|
||||
assemextern : as_gas;
|
||||
assem : as_m68k_as_aout;
|
||||
assemextern : as_m68k_as_aout;
|
||||
link : ld_atari;
|
||||
linkextern : ld_atari;
|
||||
ar : ar_gnu_ar;
|
||||
|
Loading…
Reference in New Issue
Block a user