__cxa_atexit and __cxa_finalize implementation
Joakim Tjernlund
joakim.tjernlund at lumentis.se
Wed Sep 14 06:48:47 UTC 2005
> On Tue, 13 Sep 2005, Stephen Warren wrote:
>
> > Joakim Tjernlund wrote:
> > >Stephen Warren wrote:
> > >>Did anyone have any feedback on this? Is it likely to get merged, or are
> > >>there problems with it?
> > >
> > >
> > > +/* Hide the symbol so that no definition but the one locally in the
> > > + executable or DSO is used. */
> > > +#ifdef HAVE_DOT_HIDDEN
> > > +asm (".hidden\tatexit");
> > > #endif
>
> searching the uClibc sources reveals that this part of code is only used
> by sh[64] and frv, the other archs do not define HAVE_DOT_HIDDEN.
>
> > >
> > > Just had a quick look as I don't have much time ATM, but here goes:
> > > Why do you hide atexit?
> > > If you must hide it, use attribute_hidden instead.
> >
> > Because glibc does it, of course:-)
>
> maybe glibc defines HAVE_DOT_HIDDEN for other archs as well?
>
> Peter
I think HAVE_DOT_HIDDEN is a workaround for older broken toolchains that didn't
support attribute hidden properly. In uClibc you can use the attribute_hidden define (or
.hidden in assembler).
Jocke
More information about the uClibc
mailing list