summaryrefslogtreecommitdiff
path: root/elksemu/Kernel_patch
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>1996-03-24 17:45:55 +0100
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:29:43 +0200
commitfe22c37817ce338fbbc90b239320248c270957fa (patch)
treed9550410c4a20bdd382fcc58d2d3d7c5e04e5245 /elksemu/Kernel_patch
parenta7aba15e8efffb1c5d3097656f1a93955a64f01f (diff)
parent42192453ea219b80d0bf9f41e51e36d3d4d0740b (diff)
downloaddev86-fe22c37817ce338fbbc90b239320248c270957fa.tar.gz
Import Dev86-0.0.4.tar.gzv0.0.4
Diffstat (limited to 'elksemu/Kernel_patch')
-rw-r--r--elksemu/Kernel_patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/elksemu/Kernel_patch b/elksemu/Kernel_patch
new file mode 100644
index 0000000..451455f
--- /dev/null
+++ b/elksemu/Kernel_patch
@@ -0,0 +1,19 @@
+
+This kernel patch allows you to run Linux-8086 executables transparently
+on a Linux-i386 system. It requires V0.0.2 of elksemu in "/lib/elksemu".
+
+--- orig-13/fs/exec.c Sun Sep 24 13:22:37 1995
++++ linux/fs/exec.c Sun Feb 11 20:11:47 1996
+@@ -615,6 +615,12 @@
+ set_fs(old_fs);
+ if (retval < 0)
+ goto exec_error2;
++#ifndef NO_ELKSEMU
++ /* What a horrible hack! :-) */
++ if ((bprm.buf[0] == 1) && (bprm.buf[1] == 3) &&
++ (bprm.buf[2] == 0x20) && (bprm.buf[3] == 4))
++ memcpy(bprm.buf, "#!/lib/elksemu\n", 16);
++#endif
+ if ((bprm.buf[0] == '#') && (bprm.buf[1] == '!') && (!sh_bang)) {
+ /*
+ * This section does the #! interpretation.