This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PCH and exec-shield...
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: law at redhat dot com
- Cc: Eric Christopher <echristo at redhat dot com>, David Daney <ddaney at avtrex dot com>, gcc at gcc dot gnu dot org
- Date: 02 Mar 2004 14:59:04 -0500
- Subject: Re: PCH and exec-shield...
- References: <200403021922.i22JMMH8009448@speedy.slc.redhat.com>
law@redhat.com writes:
> Alternately, I believe we could have the build process mark cc1plus and
> friends as not needing/wanting the exec-shield functionality. IIRC there
> is a program you can run which twiddles bits in the ELF headers/sections
> which allow you to control exec-shield on a per-binary basis.
Not to get too far out, but is there any way that PCH could work even
when exec-shield is enabled?
Or is it just the testsuite which is an issue here?
It doesn't seem desirable to disable exec-shield on the whole system
just to make PCH work.
With the default kernel setting, cc1 will only use exec-shield if it
has a PT_GNU_STACK program segment. Unfortunately objcopy can't fix
that for you. Also unfortunately I don't think anybody has added a
linker option to disable creating such a segment. Also unfortunately
the linker options which do exist are not documented. Grrrr.
Ian