DragonFly BSD
DragonFly users List (threaded) for 2005-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Calling _init for libraries


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Mon, 28 Mar 2005 19:27:46 +0200
Mail-followup-to: users@crater.dragonflybsd.org

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]