[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-mips/40522: mips kernel ldscript updates for dwarf2
>Synopsis: mips kernel ldscript updates for dwarf2
>Arrival-Date: Sat Jan 31 00:10:00 +0000 2009
>Originator: David A. Holland / dholland%eecs.harvard.edu@localhost
>Release: NetBSD 5.99.7 (20090130)
System: NetBSD tanaqui 4.99.54 NetBSD 4.99.54 (TANAQUI) #21: Fri Feb 29
12:31:31 EST 2008 dholland@tanaqui:/usr/src/sys/arch/i386/compile/TANAQUI i386
The mips kernel ldscript (src/sys/arch/mips/conf/kern.ldscript)
doesn't handle DWARF2 debug info sections.
Swipe kern.ldscript to compile a mips research kernel that uses recent
tools (binutils 2.17, gcc 4.1.2, gdb 6.6) in a custom but pretty much
basic/default config, and discover that gdb can't find line number
information in the output kernel.
Add these sections to the end of kern.ldscript along with the other
dwarf debug sections:
I expect this is not required with the tools or configs NetBSD is
currently using, or someone would have noticed, but on the other hand,
adding them is harmless and makes the ldscript more future-proof.
I have also found that with binutils 2.17 it doesn't work to set the
kernel base address with -Ttext; if you do that it seems to cheerfully
ignore what your linker script says and put .data in the normal
userspace location. Or something like that; it doesn't work, anyway.
It is not worth changing the kernel build in anticipation of this but
it might be worth sticking a comment in somewhere as a warning.
Main Index |
Thread Index |