This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Why is a const array pointer with -fPIC mapped in ".data"?
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Cc: Kazuomi Kato <kato dot kazuomi at jp dot panasonic dot com>, gcc at gcc dot gnu dot org
- Date: 18 May 2004 19:31:04 -0300
- Subject: Re: Why is a const array pointer with -fPIC mapped in ".data"?
- Organization: Red Hat Global Engineering Services Compiler Team
- References: <039c01c43bfb$82d7fe40$2eaab684@KAZUOMI2><1084791767.18257.137.camel@pc960.cambridge.arm.com>
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}