Re: [PATCH] Fix SH/FDPIC bad codegen with ssp enabled

2015-11-14 Thread Rich Felker
On Sat, Nov 14, 2015 at 09:24:32AM +0900, Kaz Kojima wrote: > Rich Felker wrote: > > The "chk_guard_add" pattern used for loading the GOT slot address for > > __stack_chk_guard hard-codes use of r12 as a fixed GOT register and > > thus is not suitable for FDPIC, where the saved initial value of r1

Re: [PATCH] Fix SH/FDPIC bad codegen with ssp enabled

2015-11-13 Thread Kaz Kojima
Rich Felker wrote: > The "chk_guard_add" pattern used for loading the GOT slot address for > __stack_chk_guard hard-codes use of r12 as a fixed GOT register and > thus is not suitable for FDPIC, where the saved initial value of r12 > from function entry is what we need. The patch is OK. Committe

[PATCH] Fix SH/FDPIC bad codegen with ssp enabled

2015-11-13 Thread Rich Felker
The "chk_guard_add" pattern used for loading the GOT slot address for __stack_chk_guard hard-codes use of r12 as a fixed GOT register and thus is not suitable for FDPIC, where the saved initial value of r12 from function entry is what we need. I would actually prefer removing this hack entirely if