This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add --print-dirs option for ldconfig


> On Mon, Apr 02, 2012 at 11:14:19AM -0700, Roland McGrath wrote:
> > Exactly what uses is this intended for?  
> 
> Figuring out where the linker is looking for libraries since it's not
> really documented anywhere.

More exact, please. ;-)  

Do you mean the linker (ld) at link time?

Do you mean ldconfig?

Do you mean all the places the dynamic linker might look on
your installation?  (I think that should be the same answer
as ldconfig.)

Do you mean the actual places the dynamic linker will in fact look
if you ran a program right now on the current machine?  (That is
a subset of the previous answer.)

> * The non-existent directories won't be shown. It could be nice to
>   know all the possible directories, but didn't seem ncessary.

Depends what you want.  If you're trying to decide where is the truly
proper place to put something new, then it might well be one of the
directories that doesn't exist now but would be used if it did.

> * The path built up by ldconfig puts the hwcap directories at the end.
>   I would have expected them to come at the beginning like
>   LD_DEBUG=libs shows. It does seem that things work out correctly in
>   the cache, though.

ldconfig is enumerating everything and storing each one in the cache along
with the bit mask of HWCAP bits that control whether to actually select it.
The dynamic linker at runtime is using a search path controlled by the
current HWCAP bits, and stopping when it finds the first hit.

So I still need to understand with much more precision what your actual use
case is.


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]