Re: PATCH: Linux high in the sky

Ulrich Windl (Ulrich.Windl@rz.uni-regensburg.de)
Thu, 22 Feb 1996 10:52:14 +0100


If you received a previous message on the same subject, it was an
error in the user-machine dialog)

On 21 Feb 96 at 10:36, Albert Cahalan wrote:

>
> It would be great if you could put a 32-bit magic number
> right at the beggining of the image. Something like what
> I've included here adds only 4 bytes, or 8 if you include
> kernel version data. It would be great if file could print
> "Linux 1.3.70 i386 kernel image data, ELF/bzImage/experimental"
>
> Note that the magic number is code to save space.
>
> --- oldbootsect.S Sun Nov 26 21:53:26 1995
> +++ linux/arch/i386/boot/bootsect.S Sun Nov 26 22:06:32 1995
> @@ -53,6 +53,10 @@
> ! ld86 requires an entry symbol. This may as well be the usual one.
> .globl _main
> _main:
> + nop ! avoid DOS .com file in /etc/magic
> + jmp over_magic
> + .byte 0xF0 ! Magic number is '90 eb 01 f0'
> +over_magic:
> #if 0 /* hook for debugger, harmless unless BIOS is fussy (old HP) */
> int 3
> #endif

Even with your patch the file could still be a DOS COM file; not all
COM files must start with a jump. Despite of that the Linux kernel IS
a kind of COM file (with a DOS-to-Linux extender!)

Ulrich