From owner-freebsd-hackers Wed Dec 19 11: 6:27 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from noos.fr (r178m112.cybercable.tm.fr [195.132.178.112]) by hub.freebsd.org (Postfix) with ESMTP id D9D5F37B405 for ; Wed, 19 Dec 2001 11:06:24 -0800 (PST) Received: (from mux@localhost) by noos.fr (8.11.6/8.11.4) id fBJJ6KC06978; Wed, 19 Dec 2001 20:06:20 +0100 (CET) (envelope-from mux) Date: Wed, 19 Dec 2001 20:06:20 +0100 From: Maxime Henrion To: freebsd-hackers@freebsd.org Cc: Bernd Walter Subject: Re: init code in dynamic libraries Message-ID: <20011219200620.A281@nebula.noos.fr> References: <20011219184930.GA66211@cicely9.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011219184930.GA66211@cicely9.cicely.de> User-Agent: Mutt/1.3.23i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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