Date: Thu, 1 Aug 1996 16:16:43 +0200 (MET DST) From: Mark Habersack To: "Alaric B. Williams" cc: djgpp AT delorie DOT com Subject: Re: __attribute__((section)) In-Reply-To: <838840319.11194.2@abwillms.demon.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 31 Jul 1996, Alaric B. Williams wrote: >Mark Habersack wrote: > >>segment when proggy is loaded? If so, you have to use far pointers/switch DS >>selector if you want to access the data - BY HAND. > >Is this really true? > >I mean, will the stub actually allocate seperate selectors with DPMI >for other sections, or just load all those sections into the same >virtual address space, as I thought? You're right, but what about automatic locking of the section at startup? [continued below] >I managed that... without changing the ld script, so ld just put my >section into a section of the same name in the output file (ie, didn't The loader code needs to know where does the section to be locked begin/end. >group it). No need for different .ld scripts unless you want to >control the placement of this section in the load image. So you have to create a separate .ld script anyway to initialize variables properly - just like it's done with .dtor .ctor sections. Note that the LIBC source contains only extern declarations of the __djgpp_first_ctor/dtor and __djgpp_last_ctor/dtor - they are actually created in .ld script. Mark /*******************************/ /** So here I am once more... **************************************/ /** When you grown up and leave your playground, where you kissed **/ /** your Prince and found your Frog - remember the Jester that **/ /** showed you tears, a Script for Tears... ************************/ /*********************************************/