Mail Archives: djgpp/1996/08/07/08:48:49
Mark Habersack <grendel AT ananke DOT amu DOT edu DOT pl> wrote:
>You're right, but what about automatic locking of the section at
>startup? [continued below]
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!
>>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.
True, point taken. I'd stick .ltext on the end of .text, and .ldata on
the end of .data, as someone else suggested.
Wow... I think I've done something cool! :-)
>Mark
Regards,
ABW
--
I have become... Comfortably numb...
Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk
<A HREF="http://www.hardcafe.co.uk/Alaric/">http://www.hardcafe.co.uk/Alaric/</A>
- Raw text -