mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 22:47:59 +02:00
+ PS1: allow creating a linker map file with the -Xm option
This commit is contained in:
parent
c24cae29d6
commit
0c7aa1805d
@ -60,7 +60,7 @@ end;
|
||||
|
||||
procedure TLinkerPS1.SetDefaultInfo;
|
||||
begin
|
||||
info.ExeCmd[1]:= 'ld $OPT $RES';
|
||||
info.ExeCmd[1]:= 'ld $OPT $MAP $RES';
|
||||
end;
|
||||
|
||||
|
||||
@ -348,9 +348,13 @@ end;
|
||||
|
||||
function TLinkerPS1.MakeExecutable: boolean;
|
||||
var
|
||||
binstr, cmdstr : TCmdStr;
|
||||
binstr, cmdstr, mapstr : TCmdStr;
|
||||
success : boolean;
|
||||
begin
|
||||
if (cs_link_map in current_settings.globalswitches) then
|
||||
mapstr:='-Map '+maybequoted(ChangeFileExt(current_module.exefilename,'.map'))
|
||||
else
|
||||
mapstr:='';
|
||||
|
||||
WriteScriptFile;
|
||||
|
||||
@ -364,6 +368,7 @@ begin
|
||||
|
||||
Replace(cmdstr, '$OPT', Info.ExtraOptions);
|
||||
Replace(cmdstr, '$RES', '-T ' + (maybequoted(ScriptFixFileName(outputexedir + Info.ResName))));
|
||||
Replace(cmdstr, '$MAP', mapstr);
|
||||
|
||||
if cs_link_smart in current_settings.globalswitches then cmdstr:= cmdstr + ' --gc-sections';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user