Open yahavb opened 1 year ago
I am trying to emulate x86_64 compiled code to run on aarch64 so I try to register the new x86_64-linux-user interpreter.
x86_64-linux-user
I added x86_64-linux-user to the TARGET_ARCH and
TARGET_ARCH
COPY --from=qemu /usr/local/bin/qemu-x86_64 /qemu-x86_64
Build works well I can't figure out the hex sequence needed to /proc/sys/fs/binfmt_misc/register in register.sh
/proc/sys/fs/binfmt_misc/register
register.sh
e.g. for aarch64 it is
echo ':qemu-aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/qemu-aarch64:CF' > /proc/sys/fs/binfmt_misc/register
Any hint into how to get that sequence?
I see other examples for registering binary format handlers like in https://docs.kernel.org/admin-guide/binfmt-misc.html but I can't figure out the offset:magic:mask values for x86
offset:magic:mask
I am trying to emulate x86_64 compiled code to run on aarch64 so I try to register the new
x86_64-linux-user
interpreter.I added
x86_64-linux-user
to theTARGET_ARCH
andBuild works well I can't figure out the hex sequence needed to
/proc/sys/fs/binfmt_misc/register
inregister.sh
e.g. for aarch64 it is
Any hint into how to get that sequence?