Why is a const array pointer with -fPIC mapped in ".data"?

Alexandre Oliva aoliva@redhat.com
Tue May 18 22:31:00 GMT 2004

On May 17, 2004, Richard Earnshaw <Richard.Earnshaw@arm.com> wrote:

> If you really want your PIC data tables to be read-only, don't put
> pointers in them.

Or use Jakub's recent patches that annotate portions of the data
segment as read-only-after-relocation, and use a dynamic loader that
uses the annotations and plays, erhm, page protection dances :-)

Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

More information about the Gcc mailing list