From owner-freebsd-hackers Tue Nov 24 09:08:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA13262 for freebsd-hackers-outgoing; Tue, 24 Nov 1998 09:08:33 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from whitewater.chem.wisc.edu (bayou.chem.wisc.edu [128.104.71.107]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA13257 for ; Tue, 24 Nov 1998 09:08:32 -0800 (PST) (envelope-from jagapen@whitewater.chem.wisc.edu) Received: from billybob (billybob [10.2.71.93]) by whitewater.chem.wisc.edu (8.9.1/8.9.1) with ESMTP id LAA03921 for ; Tue, 24 Nov 1998 11:08:28 -0600 (CST) Date: Tue, 24 Nov 1998 11:08:28 -0600 (CST) From: Jonathan Gapen X-Sender: jagapen@billybob.chem.wisc.edu To: freebsd-hackers@FreeBSD.ORG Subject: Re: ELF Global Constructors In-Reply-To: <199811240822.TAA07814@cimlogic.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 24 Nov 1998, John Birrell wrote: > For an example of a constructor, have a look at: > src/lib/libc_r/uthread/uthread_autoinit.cc > > This is how a threaded process is initialised prior to the process calling > main(). This code works with the in-tree compiler (I haven't used egcs, so > I'm not sure about that). Doh! I forgot to mention that most of GNUstep is written in Objective C, so C++ constructors aren't going to work. Further, the global class trick doesn't work. That does suggest to me the bad hack of linking in a C++ class which calls that function. Still, I'd like to find out how the C++ compiler hooks in those constructors to be called before main(), so I can do the same. -- Jonathan Gapen - sysadmin - biker - caver - collecter of old computers I think you know exactly what I mean when I say it's a shpadoinkle day. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message