[oe] [oe-commits] Stanislav Brabec : glibc: Install ld.so.conf, so ldconfig does not complain .

Phil Blundell philb at gnu.org
Thu Aug 27 13:24:38 UTC 2009


On Thu, 2009-08-27 at 13:32 +0200, Stanislav Brabec wrote:
> By the way, what is the benefit of not using ldconfig? Strace shows 15
> extra failing library lookups for each library.

It depends on your DISTRO configuration really: some people will be
better off without it and some people won't.

If your library paths are set up right, the dynamic linker will find the
library in the first place it searches and hence there's no need for the
cache file.  In that situation, the extra time taken to stat and map the
cache is just a waste.  This is one of the reasons that the micro
distribution folds out /usr and installs all libraries into /lib.

Also, ldconfig itself is a large-ish binary, especially if it's
statically linked, and represents a waste of scarce flash space on small
systems.

Also also, keeping the cache up to date requires that you either have a
writeable rootfs or that you store the cache in RAM disk; in the latter
case you would need to generate it on every boot, which might be an
unwelcome slowdown.

On the other hand, if you find yourself obliged to spread the libraries
across many directories, and/or if you plan to use hwcap-based
searching, installing ldconfig might indeed be a net win.  If you're
seeing 15 path lookups for each library load then it sounds like your
system falls into this category.

p.






More information about the Openembedded-devel mailing list