[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <44D39A59.5070805@zytor.com>
Date: Fri, 04 Aug 2006 12:04:57 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Jes Sorensen <jes@....com>
CC: Andreas Schwab <schwab@...e.de>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Jeff Garzik <jeff@...zik.org>, ricknu-0@...dent.ltu.se,
linux-kernel@...r.kernel.org, Andrew Morton <akpm@...l.org>
Subject: Re: [RFC][PATCH] A generic boolean
Jes Sorensen wrote:
>>
>> And what will break if you make that switch?
>
> If we are lucky, some binary only modules? :-)
>
> But you're right, it may just have to be documented as one of those
> nasty issues to watch out for.
>
What is really poisonous is structures which get padded when all the
members are naturally aligned. Unfortunately gcc produces really crap
code with __attribute__((packed)) on some architectures, so just using
that isn't a good solution. On the other hand, non-AEABI ARM sometimes
needs it!
For the lack of a __attribute__((nopad)) that would throw a warning or
error on excessive padding, I fear that our best option is an __abi
annotation which would enforce certain rules using sparse, and
presumably provide __attribute__((packed)) on ARM:
- All padding must be explicit.
- All members must be naturally aligned.
- No unportable constructs, like non-int-sized bitfields.
-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists