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


Steve Ellcey wrote:
> So basically, which atexit you get depends on the binding order
> of the libraries, the first one found gets used.  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.

Not only that.  A more common case is to have a dependency D to the
program which itself depends on the C++ library.  In that case the
lookup order is

  program
  D
  libc
  C++ library

I reiterate: there is no way to implement this correctly in the presence
of DSOs without direct support in the libc.  Every denying this is from
the special interest group who only care about static linking.

-- 
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â

Attachment: signature.asc
Description: OpenPGP digital signature


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