1 This kernel patch allows you to run Linux-8086 executables transparently
2 on a Linux-i386 (1.2.13) system.
3 It requires V0.0.2 or better of elksemu in the file "/lib/elksemu".
5 If you are using kernel 1.3.* or later try the module: binfmt_elks.o
6 If you are using 2.0.36, 2.1.43 or 2.2.0 and later use binfmt_misc.
8 --- orig-13/fs/exec.c Sun Sep 24 13:22:37 1995
9 +++ linux/fs/exec.c Sun Feb 11 20:11:47 1996
15 + /* What a horrible hack! :-) */
16 + if ((bprm.buf[0] == 1) && (bprm.buf[1] == 3) &&
17 + (bprm.buf[2] == 0x20 || bprm.buf[2] == 0x10) && (bprm.buf[3] == 4))
18 + memcpy(bprm.buf, "#!/lib/elksemu\n", 16);
20 if ((bprm.buf[0] == '#') && (bprm.buf[1] == '!') && (!sh_bang)) {
22 * This section does the #! interpretation.