[parisc-linux-cvs] lock alignment problem in glibc
Sat, 17 Mar 2001 01:43:23 +0000
On Sat, Mar 17, 2001 at 12:18:07PM +1100, Alan Modra wrote:
> On Fri, 16 Mar 2001, Richard Hirst wrote:
> > --- dl-fptr.c 2000/10/06 15:20:54 1.6
> > +++ dl-fptr.c 2001/03/16 18:53:06
> > @@ -30,7 +30,7 @@
> > # include <pt-machine.h>
> > /* Remember, we use 0 to mean that a lock is taken on PA-RISC. */
> > -static int __hppa_fptr_lock = 1;
> > +static int __attribute__((aligned(16))) __hppa_fptr_lock = 1;
> > #endif
> > /* Because ld.so is now versioned, these functions can be in their own
> Hmm, does that work? All other uses of __attribute__ I've seen apply to
> the variable in question, not the type. Even if it does work, the
> following might be better, simply because it's the usual way to do things.
> Please check before committing though!!! I haven't even compiled this...
Why don't we have...
typedef int lock __attribute__ ((aligned (16)));
and then use
static lock __hppa_fptr_lock = 1;
otherwise this mistake is going to happen over and over again.
Revolutions do not require corporate support.