DragonFly users List (threaded) for 2005-03
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: Calling _init for libraries
On Mon, Mar 28, 2005 at 06:16:53PM +0100, Jonathon McKitrick wrote:
>
> I'm having trouble getting my libraries to use _init() when they are loaded
> with dlopen(). What is the trick to this? So far, I either get a linker
> error that the label is already defined, or else the routine never ends up
> being called at all.
I'm not sure if we support _init() or even want to support that.
The correct solution (but maybe not the most portable) is
__attribute__((constructor)).
Joerg
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]