PR ld/2290, /etc/ld.so.conf search

Mike Frysinger vapier@gentoo.org
Thu Apr 6 18:16:00 GMT 2006


On Thursday 06 April 2006 09:38, Alan Modra wrote:
> On Thu, Apr 06, 2006 at 08:53:32AM -0400, Mike Frysinger wrote:
> > On Wednesday 05 April 2006 10:20, Alan Modra wrote:
> > > I think the best solution to this problem is for ld to look in
> > > ${prefix}/etc/ld.so.conf, if it exists, before looking in
> > > /etc/ld.so.conf.  ${prefix}/etc/ld.so.conf happens to be the default
> > > location of glibc's ld.so configuration file, except for --prefix=/usr
> > > which uses /etc/ld.so.conf by default.
> >
> > would it be a good idea to have ld not bother with
> > ${prefix}/etc/ld.so.conf when ${prefix} == /usr just like glibc ?
>
> I did consider doing that, but decided against it because it seemed an
> unnecessary complication.  The only time it would ever matter is if
> /usr/etc/ld.so.conf existed and wasn't equivalent to /etc/ld.so.conf.

*shrug* it is a bit more overhead with the nested tests ... just an idea as 
the point of the original fix was to merge glibc/ld behavior rather than 
diverge

but you're right, most native linkers should never really 
have /usr/etc/ld.so.conf, so we just get the tiny overhead of trying to open 
it
-mike



More information about the Binutils mailing list