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
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!