[fpc-pascal] Internal linker status

Sasa Zeman public at szutils.net
Wed Mar 29 14:10:01 CEST 2006


> Please provide exact steps what you did to detect that it is not used.

1. Download the latest SVN revision from
http://svn.freepascal.org/svn/fpc/branches/linker/
(revision 3065 if I remeber correctly) and trunk FPC update as well

2. After I compared current trunk and branch version I have noticed that
they are practically the same, except the
enabled directive and last added hash class in cclasses.pas (which was not
used), I have enabled directive INTERNALLINKER ({ $define INTERNALLINKER} )
to trung subversion.

3. Rrename  LD.EXE to LD.BAK
4. Clean and build all trunk SVN reslease by ...FPC/make clean all
5. Install: ...FPC/make install
6. Compile example I sent from mantis issue 4922:

>fpc -Sd demo.lpr
Free Pascal Compiler version 2.1.1 [2006/03/28] for i386
Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Win32 for i386
Compiling demo.lpr
Linking demo.exe
Error: Util ld.exe not found, switching to external linking
Error: C:\pp\bin\i386-Win32\ppc386.exe returned an error exitcode (normal if
you did not specify a source file to be compiled)

> The -Xi is only needed for SVN trunk. For the linker branch it is enabled
> by default.

I assumed that allowing directive will automatically use linternal linker.
However, in this case, without explicitly adding -Xi whas unable to link.
Please specify what else should be changed to achieve that behavior.

Executable (of example from upper wrote steps) linkined by internal linker
is 5 times larger than linked with GNU linker (suppose debugger symbols
again, which BTW can not be stripped by strip utility). Please explain cause
of it and tasks ware on your list to produce final version of internal
linker.

Is there a possibilitie to currently produce smaller executable with
internal linker?

> > This information is not available with compiler options help list.
> Ofcourse not, becuase it is a development/test option. Don't forget you
> are using development code. Especially the linker branch has no garauntees
> at all that it compiles/works.

I'm fully aware of that and that is exact reason of upper wrote steps.

Sasa
--
www.szutils.net




More information about the fpc-pascal mailing list