Write enable .text section

William sentri1982@yahoo.com
Fri Mar 24 01:47:00 GMT 2006

Thanks for the reply!  Well basically I got the SMC
code working, only problem is that the .text section
of the executable file is default read/execute only. 
Using the linker with Visual C++ I can set the
parameter /section:.text RWE but I can't find the
equivalent for gcc.  Right now I got to use a PE
editor to manually set the Write flag which is a tad

--- "Meissner, Michael" <michael.meissner@amd.com>

> 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). 

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Gcc-help mailing list