Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ROI35-0004xW-Cm for mharc-grub-devel@gnu.org; Wed, 09 Nov 2011 18:59:19 -0500 Received: from eggs.gnu.org ([140.186.70.92]:35286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROI2z-0004uT-FV for grub-devel@gnu.org; Wed, 09 Nov 2011 18:59:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROI2y-0003MY-9o for grub-devel@gnu.org; Wed, 09 Nov 2011 18:59:13 -0500 Received: from rcsinet15.oracle.com ([148.87.113.117]:51296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROI2y-0003MU-4g for grub-devel@gnu.org; Wed, 09 Nov 2011 18:59:12 -0500 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id pA9NxAVQ004322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 9 Nov 2011 23:59:11 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id pA9Nx9lG005725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 9 Nov 2011 23:59:10 GMT Received: from abhmt104.oracle.com (abhmt104.oracle.com [141.146.116.56]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id pA9Nx49Y010209 for ; Wed, 9 Nov 2011 17:59:04 -0600 Received: from bergsoft (/10.132.136.136) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 09 Nov 2011 15:59:04 -0800 Date: Wed, 9 Nov 2011 15:57:43 -0800 (PST) From: Seth Goldberg X-X-Sender: sethg@bergsoft To: The development of GNU GRUB Subject: Re: Issue in netbsd_bootinfo.h In-Reply-To: <4EBB0FDD.5020606@gmail.com> Message-ID: References: <4EBB0FDD.5020606@gmail.com> User-Agent: Alpine 2.00 (GSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-731129261-1320883064=:9801" X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090209.4EBB13CF.0065,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2011 23:59:17 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---559023410-731129261-1320883064=:9801 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Hi, Great. My guess is: some linkers are more forgiving than others. Can yo= u=20 get this fixed for non-Netbsd platforms where __packed is undefined, please= ? Thanks, --S Quoting Gr=E9goire Sutre, who wrote the following on Thu, 10 Nov 2011: > On 11/09/2011 01:14 AM, Seth Goldberg wrote: >> Hi, >>=20 >> The following structure definition is causing linker failures (not with = GNU >> ld) when building GRUB2: >>=20 >> struct grub_netbsd_btinfo_bootwedge { >> grub_uint32_t biosdev; >> grub_disk_addr_t startblk; >> grub_uint64_t nblks; >> grub_disk_addr_t matchblk; >> grub_uint64_t matchnblks; >> grub_uint8_t matchhash[16]; /* MD5 hash */ >> } __packed; >>=20 >>=20 >> The question is: Is this a valid way to declare a structure with a packe= d >> data structure on NetBSD? > > Yes. IIRC, this struct declaration was inspired from: > > http://nxr.netbsd.org/xref/src/sys/arch/x86/include/bootinfo.h#70 > >> Or did you mean to add "__attribute__((packed))" >> there? > > Indeed, you're right. NetBSD defines __packed depending on the > compiler: > > http://nxr.netbsd.org/source/xref/src/sys/sys/cdefs.h#314 > > For GCC, it's "__attribute__((__packed__))" as you said. Sorry > about that. I wonder why it didn't cause problems until now, though. > > Gr=E9goire > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > ---559023410-731129261-1320883064=:9801--