mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-01 05:59:34 +02:00
morphos: support section GC with GNU LD as well
git-svn-id: trunk@41105 -
This commit is contained in:
parent
7817e48e9a
commit
d1878fe5b2
@ -69,7 +69,7 @@ begin
|
||||
begin
|
||||
if not UseVLink then
|
||||
begin
|
||||
ExeCmd[1]:='ld $OPT -o $EXE $RES';
|
||||
ExeCmd[1]:='ld $OPT $GCSECTIONS -o $EXE $RES';
|
||||
ExeCmd[2]:='strip --strip-unneeded --remove-section .comment $EXE';
|
||||
end
|
||||
else
|
||||
@ -223,6 +223,11 @@ begin
|
||||
StripStr:='-s -P __abox__';
|
||||
if create_smartlink_sections then
|
||||
GCSectionsStr:='-gc-all -sc -sd';
|
||||
end
|
||||
else
|
||||
begin
|
||||
if create_smartlink_sections then
|
||||
GCSectionsStr:='--gc-sections -e _start';
|
||||
end;
|
||||
|
||||
{ Write used files and libraries }
|
||||
@ -242,6 +247,7 @@ begin
|
||||
begin
|
||||
Replace(cmdstr,'$EXE',maybequoted(ScriptFixFileName(current_module.exefilename)));
|
||||
Replace(cmdstr,'$RES',maybequoted(ScriptFixFileName(outputexedir+Info.ResName)));
|
||||
Replace(cmdstr,'$GCSECTIONS',GCSectionsStr);
|
||||
end;
|
||||
success:=DoExec(FindUtil(utilsprefix+BinStr),cmdstr,true,false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user