From 2bd7877ec00e5de5cb954ce87403c604aad204b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1roly=20Balogh?= Date: Thu, 10 Dec 2020 04:56:26 +0000 Subject: [PATCH] amiga: fixed the recently added link map generation to work properly. needs recent vlink to work git-svn-id: trunk@47746 - --- compiler/systems/t_amiga.pas | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/compiler/systems/t_amiga.pas b/compiler/systems/t_amiga.pas index 66b9d9a3a9..8efdd79a57 100644 --- a/compiler/systems/t_amiga.pas +++ b/compiler/systems/t_amiga.pas @@ -82,7 +82,7 @@ begin end else begin - ExeCmd[1]:='vlink -b amigahunk $GCSECTIONS $OPT $STRIP -o $EXE -T $RES'; + ExeCmd[1]:='vlink -b amigahunk -e_start $MAP $GCSECTIONS $OPT $STRIP -o $EXE -T $RES'; end; end; end; @@ -97,7 +97,7 @@ begin end else begin - ExeCmd[1]:='vlink -q -n -b elf32amigaos -P_start -P__amigaos4__ -nostdlib $GCSECTIONS $OPT $STRIP -o $EXE -T $RES'; + ExeCmd[1]:='vlink -q -n -b elf32amigaos -P_start -P__amigaos4__ -nostdlib $MAP $GCSECTIONS $OPT $STRIP -o $EXE -T $RES'; end; end; end; @@ -349,11 +349,15 @@ var StripStr: string[40]; DynLinkStr : string; GCSectionsStr : string; + MapStr: string; begin StripStr:=''; GCSectionsStr:=''; DynLinkStr:=''; + MapStr:=''; + if UseVlink and (cs_link_map in current_settings.globalswitches) then + MapStr:='-M'+Unix2AmigaPath(maybequoted(ScriptFixFilename(current_module.mapfilename))); if (cs_link_strip in current_settings.globalswitches) then StripStr:='-s'; if rlinkpath<>'' Then @@ -370,6 +374,7 @@ begin Replace(cmdstr,'$OPT',Info.ExtraOptions); Replace(cmdstr,'$EXE',Unix2AmigaPath(maybequoted(ScriptFixFileName(current_module.exefilename)))); Replace(cmdstr,'$RES',Unix2AmigaPath(maybequoted(ScriptFixFileName(outputexedir+Info.ResName)))); + Replace(cmdstr,'$MAP',MapStr); Replace(cmdstr,'$STRIP',StripStr); Replace(cmdstr,'$GCSECTIONS',GCSectionsStr); Replace(cmdstr,'$DYNLINK',DynLinkStr);