Subject: Re: structure alignment on arm in NetBSD? (resend without html)
To: None <tech-toolchain@netbsd.org>
From: Valeriy E. Ushakov <uwe@stderr.spb.ru>
List: tech-toolchain
Date: 10/16/2007 16:01:56
On Mon, Oct 15, 2007 at 18:11:09 +0000, Christos Zoulas wrote:
> I am not sure, but the kernel structures should be fixed instead...
As far as I understand, if ABI enforces 32-bit alignment on structs
there's just no chance you can express things like the following, so I
don't see how can you "fix" kernel structures for that.
struct foo { /* common 2-bytes header */
uint8_t a;
uint8_t b;
};
struct bar { /* some 4-bytes "packet" with common header */
struct foo; /* oops, has two bytes of tail padding */
uint8_t c;
uint8_t d;
};
I guess that's why AAPCS reverted to naturally aligned structs.
SY, Uwe
--
uwe@stderr.spb.ru | Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen