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.

> It shows all the directories listed in configuration files.  It
> doesn't show all the directories that ldconfig searches.  That's
> because the hwcap-named subdirectories don't get added until inside
> the same loop that finds the individual libraries.  So if the intent
> is to list all the directories where ldconfig might find libraries,
> then it needs more work.

Right, I'd forgotten about those since they don't really get used on
Fedora. I took another look and did the print at the time the
directory is added to the list. It seems to work correctly now, but
it's not as clean since you actually have to let it build up the cache
to find all the directories. Untangling that seemed way too intrusive,
though.

Doing this change did highlight a couple things to me, though.

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

* 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.

Anyway, updated patch attached.

--
Dan

Attachment: print-dirs-v4.patch
Description: Text document


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