🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50469

[CD]TOR_LIST

#50469
From: Gray Watson
Date: Fri, 24 Sep 1993 00:31
15 lines
1089 bytes
I have seen in the gcc info documentation references to the CTOR and
DTOR lists which allow for auto-init and auto-shutdown functions.  The
docs do not, however, tell me how to invoke these capabilities in my C
modules.  Is anyone familiar with this stuff?

I assume some sort of linker help is necessary so maybe I should be
examining gnu-ld?

If I have an init function in a .c file, how do I get it to be
executed before main?

thanks,
gray

p.s. I am running gcc 2.3.3.
Technical Details
Message-ID: <9309240020.AA25690@antaire.com>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!math.ohio-state.edu!cis.ohio-state.edu!antaire.COM!gray

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,69b2bad8fa01a9b6,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-09-23 18:42:21 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!math.ohio-state.edu!cis.ohio-state.edu!antaire.COM!gray
From: gray@antaire.COM (Gray Watson)
Newsgroups: gnu.gcc.help
Subject: [CD]TOR_LIST
Date: 23 Sep 1993 20:31:57 -0400
Organization: antaire corporation, pittsburgh, pa, usa
Lines: 15
Sender: daemon@cis.ohio-state.edu
Distribution: gnu
Message-ID: <9309240020.AA25690@antaire.com>
Reply-To: gray.watson@antaire.com