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: An old dl patch


hjl@lucon.org (H.J. Lu) writes:

> --- dl-open.c	1998/03/31 16:18:44	1.1.1.5
> +++ dl-open.c	1998/08/05 14:11:41
> @@ -91,7 +91,14 @@ _dl_open (const char *file, int mode)
>      }
>  
>    new->l_global = (mode & RTLD_GLOBAL) ? 1 : 0;
> -  if (new->l_global)
> +
> +  if (_dl_loaded == new)
> +    /* We are put at the first place on the global scope list, one way
> +       or the other. We may be used by other shared objects. We have to
> +       make sure that it stays in memory for them. Increment the open
> +       count. */
> +    new->l_opencount++;
> +  else if (new->l_global)
>      {
>        /* The symbols of the new object and its dependencies are to be
>  	 introduced into the global scope that will be used to resolve

This patch cannot be correct.  You simply ignore the the RTLD_GLOBAL
flag and why modifying l_opencount?  This can only be a hack to work
around a certain bug.

I mentioned already when you sent the patcht he last time that this
situation is really unimportant and if it is not easy to fix it will
be impossible.  The only situation where dynamic loading in static
binaries is necessary is for NSS and iconv() and in these situations
it seems to work.

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