mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 17:49:27 +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;
|
||||
var
|
||||
i : integer;
|
||||
sym : TExeSymbol;
|
||||
begin
|
||||
nsyms:=0;
|
||||
sympos:=0;
|
||||
if not(cs_link_strip in current_settings.globalswitches) then
|
||||
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;
|
||||
sympos:=CurrDataPos;
|
||||
inc(CurrDataPos,sizeof(coffsymbol)*nsyms);
|
||||
|
Loading…
Reference in New Issue
Block a user