From owner-freebsd-questions Fri Mar 20 06:02:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA28712 for freebsd-questions-outgoing; Fri, 20 Mar 1998 06:02:04 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA28651 for ; Fri, 20 Mar 1998 06:01:56 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [194.198.43.36]) by ns1.yes.no (8.8.7/8.8.7) with ESMTP id OAA25079; Fri, 20 Mar 1998 14:01:34 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.6/8.8.6) id PAA11605; Fri, 20 Mar 1998 15:01:34 +0100 (MET) Message-ID: <19980320150133.58619@follo.net> Date: Fri, 20 Mar 1998 15:01:33 +0100 From: Eivind Eklund To: Jason Alan Nordwick , freebsd-questions@FreeBSD.ORG Subject: Re: shared object initializers References: <19980320003843.25030.qmail@scheme.xcf.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <19980320003843.25030.qmail@scheme.xcf.berkeley.edu>; from Jason Alan Nordwick on Fri, Mar 20, 1998 at 12:38:43AM -0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Mar 20, 1998 at 12:38:43AM -0000, Jason Alan Nordwick wrote: > > Is there a way to have an initializer for a shared object that is called > upon link/load, before main() is called ? As far as I know - no. However, from looking at the source it looks like a symbol called ".init" (preferred) or "__init" (if .init doesn't exist) will be called before the shared object is considered initialized. > More generally, is there somewhere I can read more information about > link/load ? I tried link(5), rtld(1), and ld(1). That information is mostly available only from the archives of -hackers. If you have an interest in this, a very good project owuld be writing a tutorial or handbook section for this. If you take notes as you go, I can help you with sewing it all together and answering questions. (Don't expect really large amounts of my time, but the knowledge is freely available :-) Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message