This is the mail archive of the
mailing list for the GDB project.
Re: gdb 6.5 does not open linux kernel core file properly
- From: Bernhard Walle <bernhard dot walle at gmx dot de>
- To: gdb at sourceware dot org
- Date: Sun, 3 Jun 2007 18:38:26 +0200
- Subject: Re: gdb 6.5 does not open linux kernel core file properly
- References: <20070501104231.GA5204@in.ibm.com> <email@example.com>
* Bernhard Walle <firstname.lastname@example.org> [2007-06-03 11:27]:
> Vivek Goyal wrote:
> > I am using GNU gdb Red Hat Linux (6.5-5.fc6rh).
> > This problem is not present in gdb 6.4. It works perfectly fine.
> I found out that the error appeared with following change:
> cvs diff -u -D "2006-01-24 22:30:00 -0000" -D "2006-01-24 22:40:00 -0000"
> The problem is svr4_solib_create_inferior_hook() -> svr4_relocate_main_executable().
> If I comment out this function, everything works fine. ;-)
Should the kernel not mark it's ELF type to ET_DYN (but then it's
difficult to distinguish between a relocatable kernel and a
unrelocatable kernel)? Or should we add a .interp section to the
kernel (but I don't think it's a good idea, it would be more a
However, the PC which is used to relocate the binary is completely
wrong because it's in physical virtual space and the start address
is in physical address space. And even if it would be transferred to
physical address space, it would not mark the beginning of the kernel
(entry point), so it's unusable for relocation.