Xref: news2.mv.net comp.os.msdos.djgpp:6787 Newsgroups: comp.os.msdos.djgpp From: tob AT world DOT std DOT com (Tom Breton) Subject: Re: __attribute__((section)) Message-ID: Reply-To: tob AT world DOT std DOT com Organization: BREnterprises References: <838930289 DOT 23607 DOT 0 AT abwillms DOT demon DOT co DOT uk> Date: Fri, 2 Aug 1996 04:48:07 GMT Lines: 20 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams) writes: > Well, I'd just call a function in main() to do it. Making it automatic > I would leave to the people who write the startup code... like, > Charles, I guess, if he think's it's cool. Otherwise, I couldn't be > bothered to make it automatic! If you just call it in main, constructors can't use anything that needs to be locked. As a stopgap solution, the locker itself could be a constructor for a static object. You'd put a single instance of that object in a file, preferably the first file linked. That would also let you only include the library code when you had stuff to lock. > Wow... I think I've done something cool! :-) Indeed. Tom