Date: Wed, 5 Nov 1997 19:46:59 -0800 (PST) Message-Id: <199711060346.TAA03209@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Christopher Croughton From: Nate Eldredge Subject: Re: Writing to a file from dtor doesn't work! Cc: djgpp AT delorie DOT com Precedence: bulk At 11:24 11/5/1997 +0100, Christopher Croughton wrote: >(My question about whether it was in the library was due to experience >with other compilers where the startup/exit code is in a separate module >linked explicitly by the compiler rather than in the library itself. I'm >glad to hear that it's in a standard library module...) Actually, it is both. There's a module called `crt0.o' which contains the most basic startup and __exit code (and also sbrk, IIRC). I think due to something in the linker the file containing the `start' entry point has to be first on the linker command line. But most of the interesting startup things are done by modules of the C library, which are pulled in by crt0.o. Nate Eldredge eldredge AT ap DOT net