[PATCH] tftp.h: rework layout to work with fortification
David Miller
davem@davemloft.net
Thu Apr 12 16:41:00 GMT 2012
From: Andreas Schwab <schwab@linux-m68k.org>
Date: Thu, 12 Apr 2012 17:52:30 +0200
> I wonder what's the use of packing here. There should be no padding,
> each field has at most short alignment.
I think it's to handle cpus like ARM where a structure containing
smaller than u32 objects will be aligned up to need u32 alignment.
In the Linux kernel we have:
struct nd_opt_hdr {
__u8 nd_opt_type;
__u8 nd_opt_len;
} __packed;
to deal with this ARM issue.
More information about the Libc-alpha
mailing list