DragonFly BSD
DragonFly users List (threaded) for 2004-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: checkpointing dumps core


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Nov 2004 12:37:59 -0800 (PST)

:On Thu, Nov 18, 2004 at 02:06:08AM -0800, Matthew Dillon wrote:
:>     It is also not writing out a vnode record for the segment because the
:>     RTLD loader had temporarily remapped it read-write, done a bunch of
:>     relocations, and then remapped it read-only again.  This changed
:>     the primary backing object from OBJT_VNODE to OBJT_DEFAULT->OBJT_VNODE,
:>     and the ELF coredump code does not write out vnode records for
:>     vm_map_entry records whos primary backing is not OBJT_VNODE.  
:
:Can you tell me which symbols it tried to relocate? This is a bug we must
:fix.
:
:Joerg
   
    I can't tell.  I very carefully added some write(2, ...)'s to
    rtld-elf's reloc_non_plt and I got this:

00000000  ff ff ff ff 44 b9 05 28  08 00 00 00 ff ff ff ff  |....D..(........|
00000010  4c b9 05 28 08 00 00 00  ff ff ff ff 54 b9 05 28  |L..(........T..(|
00000020  08 00 00 00 ff ff ff ff  58 b9 05 28 08 00 00 00  |........X..(....|
00000030  ff ff ff ff 5c b9 05 28  08 00 00 00 ff ff ff ff  |....\..(........|
00000040  60 b9 05 28 08 00 00 00  ff ff ff ff 64 b9 05 28  |`..(........d..(|
00000050  08 00 00 00 ff ff ff ff  68 b9 05 28 08 00 00 00  |........h..(....|
00000060  ff ff ff ff 6c b9 05 28  08 00 00 00 ff ff ff ff  |....l..(........|
00000070  70 b9 05 28 08 00 00 00  ff ff ff ff 74 b9 05 28  |p..(........t..(|
00000080  08 00 00 00 ff ff ff ff  a8 b9 05 28 08 00 00 00  |...........(....|

    The ffffffff is a marker.  the next field is the relocation target
    address (e.g. 0x2805b944), and the third field is the relocation type,
    which seems to be R_386_RELATIVE.

    It should be possible to use objdump to dump out libc.so and find
    the relocations.

    objdump --dynamic-reloc /usr/lib/libc.so

    I don't know what the output is supposed to look like :-)

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]