Subject: Re: structure alignment on arm in NetBSD? (resend without html)
To: None <tech-toolchain@NetBSD.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: tech-toolchain
Date: 10/17/2007 21:43:55
On Wed, Oct 17, 2007 at 01:54:12PM -0400, der Mouse wrote:
> However, C was designed as an OS implementation language, and, as such,
> implementations of it really ought to make this kind of thing possible.

I think the problem here is that ARM breaks one of the most basic
assumptions that fall into the esoteric realm otherwise. If you have a
struct of power-of-two members and the order ensures that each ends up
at a power-of-two location at least as large as the type, you don't get
padding. You also only get padding up to the maximum alignment needed in
the structure or alternatively a pointer, whatever is larger. That's
what a lot of datastructures depend on.

Joerg