Bob Montgomery wrote:

> On Fri, 2006-12-01 at 08:41 +0800, Zou, Nanhai wrote:
> > Yes, I intent to put duplicate mapping for kernel code and data in 
> > kexec-tools to help both region 5 and region 7 trace on kernel text and 
> > data works.
> >
>
> I see the discussion that Dave mentioned, but it was never really
> spelled out that by providing that extra 40-byte PT_LOAD header so crash
> can obtain the mapping of 0xa000000100000000 to 0x0000000004000000, it
> would also throw in an extra 13918208 bytes of redundant data.  That's a
> lot of overhead to pick up 16 bytes of useful information.
>
> But I'm picking nits, I guess.  It's only an extra 13 Mbytes in a vmcore
> file that might be 1 Gb or larger in size.  Still it seems wasteful.
> Could the two aliased headers point to a single copy of the data? Would
> that violate an elf rule?

It's not "16 bytes of useful information", and it wasn't put there so "crash can
obtain the mapping".  It's primarily a gdb requirement, because gdb only deals
with kernel virtual addresses, so the region 5 segment is required for gdb to
work at all.

The crash utility only deals with physical addresses with respect to the vmcore,
and simply takes advantage of the region 5 PT_LOAD segment to determine the
base physical address where the kernel was loaded.

That being said, if the region 5 and region 7 segments shared a common 
"file_offset"
value in their respective PT_LOAD segments, I would presume that gdb wouldn't
much care...

Dave



_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to