cvs commit: src/libexec/rtld-elf

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Nov 18 02:02:38 PST 2004


dillon      2004/11/18 02:01:47 PST

DragonFly src repository

  Modified files:
    libexec/rtld-elf     map_object.c rtld.c 
  Log:
  Clear the NOCORE flag on any text mappings that the RTLD modifies due to
  text relocations or compacted BSS areas.  Otherwise the checkpt code will
  not write out the modified areas.
  
  Also note that if you mmap() a file MAP_PRIVATE, then modify portions of it
  so the mapping is changed from OBJT_VNODE to OBJT_DEFAULT->OBJT_VNODE,
  the current ELF coredump code will *NOT* write out a file handle record for
  the backing vnode.  This means that the entire vm_map_entry containing
  the modified portions must be marked as COREable if it was previously mapped
  NOCORE.
  
  In the case of the RTLD code the text area is mapped read-only.  The text
  area is temporarily remapped read-write for the relocation pass and so
  the whole area is still represented by a single vm_map_entry and thus the
  whole area must be marked COREable.  For the BSS fixup only the last page
  is remapped read-write and so it gets its own private vm_map_entry and
  thus only the last page must be marked COREable.
  
  The DEFAULT->VNODE backing issue is actually a bug in the elf coredump code,
  but even if it were fixed core dump sizes would not get much smaller because
  relocations tend to be all over the map.
  
  Checkpt-Nonworking-Bug-Reported-by: Michael Neumann <mneumann at xxxxxxxx>
  
  Revision  Changes    Path
  1.4       +11 -5     src/libexec/rtld-elf/map_object.c
  1.8       +15 -1     src/libexec/rtld-elf/rtld.c


http://www.dragonflybsd.org/cvsweb/src/libexec/rtld-elf/map_object.c.diff?r1=1.3&r2=1.4&f=u
http://www.dragonflybsd.org/cvsweb/src/libexec/rtld-elf/rtld.c.diff?r1=1.7&r2=1.8&f=u





More information about the Commits mailing list