This is the mail archive of the libc-hacker@sourceware.cygnus.com 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]

Re: RPATH overriding


Roland McGrath <roland@frob.com> writes:

> But it seems like an ugly kludge.  Why have a feature that costs code space
> and a getenv call in every ld.so startup, but has only one use that is very
> rare?

The cost of a new variable will be higher since we have to build the
cache for these directories and also test all the subdirs according to
the capabilities of the platform.  To exclude certain names costs in
most cases only one single `if' for each found shared object.  The
lookup of the environment variable is almost for free since I've added
this special function which iterates exactly ones over all environment
variables.

> If you are going to do something that is only for this specific purpose in
> building libc, then you should just add a `--ignore-rpath' option for when
> ld.so is invoked directly.  That minimizes the potential impact on anything.

Almost true, we have to add the if's in the inner lookup loop anyway.
I.e., the cost is almost the same as for the blacklist implementation.
But maybe it's good to introduce this option since it does not make
this ugly hack so prominent.

-- Uli
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------


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