usefulness of UCLIBC_CTOR_DTOR ?
Mike Frysinger
vapier at gentoo.org
Sat Sep 17 08:04:48 UTC 2011
On Saturday, August 20, 2011 23:24:17 Rich Felker wrote:
> On Sat, Aug 20, 2011 at 10:00:44PM -0400, Mike Frysinger wrote:
> > On Friday, August 12, 2011 13:59:51 Rich Felker wrote:
> > > On Fri, Aug 12, 2011 at 01:53:23PM -0400, Lennart Sorensen wrote:
> > > > C libraries can have constructors and destructors too.
> > >
> > > No they cannot. Those may be "GNU C" libraries but they are not C
> > > libraries.
> >
> > libraries written in C can have constructors and deconstructors too. see
> > the init/fini gcc attributes. this is part of the ELF spec and the
> > language (C/C++/...) is irrelevant.
>
> Just because the ELF binary format makes it possible to do something
> doesn't mean that's C. There's plenty you can do with ELF making an
> ELF file by hand that would be impossible with any C compiler or even
> a GNU C compiler. Ctors/dtors are part of ELF so it can support C++.
> GNU C just added an extension to use them in "C" too, but that doesn't
> make it C.
in the context of uClibc, it's the same thing. you can quote the spec all you
like, it doesnt change the behavior of uClibc -- we do ELF, and we do
constructors in C.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20110917/8bf52658/attachment.asc>
More information about the uClibc
mailing list