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?  

Bob M.
> > 
> > Bob Montgomery wrote:
> > 
> > > Has this been discussed and I missed it?
> > >
> > > I'm seeing a duplicate LOAD section from /proc/vmcore as shown in this
> > > excerpt from readelf -l vmcore:
> > >
> > > Program Headers:
> > >   Type           Offset             VirtAddr           PhysAddr
> > >                  FileSiz            MemSiz              Flags  Align
> > >  ...
> > >
> > > >>  LOAD         0x0000000004000f08 0xa000000100000000 0x0000000004000000
> > >                  0x0000000000d46000 0x0000000000d46000  RWE    0
> > >
> > > >>  LOAD         0x0000000004d46f08 0xe000000004000000 0x0000000004000000
> > >                  0x0000000000d46000 0x0000000000d46000  RWE    0
> > > ...
> > >
> > > Note the two sections with PhysAddr x0000000004000000,
> > > one at VirtAddr=0xa000000100000000, and the other at
> > > VirtAddr=0xe000000004000000.  They are at different offsets
> > > in the file, and using objdump -s --section=loadN, I believe
> > > they contain identical data.  It's a lot of redundant data
> > > in the dump file.  I assume the problem is in the purgatory
> > > code that sets up the elf map?  Is it necessary to include
> > > this section with both of its virtual aliases for some reason?
> > >
> > > Bob Montgomery
> > 
> > It's necessary for both the crash utility and gdb to work.  The ia64
> > region 5 descriptor contains the physical base address where the
> > relocatable kernel was loaded, needed by the crash utility.  And
> > it's needed for gdb because it deals with virtual addresses in
> > that region for kernel text and static data.
> > 
> > And yes, it has been discussed on the fastboot list, starting here:
> > 
> >   http://lists.osdl.org/pipermail/fastboot/2006-November/004948.html
> > 
> > Dave

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

Reply via email to