mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 23:39:31 +02:00
Add replacement of $GCSECTIONS for shared libraries
git-svn-id: trunk@39403 -
This commit is contained in:
parent
3673f03841
commit
6cab9fd7db
@ -1435,6 +1435,7 @@ Function TLinkerLinux.MakeSharedLibrary:boolean;
|
||||
var
|
||||
InitStr,
|
||||
FiniStr,
|
||||
GCSectionsStr,
|
||||
SoNameStr : string[80];
|
||||
binstr,
|
||||
cmdstr : TCmdStr;
|
||||
@ -1443,6 +1444,11 @@ begin
|
||||
MakeSharedLibrary:=false;
|
||||
if not(cs_link_nolink in current_settings.globalswitches) then
|
||||
Message1(exec_i_linking,current_module.sharedlibfilename);
|
||||
if (cs_link_smart in current_settings.globalswitches) and
|
||||
create_smartlink_sections then
|
||||
GCSectionsStr:='--gc-sections'
|
||||
else
|
||||
GCSectionsStr:='';
|
||||
|
||||
{ Write used files and libraries }
|
||||
WriteResponseFile(true);
|
||||
@ -1461,6 +1467,7 @@ begin
|
||||
Replace(cmdstr,'$INIT',InitStr);
|
||||
Replace(cmdstr,'$FINI',FiniStr);
|
||||
Replace(cmdstr,'$SONAME',SoNameStr);
|
||||
Replace(cmdstr,'$GCSECTIONS',GCSectionsStr);
|
||||
success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false);
|
||||
|
||||
{ Strip the library ? }
|
||||
|
Loading…
Reference in New Issue
Block a user