This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] tftp.h: rework layout to work with fortification


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]