mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-25 23:01:44 +02:00
* unused coff symbols are removed by internal linker.
git-svn-id: trunk@5251 -
This commit is contained in:
parent
5a9b0949c5
commit
aa9c217f6b
@ -2031,11 +2031,22 @@ const pemagic : array[0..3] of byte = (
|
|||||||
|
|
||||||
|
|
||||||
procedure tcoffexeoutput.CalcPos_Symbols;
|
procedure tcoffexeoutput.CalcPos_Symbols;
|
||||||
|
var
|
||||||
|
i : integer;
|
||||||
|
sym : TExeSymbol;
|
||||||
begin
|
begin
|
||||||
nsyms:=0;
|
nsyms:=0;
|
||||||
sympos:=0;
|
sympos:=0;
|
||||||
if not(cs_link_strip in current_settings.globalswitches) then
|
if not(cs_link_strip in current_settings.globalswitches) then
|
||||||
begin
|
begin
|
||||||
|
{ Removing unused symbols }
|
||||||
|
for i:=0 to ExeSymbolList.Count-1 do
|
||||||
|
begin
|
||||||
|
sym:=TExeSymbol(ExeSymbolList[i]);
|
||||||
|
if not sym.ObjSymbol.objsection.Used then
|
||||||
|
ExeSymbolList.Delete(i);
|
||||||
|
end;
|
||||||
|
ExeSymbolList.Pack;
|
||||||
nsyms:=ExeSymbolList.Count;
|
nsyms:=ExeSymbolList.Count;
|
||||||
sympos:=CurrDataPos;
|
sympos:=CurrDataPos;
|
||||||
inc(CurrDataPos,sizeof(coffsymbol)*nsyms);
|
inc(CurrDataPos,sizeof(coffsymbol)*nsyms);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user