mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 07:09:29 +02:00
* gc-sections added when section smartlinking is used
This commit is contained in:
parent
3eebc18aab
commit
d24241b008
@ -33,7 +33,7 @@ unit i_linux;
|
||||
system : system_i386_LINUX;
|
||||
name : 'Linux for i386';
|
||||
shortname : 'Linux';
|
||||
flags : [tf_needs_symbol_size];
|
||||
flags : [tf_needs_symbol_size{,tf_smartlink_sections}];
|
||||
cpu : cpu_i386;
|
||||
unit_env : 'LINUXUNITS';
|
||||
extradefines : 'UNIX;HASUNIX';
|
||||
@ -88,7 +88,8 @@ unit i_linux;
|
||||
heapsize : 256*1024;
|
||||
stacksize : 262144;
|
||||
DllScanSupported:false;
|
||||
use_function_relative_addresses : true
|
||||
use_function_relative_addresses : true;
|
||||
abi : abi_default
|
||||
);
|
||||
|
||||
system_m68k_linux_info : tsysteminfo =
|
||||
@ -151,7 +152,8 @@ unit i_linux;
|
||||
heapsize : 128*1024;
|
||||
stacksize : 32*1024*1024;
|
||||
DllScanSupported:false;
|
||||
use_function_relative_addresses : true
|
||||
use_function_relative_addresses : true;
|
||||
abi : abi_default
|
||||
);
|
||||
|
||||
system_powerpc_linux_info : tsysteminfo =
|
||||
@ -278,7 +280,8 @@ unit i_linux;
|
||||
heapsize : 256*1024;
|
||||
stacksize : 32*1024*1024;
|
||||
DllScanSupported:false;
|
||||
use_function_relative_addresses : true
|
||||
use_function_relative_addresses : true;
|
||||
abi : abi_default
|
||||
);
|
||||
|
||||
system_x86_64_linux_info : tsysteminfo =
|
||||
@ -341,7 +344,8 @@ unit i_linux;
|
||||
heapsize : 256*1024;
|
||||
stacksize : 256*1024;
|
||||
DllScanSupported:false;
|
||||
use_function_relative_addresses : true
|
||||
use_function_relative_addresses : true;
|
||||
abi : abi_default
|
||||
);
|
||||
|
||||
system_sparc_linux_info : tsysteminfo =
|
||||
@ -404,7 +408,8 @@ unit i_linux;
|
||||
heapsize : 256*1024;
|
||||
stacksize : 262144;
|
||||
DllScanSupported:false;
|
||||
use_function_relative_addresses : true
|
||||
use_function_relative_addresses : true;
|
||||
abi : abi_default
|
||||
);
|
||||
|
||||
system_arm_linux_info : tsysteminfo =
|
||||
@ -467,7 +472,8 @@ unit i_linux;
|
||||
heapsize : 256*1024;
|
||||
stacksize : 262144;
|
||||
DllScanSupported:false;
|
||||
use_function_relative_addresses : true
|
||||
use_function_relative_addresses : true;
|
||||
abi : abi_default
|
||||
);
|
||||
|
||||
implementation
|
||||
@ -514,7 +520,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.29 2004-08-15 13:30:18 florian
|
||||
Revision 1.30 2004-10-24 13:36:26 peter
|
||||
* gc-sections added when section smartlinking is used
|
||||
|
||||
Revision 1.29 2004/08/15 13:30:18 florian
|
||||
* fixed alignment of variant records
|
||||
* more alignment problems fixed
|
||||
|
||||
|
@ -211,7 +211,7 @@ var
|
||||
begin
|
||||
with Info do
|
||||
begin
|
||||
ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $STRIP -L. -o $EXE $RES';
|
||||
ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE $RES';
|
||||
DllCmd[1]:='ld $OPT $INIT $FINI $SONAME -shared -L. -o $EXE $RES';
|
||||
DllCmd[2]:='strip --strip-unneeded $EXE';
|
||||
{$ifdef m68k}
|
||||
@ -436,6 +436,7 @@ var
|
||||
cmdstr : TCmdStr;
|
||||
success : boolean;
|
||||
DynLinkStr : string[60];
|
||||
GCSectionsStr,
|
||||
StaticStr,
|
||||
StripStr : string[40];
|
||||
begin
|
||||
@ -445,11 +446,15 @@ begin
|
||||
{ Create some replacements }
|
||||
StaticStr:='';
|
||||
StripStr:='';
|
||||
GCSectionsStr:='';
|
||||
DynLinkStr:='';
|
||||
if (cs_link_staticflag in aktglobalswitches) then
|
||||
StaticStr:='-static';
|
||||
if (cs_link_strip in aktglobalswitches) then
|
||||
StripStr:='-s';
|
||||
if (cs_link_smart in aktglobalswitches) and
|
||||
(tf_smartlink_sections in target_info.flags) then
|
||||
GCSectionsStr:='--gc-sections';
|
||||
If (cs_profile in aktmoduleswitches) or
|
||||
((Info.DynamicLinker<>'') and (not SharedLibFiles.Empty)) then
|
||||
begin
|
||||
@ -470,6 +475,7 @@ begin
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$STATIC',StaticStr);
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
Replace(cmdstr,'$GCSECTIONS',GCSectionsStr);
|
||||
Replace(cmdstr,'$DYNLINK',DynLinkStr);
|
||||
success:=DoExec(FindUtil(utilsprefix+BinStr),CmdStr,true,false);
|
||||
|
||||
@ -579,7 +585,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.25 2004-10-14 18:16:17 mazen
|
||||
Revision 1.26 2004-10-24 13:36:26 peter
|
||||
* gc-sections added when section smartlinking is used
|
||||
|
||||
Revision 1.25 2004/10/14 18:16:17 mazen
|
||||
* USE_SYSUTILS merged successfully : cycles with and without defines
|
||||
* Need to be optimized in performance
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user