This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix ____longjmp_chk for ppc(64)
On Wed, Jun 24, 2009 at 06:30:50PM +0200, Andreas Schwab wrote:
> Richard Henderson <rth@twiddle.net> writes:
>
> > Ah. Then perhaps a trap insn might be more
> > appropriate (and slightly less confusing)?
>
> How about this?
>
> bl HIDDEN_JUMPTARGET (__fortify_fail); \
> + /* __fortify_fail doesn't return, but we need \
> + an insn to attach the cfi to it. */ \
> + nop; \
> + cfi_adjust_cfa_offset (-112); \
> + cfi_same_value (lr); \
> .Lok:
Wouldn't be better to do:
bl HIDDEN_JUMPTARGET (__fortify_fail); \
.Lok: \
mr r1, reg; \
+ cfi_adjust_cfa_offset (-112); \
+ cfi_same_value (lr)
and remove the mr r1, r14 resp. mr r1, r22 from __longjmp-common.S?
Then you don't need to add any extra insn.
Jakub