|
@@ -31,7 +31,7 @@ implementation
|
|
|
|
|
|
uses
|
|
|
SysUtils,
|
|
|
- cutils,cfileutl,cclasses,rescmn,comprsrc,
|
|
|
+ cutils,cfileutl,cclasses,rescmn,comprsrc,aasmbase,
|
|
|
globtype,globals,systems,verbose,script,fmodule,i_morph,link;
|
|
|
|
|
|
type
|
|
@@ -74,7 +74,7 @@ begin
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
- ExeCmd[1]:='vlink -b elf32amiga $OPT $STRIP -o $EXE -T $RES';
|
|
|
+ ExeCmd[1]:='vlink -b elf32amiga $OPT $STRIP $GCSECTIONS -o $EXE -T $RES';
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
@@ -208,9 +208,11 @@ var
|
|
|
binstr,
|
|
|
cmdstr : TCmdStr;
|
|
|
success : boolean;
|
|
|
+ GCSectionsStr: string;
|
|
|
StripStr: string[40];
|
|
|
begin
|
|
|
StripStr:='';
|
|
|
+ GCSectionsStr:='';
|
|
|
|
|
|
if not(cs_link_nolink in current_settings.globalswitches) then
|
|
|
Message1(exec_i_linking,current_module.exefilename);
|
|
@@ -219,6 +221,8 @@ begin
|
|
|
begin
|
|
|
if (cs_link_strip in current_settings.globalswitches) then
|
|
|
StripStr:='-s -P __abox__';
|
|
|
+ if create_smartlink_sections then
|
|
|
+ GCSectionsStr:='-gc-all -sc -sd';
|
|
|
end;
|
|
|
|
|
|
{ Write used files and libraries }
|
|
@@ -232,6 +236,7 @@ begin
|
|
|
Replace(cmdstr,'$EXE',Unix2AmigaPath(maybequoted(ScriptFixFileName(current_module.exefilename))));
|
|
|
Replace(cmdstr,'$RES',Unix2AmigaPath(maybequoted(ScriptFixFileName(outputexedir+Info.ResName))));
|
|
|
Replace(cmdstr,'$STRIP',StripStr);
|
|
|
+ Replace(cmdstr,'$GCSECTIONS',GCSectionsStr);
|
|
|
end
|
|
|
else
|
|
|
begin
|