Subject: structure alignment on arm in NetBSD? (resend without html)
To: None <tech-toolchain@netbsd.org>
From: Martin Fouts <mfouts@danger.com>
List: tech-toolchain
Date: 10/15/2007 09:45:07
Deep in the heart of gcc sources,=20
In src/gnu/dist/gcc4/gcc/config/arm/netbsd-elf.h I found the comment
=20
/* VERY BIG NOTE: Change of structure alignment for NetBSD/arm.
   There are consequences you should be aware of...

   Normally GCC/arm uses a structure alignment of 32 for compatibility
   with armcc.  This means that structures are padded to a word
   boundary.  However this causes problems with bugged NetBSD kernel
   code (possibly userland code as well - I have not checked every
   binary).  The nature of this bugged code is to rely on sizeof()
   returning the correct size of various structures rounded to the
   nearest byte (SCSI and ether code are two examples, the vm system
   is another).  This code breaks when the structure alignment is 32
   as sizeof() will report a word=3D3Drounded size.  By changing the
   structure alignment to 8. GCC will conform to what is expected by
   NetBSD.

(rest elided...)

Is this comment still accurate?