PCH and exec-shield...

Ian Lance Taylor ian@wasabisystems.com
Tue Mar 2 19:59:00 GMT 2004


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



More information about the Gcc mailing list