Control: tag -1 + patch pending
> So the problem is quite interesting.
>
> There's a field in ELF header, byte #7, ELF_OSABI. All at least x86
> binaries so far had this field = 0, which means OSABI_SYSV. But
> static libraries produced by recent gcc/binutils has this field = 3,
> which means OSABI_GNU ("with GNU extensions" as comment says). And
> this OSABI=3 variant is not handled by our binfmt magic/mask pair.
>
> Now, this field (ELF_OSABI) is a enumeration, and we need to allow
> either 0 or 3 in there, but not other variants, since this will
> result in qemu trying to execute some clearly different-ABI binaries.
> A somewhat too intrusive fix for a freeze, but I'll try.
For now I just extended the mask to allow either 0, 1, 2 or 3 in this
(ELF_OSABI) field. You can do it locally -- in /var/lib/binfmts/qemu-x86_64,
change 7th byte (counting from 0) in the mask (the string which starts
with \xff\xff...) from 0xff to 0xfb and re-run /etc/init.d/binfmt-support.
After that, your static x86 binaries should at least try to work in qemu.
Note again the bytes are counted from 0, not from 1. It should look
like this:
\xff\xff\xff\xff\xff\xfe\xfe\xfb\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff
0 1 2 3 4 5 6 7 ^^
Since I don't have access to arm box where I can verify this, can you
please try this for me and tell if it fixes this issue?
Thanks,
/mjt
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]