Subject: Re: ARM ELF toolchain patches
To: Chris G. Demetriou <cgd@sibyte.com>
From: Richard Earnshaw <rearnsha@buzzard.freeserve.co.uk>
List: port-arm32
Date: 02/22/2001 00:20:42
> rearnsha@buzzard.freeserve.co.uk (Richard Earnshaw) writes:
> > This
> > isn't a major problem if momentary stack unalignemnt is OK, but issues
> > such as asynchronous events have to be considered (for example, if a
> > signal were received when the stack was not 8-byte aligned, would the
> > signal handler function correctly -- in particular, would it run on its
> > own stack, or on the stack of the current process?).
>
> That particular one is easy: if 8-byte alignment on function entry is
> mandated, the kernel could be sure to align the SP to 8 bytes before
> invoking the user signal handler...
>
> (It seems that if ATPCS requires 8 byte alignment on entry & exit, if
> we want to support that -- i dunno anything about it -- then we've
> gotta make sure the stack is properly aligned on signal handler entry
> as well...)
Sure, so the issue is that the kernel signal despatching code has to be
sure to re-align the stack before posting the signal (and to restore the
correct value if the handler returns).
R.