From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HU1Fq-0006cW-Ty for qemu-devel@nongnu.org; Wed, 21 Mar 2007 09:53:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HU1Fq-0006aq-92 for qemu-devel@nongnu.org; Wed, 21 Mar 2007 09:53:30 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HU1Fq-0006aI-1O for qemu-devel@nongnu.org; Wed, 21 Mar 2007 08:53:30 -0500 Received: from grayson.netsweng.com ([207.235.77.11]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HU1E9-00087j-1C for qemu-devel@nongnu.org; Wed, 21 Mar 2007 09:51:45 -0400 Date: Wed, 21 Mar 2007 09:50:43 -0400 (EDT) From: Stuart Anderson Subject: Re: [Qemu-devel] [PATCH] fcntl64 fix In-Reply-To: <200703202343.36216.paul@codesourcery.com> Message-ID: References: <20070319171303.GE28895@networkno.de> <20070320214749.GE2311@networkno.de> <200703202343.36216.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org On Tue, 20 Mar 2007, Paul Brook wrote: >> Now that the dust has settled, I see where the change is probably a >> no-op anyway. A quick little test program indicates that on x86_64, >> l_start will have an offset of 8 wether the structure is packed or not, >> and wether the __pad member is present or not. The unsigned long long is >> always going to be aligned to a 8 byte boundary. > > The __pad member is essential. Your logic is wrong is two ways: > > a) The struct is packed. This overrides normal alignment and ensures the > structure contains no padding. And in this case, it does remove some tail padding at the end of the structure. > b) long long has whatever alignment the host feels like giving it. There's no > guarantee it's going to be 8 byte aligned. No there isn't. This was just an observation of what occurs when building a simple test case on x86_64. Stuart Stuart R. Anderson anderson@netsweng.com Network & Software Engineering http://www.netsweng.com/ 1024D/37A79149: 0791 D3B8 9A4C 2CDC A31F BD03 0A62 E534 37A7 9149