Xref: news2.mv.net comp.os.msdos.djgpp:6702 From: alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams) Newsgroups: comp.os.msdos.djgpp Subject: Re: __attribute__((section)) Date: Tue, 30 Jul 1996 17:11:48 GMT Lines: 33 Message-ID: <838746598.16082.3@abwillms.demon.co.uk> References: NNTP-Posting-Host: abwillms.demon.co.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Mark Habersack wrote: >>While we're at it, if we can put things easily into different >>sections, wouldn't that provide a nice easy method of locking memory >>for hardware interrupt handlers? Stick everything in a '.lock' >>section, with sentinel labels in it so that a "lock_everything()" call >>could lock the entire (guaranteed contiguous) section? >That would be great, but alas would require modification to DJGPP startup code >that already deals in a special way with constructors/destructors section. Nah, you just have to call something at startup yourself. Of course, if it became a Feature, that something could go in crt0... >>BTW, is there a better way of getting the extent of a section? Some >>trickery with the linker ADDR and SIZE commands? >Well, maybe it'd be possible to create a variable in, say, startup code (or at >least some piece of soft that is guaranteed to be linked into every app) - >maybe something like vars marking the beginnig and the end of >destructors/constructors section - this variable would get initialized at >runtime (or, better, in the ld script) using ld directives you mentioned. Is >it possible, gurus? >Greetz, Mark Regards, ABW -- I have become... Comfortably numb... Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk http://www.hardcafe.co.uk/Alaric/