13.02.2021 13:19, Michael Tokarev wrote:
...
I can think of another hack. Qemu-user binary may look at its
name and if it sees some magic prefix (eg, qemu-foo-binfmt-trigger),
it will assume it is run from within the binfmt subsystem with
the P flag in effect. Yes it is hacky, but it *might* work.

Actually this is something I like. Yes it is hackish but it works.
So I implemented this, using /usr/libexec/qemu-binfmt/foo-binfmt-P
symlinks to ../../bin/qemu-foo[-static], and detecting "-binfmt-P"
prefix in qemu-user/main.c.

The only downside of this is that now, for the first time in many
years, binfmt interpreter for qemu has changed. Dunno how well it
is for the users, but the only way to find out is to try it.
Let's see..

/mjt

Dunno how good it is to perform such experiments this late in
the bullseye development cycle...

What do you all think ?

Reply via email to