From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) Message-Id: <9803171440.AA16159@clio.rice.edu> Subject: Re: Can the text section be made read-only? To: eldredge AT ap DOT net (Nate Eldredge) Date: Tue, 17 Mar 1998 08:40:25 -0600 (CST) Cc: djgpp-workers AT delorie DOT com In-Reply-To: <199803170157.RAA24152@adit.ap.net> from "Nate Eldredge" at Mar 16, 98 05:57:10 pm Content-Type: text Precedence: bulk > Perhaps it could be enabled by a crt0 flag to start with? There should be a flag; the default should be decided by input from developers with a final decision by the great one. > Is there any way to check whether read-only pages will work with CWSDPMI? (I > only have r3 here so I might not be of much help.) I'm pretty sure they work OK, I'm just not sure they page in/out off disk properly... (not tested) I would suggest a procedure __djgpp_protect_text(onoff) which could be used to toggle the protection; this would then be called by crt1 based on the crt flag or by users wanting to do god knows what. It would probably steal code from mprotect since the text section is always in the first memory zone and you avoid the namespace conflicts.