delorie.com/archives/browse.cgi | search |
From: | "Charles Sandmann" <sandmann AT clio DOT rice DOT edu> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: [Q] Is it possible to write-protect the text section ? |
Date: | Thu, 10 Jul 1997 22:44:01 |
Organization: | Aspen Technology, Inc. |
Lines: | 10 |
Message-ID: | <33c565b1.sandmann@clio.rice.edu> |
References: | <5q2oak$mfh$2 AT arcturus DOT ciril DOT fr> |
Reply-To: | sandmann AT clio DOT rice DOT edu |
NNTP-Posting-Host: | spica.dmccorp.com |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Yes, but... sys/mman.h mprotect() will provide a way to make pages readonly. There is a (very bad) place in exceptn.S which writes to the text section to store things which need to be locked (I regret doing this, so the text can't be easily automatically made readonly). This page or two needs to be kept read/write (unless someone fixes it...) And this only works with DPMI 1.0 features, so you would need CWSDPMI or 386MAX to make it work.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |