[uClibc] ld.so loading "false" libs

Stuart Hughes seh at zee2.com
Wed Sep 29 13:50:47 UTC 2004


Mike Frysinger wrote:
> 
> On Wednesday 29 September 2004 08:36 am, Stuart Hughes wrote:
> > You're right.  Actually what I was doing was using a gcc that used an
> > ld-linux that was not prefixed in the usual /usr (LFS bootstrap).  In
> > this case I needed to get gcc/ld to pick up my libraries from
> > <my_prefix>/X11, rather than the one specified in /etc/ld.so.conf.  In
> > many ways it's a little unfortunate that ld does look in
> > /etc/ld.so.conf.  Do you know an easy way of overriding this, or
> > changing this behaviour.
> 
> i havent confirmed this but i think what you were talking about before with
> LD_LIBRARY_PATH would work ... then again, you probably already tried it
> meaning it doesnt work :)
> 
> from my experience, i'd say ld has this behavior (someone please correct me):
> - check LD_LIBRARY_PATH
> - check hardcoded paths
> - check /etc/ld.so.conf
> 
> currently uclibc has a diff behavior (iirc):
> - check LD_LIBRARY_PATH
> - check /etc/ld.so.cache
> - check hardcoded paths
> 
> there is a comment in the shared library loader that no specification really
> defines whether cache should come before hardcoded paths, but perhaps uclibc
> should change to match ld ?  that way compile link time order is the same as
> runtime link order ...


LD_LIBRARY_PATH did work, it's just that I would have preferred not to
use this, IMHO it would be nice to have some easy way to pass
"-rpath-link" into configure scripts (I guess this is getting off
topic).

Although there is no reason why uclibc's shared library loader must
match
ld's search order, I'd agree with you that if it did, then people would
be less prone to unexpected surprises.

Regards, Stuart



More information about the uClibc mailing list