2015-03-26 22:54:47 +01:00
|
|
|
From e6bfa3cb3d0072596f0476dd598ade5daf8d9e0b Mon Sep 17 00:00:00 2001
|
2011-10-05 17:26:05 +02:00
|
|
|
From: Alexander Graf <agraf@suse.de>
|
|
|
|
Date: Fri, 30 Sep 2011 19:40:36 +0200
|
2012-02-01 00:10:40 +01:00
|
|
|
Subject: [PATCH] linux-user: add binfmt wrapper for argv[0] handling
|
2012-08-17 18:42:52 +02:00
|
|
|
MIME-Version: 1.0
|
2013-02-10 19:32:29 +01:00
|
|
|
Content-Type: text/plain; charset=UTF-8
|
2012-08-17 18:42:52 +02:00
|
|
|
Content-Transfer-Encoding: 8bit
|
2011-10-05 17:26:05 +02:00
|
|
|
|
|
|
|
When using qemu's linux-user binaries through binfmt, argv[0] gets lost
|
|
|
|
along the execution because qemu only gets passed in the full file name
|
|
|
|
to the executable while argv[0] can be something completely different.
|
|
|
|
|
|
|
|
This breaks in some subtile situations, such as the grep and make test
|
|
|
|
suites.
|
|
|
|
|
|
|
|
This patch adds a wrapper binary called qemu-$TARGET-binfmt that can be
|
|
|
|
used with binfmt's P flag which passes the full path _and_ argv[0] to
|
|
|
|
the binfmt handler.
|
|
|
|
|
|
|
|
The binary would be smart enough to be versatile and only exist in the
|
|
|
|
system once, creating the qemu binary path names from its own argv[0].
|
|
|
|
However, this seemed like it didn't fit the make system too well, so
|
|
|
|
we're currently creating a new binary for each target archictecture.
|
|
|
|
|
|
|
|
CC: Reinhard Max <max@suse.de>
|
|
|
|
Signed-off-by: Alexander Graf <agraf@suse.de>
|
2014-03-20 01:26:56 +01:00
|
|
|
[AF: Rebased onto new Makefile infrastructure, twice]
|
2014-04-04 00:50:11 +02:00
|
|
|
[AF: Updated for aarch64 for v2.0.0-rc1]
|
2014-07-11 18:51:43 +02:00
|
|
|
[AF: Rebased onto Makefile changes for v2.1.0-rc0]
|
2012-08-17 18:42:52 +02:00
|
|
|
Signed-off-by: Andreas Färber <afaerber@suse.de>
|
2011-10-05 17:26:05 +02:00
|
|
|
---
|
2014-03-20 01:26:56 +01:00
|
|
|
Makefile.target | 13 +++++++++++++
|
2014-01-17 23:04:30 +01:00
|
|
|
linux-user/Makefile.objs | 2 ++
|
|
|
|
linux-user/binfmt.c | 42 ++++++++++++++++++++++++++++++++++++++++++
|
2014-04-04 00:50:11 +02:00
|
|
|
scripts/qemu-binfmt-conf.sh | 36 ++++++++++++++++++------------------
|
|
|
|
4 files changed, 75 insertions(+), 18 deletions(-)
|
2011-10-05 17:26:05 +02:00
|
|
|
create mode 100644 linux-user/binfmt.c
|
|
|
|
|
2011-12-11 03:42:09 +01:00
|
|
|
diff --git a/Makefile.target b/Makefile.target
|
2015-03-21 12:46:36 +01:00
|
|
|
index 2262d89..efbd850 100644
|
2011-12-11 03:42:09 +01:00
|
|
|
--- a/Makefile.target
|
|
|
|
+++ b/Makefile.target
|
2014-07-11 18:51:43 +02:00
|
|
|
@@ -34,6 +34,10 @@ endif
|
|
|
|
PROGS=$(QEMU_PROG) $(QEMU_PROGW)
|
2011-10-05 17:26:05 +02:00
|
|
|
STPFILES=
|
|
|
|
|
|
|
|
+ifdef CONFIG_LINUX_USER
|
|
|
|
+PROGS+=$(QEMU_PROG)-binfmt
|
|
|
|
+endif
|
|
|
|
+
|
2013-05-14 22:46:08 +02:00
|
|
|
config-target.h: config-target.h-timestamp
|
|
|
|
config-target.h-timestamp: config-target.mak
|
|
|
|
|
2015-01-12 19:27:43 +01:00
|
|
|
@@ -108,6 +112,8 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) -I$(SRC_PATH)/linux-user
|
2012-08-17 18:42:52 +02:00
|
|
|
obj-y += linux-user/
|
2013-02-10 19:32:29 +01:00
|
|
|
obj-y += gdbstub.o thunk.o user-exec.o
|
2011-10-05 17:26:05 +02:00
|
|
|
|
2012-08-17 18:42:52 +02:00
|
|
|
+obj-binfmt-y += linux-user/
|
2011-10-05 17:26:05 +02:00
|
|
|
+
|
|
|
|
endif #CONFIG_LINUX_USER
|
|
|
|
|
|
|
|
#########################################################
|
2015-01-12 19:27:43 +01:00
|
|
|
@@ -156,7 +162,11 @@ endif # CONFIG_SOFTMMU
|
2014-03-20 01:26:56 +01:00
|
|
|
# Workaround for http://gcc.gnu.org/PR55489, see configure.
|
2012-12-05 14:18:02 +01:00
|
|
|
%/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS)
|
2012-08-17 18:42:52 +02:00
|
|
|
|
|
|
|
+ifdef CONFIG_LINUX_USER
|
2014-03-20 01:26:56 +01:00
|
|
|
+dummy := $(call unnest-vars,,obj-y obj-binfmt-y)
|
|
|
|
+else
|
|
|
|
dummy := $(call unnest-vars,,obj-y)
|
2012-08-17 18:42:52 +02:00
|
|
|
+endif
|
2014-07-11 18:51:43 +02:00
|
|
|
all-obj-y := $(obj-y)
|
2012-08-17 18:42:52 +02:00
|
|
|
|
2015-01-12 19:27:43 +01:00
|
|
|
target-obj-y :=
|
2015-03-21 12:46:36 +01:00
|
|
|
@@ -181,6 +191,9 @@ $(QEMU_PROG_BUILD): config-devices.mak
|
2014-07-11 18:51:43 +02:00
|
|
|
$(QEMU_PROG_BUILD): $(all-obj-y) ../libqemuutil.a ../libqemustub.a
|
2015-03-21 12:46:36 +01:00
|
|
|
$(call LINK, $(filter-out %.mak, $^))
|
2011-10-05 17:26:05 +02:00
|
|
|
|
|
|
|
+$(QEMU_PROG)-binfmt: $(obj-binfmt-y)
|
|
|
|
+ $(call LINK,$^)
|
2012-05-15 14:58:40 +02:00
|
|
|
+
|
2011-10-05 17:26:05 +02:00
|
|
|
gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh
|
|
|
|
$(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@")
|
2012-05-15 14:58:40 +02:00
|
|
|
|
2012-08-17 18:42:52 +02:00
|
|
|
diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs
|
2014-07-11 18:51:43 +02:00
|
|
|
index fd50217..446aca7 100644
|
2012-08-17 18:42:52 +02:00
|
|
|
--- a/linux-user/Makefile.objs
|
|
|
|
+++ b/linux-user/Makefile.objs
|
|
|
|
@@ -5,3 +5,5 @@ obj-$(TARGET_HAS_BFLT) += flatload.o
|
|
|
|
obj-$(TARGET_I386) += vm86.o
|
|
|
|
obj-$(TARGET_ARM) += arm/nwfpe/
|
|
|
|
obj-$(TARGET_M68K) += m68k-sim.o
|
|
|
|
+
|
|
|
|
+obj-binfmt-y = binfmt.o
|
2011-12-11 03:42:09 +01:00
|
|
|
diff --git a/linux-user/binfmt.c b/linux-user/binfmt.c
|
|
|
|
new file mode 100644
|
|
|
|
index 0000000..cd1f513
|
2011-10-05 17:26:05 +02:00
|
|
|
--- /dev/null
|
2011-12-11 03:42:09 +01:00
|
|
|
+++ b/linux-user/binfmt.c
|
2011-10-05 17:26:05 +02:00
|
|
|
@@ -0,0 +1,42 @@
|
|
|
|
+#include <stdio.h>
|
|
|
|
+#include <stdarg.h>
|
|
|
|
+#include <unistd.h>
|
|
|
|
+#include <libgen.h>
|
|
|
|
+#include <string.h>
|
|
|
|
+#include <stdlib.h>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+int main(int argc, char **argv, char **envp)
|
|
|
|
+{
|
|
|
|
+ char *binfmt;
|
|
|
|
+ char **new_argv;
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * Check if our file name ends with -binfmt
|
|
|
|
+ */
|
|
|
|
+ binfmt = argv[0] + strlen(argv[0]) - strlen("-binfmt");
|
|
|
|
+ if (strcmp(binfmt, "-binfmt")) {
|
|
|
|
+ fprintf(stderr, "%s: Invalid executable name\n", argv[0]);
|
|
|
|
+ exit(1);
|
|
|
|
+ }
|
|
|
|
+ if (argc < 3) {
|
|
|
|
+ fprintf(stderr, "%s: Please use me through binfmt with P flag\n",
|
|
|
|
+ argv[0]);
|
|
|
|
+ exit(1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ binfmt[0] = '\0';
|
|
|
|
+ /* Now argv[0] is the real qemu binary name */
|
|
|
|
+
|
|
|
|
+ new_argv = (char **)malloc((argc + 2) * sizeof(*new_argv));
|
|
|
|
+ if (argc > 3) {
|
|
|
|
+ memcpy(&new_argv[4], &argv[3], (argc - 3) * sizeof(*new_argv));
|
|
|
|
+ }
|
|
|
|
+ new_argv[0] = argv[0];
|
|
|
|
+ new_argv[1] = (char *)"-0";
|
|
|
|
+ new_argv[2] = argv[2];
|
|
|
|
+ new_argv[3] = argv[1];
|
|
|
|
+ new_argv[argc + 1] = NULL;
|
|
|
|
+
|
|
|
|
+ return execve(new_argv[0], new_argv, envp);
|
|
|
|
+}
|
2011-12-11 03:42:09 +01:00
|
|
|
diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
|
2014-04-04 00:50:11 +02:00
|
|
|
index 75e0526..557dd2c 100644
|
2011-12-11 03:42:09 +01:00
|
|
|
--- a/scripts/qemu-binfmt-conf.sh
|
|
|
|
+++ b/scripts/qemu-binfmt-conf.sh
|
2014-04-04 00:50:11 +02:00
|
|
|
@@ -34,42 +34,42 @@ esac
|
2011-10-05 17:26:05 +02:00
|
|
|
|
|
|
|
# register the interpreter for each cpu except for the native one
|
|
|
|
if [ $cpu != "i386" ] ; then
|
|
|
|
- echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
- echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
fi
|
|
|
|
if [ $cpu != "alpha" ] ; then
|
|
|
|
- echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
fi
|
|
|
|
if [ $cpu != "arm" ] ; then
|
|
|
|
- echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
- echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
2014-04-04 00:50:11 +02:00
|
|
|
fi
|
|
|
|
if [ $cpu != "aarch64" ] ; then
|
|
|
|
- echo ':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:/usr/bin/qemu-aarch64:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':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:/usr/bin/qemu-aarch64-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
2011-10-05 17:26:05 +02:00
|
|
|
fi
|
|
|
|
if [ $cpu != "sparc" ] ; then
|
|
|
|
- echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
fi
|
|
|
|
if [ $cpu != "ppc" ] ; then
|
|
|
|
- echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
fi
|
|
|
|
if [ $cpu != "m68k" ] ; then
|
|
|
|
echo 'Please check cpu value and header information for m68k!'
|
2011-12-11 03:42:09 +01:00
|
|
|
- echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
2011-10-05 17:26:05 +02:00
|
|
|
fi
|
|
|
|
if [ $cpu != "mips" ] ; then
|
|
|
|
# FIXME: We could use the other endianness on a MIPS host.
|
|
|
|
- echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
- echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
- echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
- echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
- echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
- echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
fi
|
|
|
|
if [ $cpu != "sh" ] ; then
|
|
|
|
- echo ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
- echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
2012-05-15 14:58:40 +02:00
|
|
|
fi
|
2011-12-11 03:42:09 +01:00
|
|
|
if [ $cpu != "s390x" ] ; then
|
|
|
|
- echo ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-s390x:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
+ echo ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-s390x-binfmt:P' > /proc/sys/fs/binfmt_misc/register
|
2011-10-05 17:26:05 +02:00
|
|
|
fi
|