lkml.org 
[lkml]   [2006]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-04 21:07    [W:2.103 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site