Port-mips archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Kernel load address < text address
Hi,
I noticed that an elf2ecoff'd sgimips kernel has some unexpected ELF crud
in the first two pages following the ecoff headers:
00000140 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
|.ELF............|
The start address for this kernel is 0x80002000 (phys 0x2000). The ELF
kernel has code starting at file offset 0x2000 but sets the load address as
0x80000000 (phys 0) from file offset 0. elf2ecoff just inherits that cruft
from 0x0 to 0x2000 and places it at file offsets 0x140 to 0x2140 (hence the
above hexdump).
Program Header:
0x70000003 off 0x0038dc40 vaddr 0x8038dc40 paddr 0x8038dc40 align 2**3
filesz 0x00000018 memsz 0x00000018 flags r--
0x70000000 off 0x003f0154 vaddr 0x803f0154 paddr 0x803f0154 align 2**2
filesz 0x00000018 memsz 0x00000018 flags r--
LOAD off 0x00000000 vaddr 0x80000000 paddr 0x80000000 align 2**16
filesz 0x0040e090 memsz 0x00426510 flags rwx
...
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 0034b5cc 80002000 80002000 00002000 2**8
CONTENTS, ALLOC, LOAD, READONLY, CODE
This is fairly benign, but I think it means that the PROM overwrites its
exception vectors with the ELF header cruft as it loads the kernel.
Consequently the PROM can't catch and report very early exceptions (prior
to mips_vector_init).
Is there a simple fix to avoid this? I'm guessing this might be triggered
by the 2**16 alignment, but I haven't discovered how to change that yet.
Thanks,
Steve
Home |
Main Index |
Thread Index |
Old Index