* unused coff symbols are removed by internal linker.

git-svn-id: trunk@5251 -
This commit is contained in:
yury 2006-11-05 19:39:50 +00:00
parent 5a9b0949c5
commit aa9c217f6b

View File

@ -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);