mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 01:48:00 +02:00
+ set the program origin (i.e. the load address) and pass it to the linker for the ZX Spectrum target
git-svn-id: branches/z80@44853 -
This commit is contained in:
parent
21dd92df23
commit
4b32780516
@ -41,6 +41,7 @@ implementation
|
||||
|
||||
TLinkerZXSpectrum_SdccSdld=class(texternallinker)
|
||||
private
|
||||
FOrigin: Word;
|
||||
Function WriteResponseFile: Boolean;
|
||||
public
|
||||
{ constructor Create; override;}
|
||||
@ -215,9 +216,10 @@ procedure TLinkerZXSpectrum_SdccSdld.SetDefaultInfo;
|
||||
ExeName='sdcc-sdld';
|
||||
{$endif}
|
||||
begin
|
||||
FOrigin:=32768;
|
||||
with Info do
|
||||
begin
|
||||
ExeCmd[1]:=ExeName+' -n $OPT -i $MAP $EXE -f $RES'
|
||||
ExeCmd[1]:=ExeName+' -n -b _CODE=$ORIGIN $OPT -i $MAP $EXE -f $RES'
|
||||
//-g '+platform_select+' $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP $MAP -L. -o $EXE -T $RES';
|
||||
end;
|
||||
end;
|
||||
@ -255,6 +257,7 @@ function TLinkerZXSpectrum_SdccSdld.MakeExecutable: boolean;
|
||||
{ Call linker }
|
||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$ORIGIN',tostr(FOrigin));
|
||||
if not(cs_link_on_target in current_settings.globalswitches) then
|
||||
begin
|
||||
Replace(cmdstr,'$EXE',FixedExeFileName);
|
||||
|
Loading…
Reference in New Issue
Block a user