lkml.org 
[lkml]   [2003]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH][CFT] kexec (rewrite) for 2.5.52
From
Date
Suparna Bhattacharya <suparna@in.ibm.com> writes:

> On Fri, Jan 03, 2003 at 03:37:06AM -0700, Eric W. Biederman wrote:
> > A dump question. Why doesn't the lkcd stuff use the normal ELF core
> > dump format? allowing ``gdb vmlinux core'' to work?

Digesting.... Of the pieces I have no problem if a valid
ELF core dump is written but gdb does not know what to do with it out
of the box. The piece that disturbed me most is that the file format
seemed to be mutating from release to release.

An ELF core dump consists of:
ELF header
ELF Program header
ELF Note segment
Data Segments...

All of the weird processor specific information can be stored as
various ELF note types.

Compression of pages that are zero can be handled by treating
them as BSS pages and not putting them in the image.

I do admit it would likely take an extra pass to generate the ELF
program header if anything non-trivial like zero removal or
compression was going on. But at the same time that should also
quite dramatically reduce the per page overhead. A pure dump of ram
on x86 should take only 2 or 3 segments.

Using physical addresses is no problem in an ELF core dump. The ELF
program header has both physical and virtual addresses, and you just
fill in the physical addresses.

I keep asking and thinking about ELF images, because they are
simple, clean, extensible, and well documented. With an added bonus
that using the allows a large degree of code reuse with existing
tools.


[snip a good description of the usefulness of the existing core dump format]

> Am cc'ing lkcd-devel on this one - there are experts who can
> add to this or answer this question better than I can.

Thanks,

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.059 / U:4.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site