From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: nfsim cmdline section alignment problems on x86_64 Date: Thu, 06 Jan 2005 13:26:00 +0100 Message-ID: <41DD2E58.9080800@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Netfilter Development Mailinglist Return-path: To: Rusty Russell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org Hi Rusty, I ran into some alignment problems with the cmdline section on x86_64 with gcc 3.3.5. Entries are aligned to 32-byte, which causes every entry to occupy 64 bytes. sizeof(struct cmdline_option) is 40 byte however, so using them or calculating their number fails. [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [18] cmdline PROGBITS 0000000000540e80 00040e80 0000000000000280 0000000000000000 WA 0 0 32 My quick fix was to pad the structure to 64 bytes, hopefully you have a better idea :) Regards Patrick