delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/21/11:03:35

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <9803211558.AA14806@clio.rice.edu>
Subject: Re: Can the text section be made read-only?
To: cssl AT geocities DOT com
Date: Sat, 21 Mar 1998 09:58:24 -0600 (CST)
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <199803211035.CAA29749@geocities.com> from "cssl@geocities.com" at Mar 21, 98 10:12:56 am

> IMVHO it could be even better if it doesen't need a function call.

There has to be a function call someplace in the system to execute
the instructions needed to do the protection (this isn't magic).
I suggested making the routine to do the protection/unprotection
public so it can be called. 

The crt0.h flags are already used for similar behavior (like if
page 0 should be protected for null pointer protection) so 
putting the enable/disable for automatically calling this function 
there makes sense.

This way the user has the option of adding the routine call or
setting the crt0 flag.  The disadvantage of having a crt0 flag
is the code gets included in every image, and thus a tiny
bit more bloat.

But the core issue on all of this is moving the writable variables
in exceptn.s out of the text section... there is no way to 
implement it without doing that first.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019