[Top] [All Lists]

Magic number

Subject: Magic number
From: Steph Hannon <hannon@Crissy.Stanford.EDU>
Date: Sun, 2 Jun 96 17:10:39 PDT
In-reply-to: <>; from "Michael Engel" at May 31, 96 4:36 pm
We are using the SGI cross-compiler developed by Tor to compile our
linux source tree.  We wrote a disassembler to look at the information
in the header.  We have two problems which we hope someone can help us

1) The magic number we read out is 263.  The numbers that seem to be
valid are 407, 410, 413, 314 for OMAGIC, NMAGIC, ZMAGIC and QMAGIC,
respectively.  We can't use standard tools like dis and gdb on this
binary so we were wondering what is wrong with our magic number.

2) We read the header into a struct called kexec, just like the a.out
loader.  In our struct, kexec.a_entry is 0x0.  If we read the value
associated with "kernel_entry" out of the symbol table it is 0x01a4.
Should these be the same or does milo use this field?

We should note, to get the binary to compile to big-endian format with
the SGI complier we had to make two changes:

- in /usr/local/mips-linux/ldscripts we had to change the 
mipslinux.x* files so the output format was "a.out-mips-big-linux"
- we changed the make file so that ld used the option
        -oformat a.out-mips-big-linux
  because ld was still generating little endian after we made the first

Note -- we are basically writing our own loader to replace the milo stuff
which is why we care about this :)

Thanks for any help in advance!


<Prev in Thread] Current Thread [Next in Thread>