On Fri, 6 Jan 2006 18:38:46 +0000, Russell King wrote: >> is there any architecture for which packed is required in structures like >> this: >> >> /* All standard descriptors have these 2 fields at the beginning */ >> struct usb_descriptor_header { >> __u8 bLength; >> __u8 bDescriptorType; >> }; > >sizeof(struct usb_descriptor_header) will be 4 on ARM.
I found this surprising, but gcc-3.4.5 for ARM seems to agree with you. As fas as I can tell, the AAPCS document (v2.03 7th Oct 2005) requires that a simple "struct foo { unsigned char c; };" should have both size and alignment equal to 1, but gcc makes them both 4. Do you have any information about why gcc is doing this on ARM/Linux? Is there an accurate ABI document for ARM/Linux somewhere? /Mikael ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel