This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, ARM] Fix PIC + -fstack-protector (PR35965)
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Julian Brown <julian at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, paul at codesourcery dot com
- Date: Tue, 10 Feb 2009 14:01:07 +0000
- Subject: Re: [PATCH, ARM] Fix PIC + -fstack-protector (PR35965)
- References: <20080626110839.63f971fc@boris.athome> <20090210135103.23bd767b@rex.config>
On Tue, 2009-02-10 at 13:51 +0000, Julian Brown wrote:
> On Thu, 26 Jun 2008 11:08:39 +0100
> Julian Brown <julian@codesourcery.com> wrote:
>
> > Hi,
> >
> > This patch fixes the test case in PR35965. The problem was that using
> > a -fstack-protector[-all] option causes arm.c:require_pic_register()
> > to be called from function.c:stack_protect_prologue() (via
> > validize_mem). The logic in require_pic_register is either expecting
> > to be called "as part of the rtx cost estimation process", or whilst
> > emitting RTL for a function.
> > [...]
>
> Ping? (For after 4.4 branches?)
>
> (I received a mail this morning from a user who has run into the same
> problem this patch fixes, which reminded me of its existence... I've
> not re-tested it on mainline recently, but I can do if needed.)
The patch looks ok to me.
Hmm, do you know if -fstack-protector worked on ARM in gcc-4.1? If so,
then we have a wrong-code regression here and this should be fixed in
4.4.
R.