[fpc-pascal] linking issues

Marco van de Voort marcov at stack.nl
Fri Nov 26 10:56:04 CET 2004


> I've got two questions on linking:
> 
> 1.
> If -XX is used ("try to link smart"), is there any risk of losing needed
> code?

Not likely. Only if you open the binary and read data from it.
 
> The word "try" in this context irritates me ... don't understand if this
> says "try and see if it works" or "try but your result might get
> corrupted.

No, this is more that some units in the past were not smartlinkable.
Moreover, already compiled units (RTL etc) might not be compiled with
smartlinking enabled.

The only real problem with smartlinking that I'm aware of is that
smartlinking as currently done on _huge_ binaries (>5-10MB code) eats up
massive (GB+) amounts of mem. On a new system for smartlinking is being
worked on (this will be used in paralel, since not all OSes support the
new system)

> 2.
> When using ressourcestrings and thus linking to gettext, dynamic linking
> with -XD fails. The gettext library is linked statically any time,
> although gtk is linked dynamically. The small test program "restest"
> from the sources is about 350kB big.
> 
> Is it possible to link libgettext in dynamically?

No real idea. Does libgettext.so exist btw? Maybe it can't find the
dynamical lib.




More information about the fpc-pascal mailing list