On Tue, 2006-06-27 at 20:12 +1000, Rhythmic Fistman wrote:

> >Simple: elf linker finds the transitive closure.
> 
> Eh? This means you don't need to pass any library switches when
> linking elf? Just .o files? Because that's what the old build script
> was failing to do: pass -lflx_gc

There are two factor working here. AFAIK:

First, Linux doesn't resolve symbols at link time.

Second, at run time it loads the transitive closure and
resolves against a single global symbol pool.

Saying -lflx_dynamic is enough to haul in lflx_gc at
runtime to satisfy externals.

What Windows (and Cygwin) does is to link statically 
against thunks which ensures all symbols are resolved
at load time (you can still get a run time error of course).

At run time, each component separately loads and resolves
its thunks.

The downside of this is that you can link A against B and C1
and B against C2, where A and B both require C::malloc, and
at run time you get two DISTINCT versions of malloc, because
two different libraries are loaded. 

Indeed we had this problem with C libraries on Win32.

This doesn't happen on Linux AFAIK, even if both libraries
are loaded, only one of the 'malloc' will be used. 

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to