Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FI5RX-0007nV-LC for qemu-devel@nongnu.org; Sat, 11 Mar 2006 09:51:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FI5RT-0007k8-JF for qemu-devel@nongnu.org; Sat, 11 Mar 2006 09:51:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FI5RS-0007jk-Nj for qemu-devel@nongnu.org; Sat, 11 Mar 2006 09:51:38 -0500 Received: from [195.135.220.15] (helo=mx2.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FI5Uz-0000Mo-Le for qemu-devel@nongnu.org; Sat, 11 Mar 2006 09:55:17 -0500 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id E608D1D773 for ; Sat, 11 Mar 2006 15:51:35 +0100 (CET) From: Andreas Schwab Subject: Re: [Qemu-devel] [PATCH] reduce magic numbers length to 16 bytes (qemu-binfmt-conf.sh) References: <5b5833aa0603101858t5ebe6f7i667175ef8e966085@mail.gmail.com> Date: Sat, 11 Mar 2006 15:51:33 +0100 In-Reply-To: <5b5833aa0603101858t5ebe6f7i667175ef8e966085@mail.gmail.com> (Anderson Lizardo's message of "Fri, 10 Mar 2006 22:58:37 -0400") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org "Anderson Lizardo" writes: > Any reason why the magic numbers from qemu-binfmt-conf.sh are not just > 16 bytes long as those reported by "readelf --file-header"? For > example: > > $ readelf --file-header /bin/true | grep Magic: > Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 > > Using only the first 16 bytes avoids the need to have separate entries > for i386 and i486, given that they are emulated by the same program > (qemu-i386). How would you distinguish it from an arm or mipsel binary? Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 "And now for something completely different."