This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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