Problem with the string

Michael Eager
Tue Nov 28 02:57:00 GMT 2006

kanishk rastogi wrote:
> hi all,
> when we compile our c programs the strings which we use get defined in
> read only memory.
> how can i ask the gcc compiler to declare them in read-write section.
> or in other words
> how can i as the compiler to perform the same operation as performed
> by it when we use --fno-const-strings while compiling c++ prog

One alternative which may or may not meet your needs:
you can modify the linker script to put all data in R/W memory.

Michael Eager
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

More information about the Gcc-help mailing list