Subject: current kernel unbootable + fix
To: None <port-hpcsh@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-hpcsh
Date: 04/14/2003 07:17:36
I tried to upgrade my kernel from 1.6L to current and found that the
kernel will panic very early on startup. After some staring at the
ddb I think that the problem is that link_set_* sections are linked
incorrectly.
When kernel is linked, ld issues warnings that there are no suitable
memory region for link_set_* sections and put them at 0x0. This
happens because sys/arch/hpcsh/conf/shl-elf.x defines memory region
"ram" and explicitly places output .text and .data sections into that
region.
But link_set_* sections are not mentioned in the script and when ld
copies those sections from its input to output it doesn't consider
"ram" region as suitable for those sections.
I fixed the problem with adding (rwx) attributes to the "ram" section.
The resulting kernel boots fine. I'm not sure if it's a proper fixm
though. Can someone with more ld clue look into this? Jason?
SY, Uwe
--
uwe@ptc.spbu.ru | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen