This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Write enable .text section
- From: "Meissner, Michael" <michael dot meissner at amd dot com>
- To: "William" <sentri1982 at yahoo dot com>, gcc-help at gcc dot gnu dot org
- Date: Thu, 23 Mar 2006 14:56:13 -0500
- Subject: RE: Write enable .text section
It depends on the operating system you are using as well as the linker.
If you are using the GNU linker, you can do what you want by using
linker scripts, but these are very arcane.....
I have worked on platforms where it was impossible to write self
modifying code in any fashion, and on many other systems where you had
to go through various hoops to make sure all of the caches are flushed
properly (the trampoline code within the compiler generates self
modifying code).
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of William
Sent: Monday, March 13, 2006 10:59 PM
To: gcc-help@gcc.gnu.org
Subject: Write enable .text section
Hi, I'm trying to implement some self-modifying code.
Usually I use Visual C++ so I'm not too familiar with the linker that
gcc uses. I can't figure out how to enable write for the .text section
so I don't get an access violation when the SMC runs. Anyone can help?
Thanks!
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com