This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: __cxa_atexit question
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: mark at codesourcery dot com
- Cc: drepper at redhat dot com, bkoz at redhat dot com, libstdc++ at gcc dot gnu dot org
- Date: Thu, 18 May 2006 13:20:36 -0700 (PDT)
- Subject: Re: __cxa_atexit question
> > Since libc is usually
> > specified last you should get the libCsup version in all normal cases,
> > but you could probably make a program pick up the libc version if you
> > did a link line with -lc before -lCsup.
>
> Do you know what happens if a C shared library calls atexit, and is then
> linked into a C++ application? Does the C library call the C++ atexit?
It depends a bit on how things are linked together but yes, in general,
the C library will call the C++ atexit because dld should find libCsup
before it finds libc when searching for the atexit entry point.
Steve Ellcey
sje@cup.hp.com