mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 02:49:28 +02:00
* don't always pass -no_dead_strip_inits_and_terms, because it automatically
turns on dead code stripping (smart linking). Do specify it when smart linking is enabled though. git-svn-id: trunk@13653 -
This commit is contained in:
parent
1b04684d78
commit
1503890756
@ -161,14 +161,14 @@ begin
|
|||||||
On 64bit systems, page zero is 4GB by default, so no problems
|
On 64bit systems, page zero is 4GB by default, so no problems
|
||||||
there.
|
there.
|
||||||
}
|
}
|
||||||
ExeCmd[1]:='ld $PRTOBJ $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -pagezero_size 0x10000 -no_dead_strip_inits_and_terms -multiply_defined suppress -L. -o $EXE `cat $RES`';
|
ExeCmd[1]:='ld $PRTOBJ $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -pagezero_size 0x10000 -multiply_defined suppress -L. -o $EXE `cat $RES`';
|
||||||
{$else ndef cpu64bitaddr}
|
{$else ndef cpu64bitaddr}
|
||||||
ExeCmd[1]:='ld $PRTOBJ $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -no_dead_strip_inits_and_terms -multiply_defined suppress -L. -o $EXE `cat $RES`';
|
ExeCmd[1]:='ld $PRTOBJ $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -no_dead_strip_inits_and_terms -multiply_defined suppress -L. -o $EXE `cat $RES`';
|
||||||
{$endif ndef cpu64bitaddr}
|
{$endif ndef cpu64bitaddr}
|
||||||
if (apptype<>app_bundle) then
|
if (apptype<>app_bundle) then
|
||||||
DllCmd[1]:='ld $PRTOBJ $OPT -no_dead_strip_inits_and_terms -dynamic -dylib -multiply_defined suppress -L. -o $EXE `cat $RES`'
|
DllCmd[1]:='ld $PRTOBJ $OPT -dynamic -dylib -multiply_defined suppress -L. -o $EXE `cat $RES`'
|
||||||
else
|
else
|
||||||
DllCmd[1]:='ld $PRTOBJ $OPT -no_dead_strip_inits_and_terms -dynamic -bundle -multiply_defined suppress -L. -o $EXE `cat $RES`'
|
DllCmd[1]:='ld $PRTOBJ $OPT -dynamic -bundle -multiply_defined suppress -L. -o $EXE `cat $RES`'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -531,7 +531,7 @@ begin
|
|||||||
if not(target_info.system in systems_darwin) then
|
if not(target_info.system in systems_darwin) then
|
||||||
GCSectionsStr:='--gc-sections'
|
GCSectionsStr:='--gc-sections'
|
||||||
else
|
else
|
||||||
GCSectionsStr:='-dead_strip';
|
GCSectionsStr:='-dead_strip -no_dead_strip_inits_and_terms';
|
||||||
|
|
||||||
if(not(target_info.system in systems_darwin) and
|
if(not(target_info.system in systems_darwin) and
|
||||||
(cs_profile in current_settings.moduleswitches)) or
|
(cs_profile in current_settings.moduleswitches)) or
|
||||||
|
Loading…
Reference in New Issue
Block a user