[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] reduce magic numbers length to 16 bytes (qemu-b
From: |
Anderson Lizardo |
Subject: |
Re: [Qemu-devel] [PATCH] reduce magic numbers length to 16 bytes (qemu-binfmt-conf.sh) |
Date: |
Sat, 11 Mar 2006 11:37:35 -0400 |
On 3/11/06, Andreas Schwab <address@hidden> wrote:
> "Anderson Lizardo" <address@hidden> 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?
Now I realize my mistake, sorry for the noise :/
To not make this thread completely useless: I find
/usr/share/misc/file/magic very useful to get machine patterns (as
detected by "file"). Search there for "magic for ELF executables" and
you will find a fairly complete list of machine magic numbers.
Regards,
--
Anderson Lizardo
Embedded Linux Lab - 10LE
Nokia Institute of Technology - INdT
Manaus - Brazil