From: mcneils@applique.sedd.trw.com (Sean McNeil)
Subject: Re: A question about writing dynamically in the text segment
10 Dec 1996 10:20:20 -0800
Sender: daemon@cygnus.com
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <199612101723.JAA12236.cygnus.gnu-win32@app006221.sedd.trw.com>
Original-To: morteza@eleceng.adelaide.edu.au
Original-Cc: gnu-win32@cygnus.com
In-Reply-To: <199612100622.QAA01235@hybrid.eleceng.adelaide.edu.au>
	(morteza@eleceng.adelaide.edu.au)
Original-Sender: owner-gnu-win32@cygnus.com


I don't understand why you "need" to write to the text segment.  Why
can't you write to the data segment and execute from there?  This is
an extremely bad programming practice (self-modifying code) and is why
text segments try to be read-only.  There are all kinds of problems
with newer CPUs and invalidating instruction cache or other things
like that.  Even if you do modify the code, it may not work because of
this.
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
