Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Dec 2001 20:06:20 +0100
From:      Maxime Henrion <mux@qualys.com>
To:        freebsd-hackers@freebsd.org
Cc:        Bernd Walter <ticso@cicely9.cicely.de>
Subject:   Re: init code in dynamic libraries
Message-ID:  <20011219200620.A281@nebula.noos.fr>
In-Reply-To: <20011219184930.GA66211@cicely9.cicely.de>
References:  <20011219184930.GA66211@cicely9.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Bernd Walter wrote:
> How can I add initalisation code to a library without needing to
> call a function in the using application?
> What I saw is that libc does something like this but havn't found
> the starting point of this.

There are two special functions for that : _init() which will be called
when the object is loaded, and _fini() which will be called when it is
released.

Maxime
-- 
Don't be fooled by cheap finnish imitations ; BSD is the One True Code

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011219200620.A281>