|
@@ -1137,13 +1137,13 @@ end;
|
|
|
|
|
|
function TLinkerWin32.MakeExecutable:boolean;
|
|
function TLinkerWin32.MakeExecutable:boolean;
|
|
var
|
|
var
|
|
|
|
+ MapStr,
|
|
binstr : String;
|
|
binstr : String;
|
|
cmdstr : TCmdStr;
|
|
cmdstr : TCmdStr;
|
|
success : boolean;
|
|
success : boolean;
|
|
cmds,i : longint;
|
|
cmds,i : longint;
|
|
AsBinStr : string[80];
|
|
AsBinStr : string[80];
|
|
GCSectionsStr,
|
|
GCSectionsStr,
|
|
- MapStr,
|
|
|
|
StripStr,
|
|
StripStr,
|
|
RelocStr,
|
|
RelocStr,
|
|
AppTypeStr,
|
|
AppTypeStr,
|
|
@@ -1241,6 +1241,7 @@ end;
|
|
|
|
|
|
Function TLinkerWin32.MakeSharedLibrary:boolean;
|
|
Function TLinkerWin32.MakeSharedLibrary:boolean;
|
|
var
|
|
var
|
|
|
|
+ MapStr,
|
|
binstr : String;
|
|
binstr : String;
|
|
cmdstr : TCmdStr;
|
|
cmdstr : TCmdStr;
|
|
success : boolean;
|
|
success : boolean;
|
|
@@ -1264,6 +1265,7 @@ begin
|
|
EntryStr:='';
|
|
EntryStr:='';
|
|
ImageBaseStr:='';
|
|
ImageBaseStr:='';
|
|
StripStr:='';
|
|
StripStr:='';
|
|
|
|
+ MapStr:='';
|
|
GCSectionsStr:='';
|
|
GCSectionsStr:='';
|
|
AsBinStr:=FindUtil(utilsprefix+'as');
|
|
AsBinStr:=FindUtil(utilsprefix+'as');
|
|
if RelocSection then
|
|
if RelocSection then
|
|
@@ -1281,6 +1283,8 @@ begin
|
|
ImageBaseStr:='--image-base=0x'+DLLImageBase^;
|
|
ImageBaseStr:='--image-base=0x'+DLLImageBase^;
|
|
if (cs_link_strip in aktglobalswitches) then
|
|
if (cs_link_strip in aktglobalswitches) then
|
|
StripStr:='-s';
|
|
StripStr:='-s';
|
|
|
|
+ if (cs_link_map in aktglobalswitches) then
|
|
|
|
+ MapStr:='-Map '+maybequoted(ForceExtension(current_module.exefilename^,'.map'));
|
|
|
|
|
|
{ Write used files and libraries }
|
|
{ Write used files and libraries }
|
|
WriteResponseFile(true);
|
|
WriteResponseFile(true);
|
|
@@ -1306,6 +1310,7 @@ begin
|
|
Replace(cmdstr,'$IMAGEBASE',ImageBaseStr);
|
|
Replace(cmdstr,'$IMAGEBASE',ImageBaseStr);
|
|
Replace(cmdstr,'$STRIP',StripStr);
|
|
Replace(cmdstr,'$STRIP',StripStr);
|
|
Replace(cmdstr,'$GCSECTIONS',GCSectionsStr);
|
|
Replace(cmdstr,'$GCSECTIONS',GCSectionsStr);
|
|
|
|
+ Replace(cmdstr,'$MAP',MapStr);
|
|
if not DefFile.Empty then
|
|
if not DefFile.Empty then
|
|
begin
|
|
begin
|
|
DefFile.WriteFile;
|
|
DefFile.WriteFile;
|