Subject: Re: C shared lib question
To: None <firstname.lastname@example.org>
From: Eduardo E. Horvath <email@example.com>
Date: 03/10/2000 08:46:37
> On Fri, Mar 10, 2000 at 01:07:20AM +0000, Christos Zoulas wrote:
> > > Well, that is sucky. The linker is supposed to recognize those and stuff
> > > them into the .init and .fini sections.
> > Is it? I don't think so. I thought that you needed:
> > extern void _init(void) __attribute__((section(".init")));
> Well, you don't need this in the Solaris toolchain, at least. The
> Solaris kernel, for example, has _init() and _fini() routines with
> no such attributes (they don't use GCC, after all :-) in several
> device drivers...
That's the Solaris _kernel_. I don't believe that the same is true of
the Solaris userland. That's done through some magic in `krtld' and
is designed specifically for dynamically loadable device drivers.
I'll have to go and dump the ELF headers on some drivers, but I don't
think that they make use of `.init' and `.fini' sections for this
functionality. So I'd say you're comparing apples and oranges here.
Eduardo Horvath firstname.lastname@example.org
"I need to find a pithy new quote." -- me