14 Apr 2003 05:17
current kernel unbootable + fix
Valeriy E. Ushakov <uwe <at> ptc.spbu.ru>
2003-04-14 03:17:36 GMT
2003-04-14 03:17:36 GMT
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 <at> ptc.spbu.ru | Zu Grunde kommen http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen
> 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?
Hm. That solution will work. Look at
sys/arch/evbarm/conf/ldscript.evbarm for another way that the problem
can be solved.
Sadly, the linker script syntax doesn't deal well with these
"anonymous" sections that link sets use. When I attempted to deal with
RSS Feed