libanl + atexit + more

Ulrich Drepper drepper@redhat.com
Fri Mar 9 22:34:00 GMT 2001


Jakub Jelinek <jakub@redhat.com> writes:

> This one can be compiled with something like:
> 
> --- libc/dlfcn/modcxaatexit.c.jj	Mon Feb 26 18:41:22 2001
> +++ libc/dlfcn/modcxaatexit.c	Tue Mar  6 16:34:53 2001
> @@ -33,7 +33,7 @@ fluffy (void *p)
>  void
>  bar (void *p)
>  {
> -  extern void *__dso_handle;
> +  extern void *__dso_handle __attribute__ ((__weak__));
>    printf ("This is %s\n", __FUNCTION__);
> -  __cxa_atexit (fluffy, p, __dso_handle);
> +  __cxa_atexit (fluffy, p, &__dso_handle ? __dso_handle : NULL);

I've added a different patch for these.  If somebody uses a compiler
without __dso_handle atexit() will not work as expected in the dlfcn
tests.  Therefore we'll simply bail out.

I would prefer to completely ban using anything before gcc 2.96 but I
think too many loosers will complain.  Let them get a broken glibc.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------



More information about the Libc-hacker mailing list