Commit 6d2538f5 by Julian Brown Committed by Doug Kwan

re PR target/35965 ([4.3 only] -fstack-protector produces segfaulting binaries on arm/armel)

2009-02-24  Julian Brown  <julian@codesourcery.com>

	PR target/35965
	* config/arm/arm.c (require_pic_register): Only set
	cfun->machine->pic_reg once per function.

	Patch commited by Doug Kwan <dougkwan@google.com>

From-SVN: r144424
parent a2fa6772
2009-02-24 Julian Brown <julian@codesourcery.com>
PR target/35965
* config/arm/arm.c (require_pic_register): Only set
cfun->machine->pic_reg once per function.
2009-02-24 Sandra Loosemore <sandra@codesourcery.com> 2009-02-24 Sandra Loosemore <sandra@codesourcery.com>
* doc/invoke.texi (Link Options): Document an easier way to pass * doc/invoke.texi (Link Options): Document an easier way to pass
......
...@@ -3563,6 +3563,7 @@ require_pic_register (void) ...@@ -3563,6 +3563,7 @@ require_pic_register (void)
gcc_assert (can_create_pseudo_p ()); gcc_assert (can_create_pseudo_p ());
if (arm_pic_register != INVALID_REGNUM) if (arm_pic_register != INVALID_REGNUM)
{ {
if (!cfun->machine->pic_reg)
cfun->machine->pic_reg = gen_rtx_REG (Pmode, arm_pic_register); cfun->machine->pic_reg = gen_rtx_REG (Pmode, arm_pic_register);
/* Play games to avoid marking the function as needing pic /* Play games to avoid marking the function as needing pic
...@@ -3575,6 +3576,7 @@ require_pic_register (void) ...@@ -3575,6 +3576,7 @@ require_pic_register (void)
{ {
rtx seq; rtx seq;
if (!cfun->machine->pic_reg)
cfun->machine->pic_reg = gen_reg_rtx (Pmode); cfun->machine->pic_reg = gen_reg_rtx (Pmode);
/* Play games to avoid marking the function as needing pic /* Play games to avoid marking the function as needing pic
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment