Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jul 2009 19:32:04 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/libexec/rtld-elf map_object.c
Message-ID:  <200907171932.n6HJWQQQ014408@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
kib         2009-07-17 19:32:04 UTC

  FreeBSD src repository

  Modified files:
    libexec/rtld-elf     map_object.c 
  Log:
  SVN rev 195743 on 2009-07-17 19:32:04Z by kib
  
  Only perform .bss mapping and cleaning operations when segment file size
  is not equal to its memory size.
  
  This eliminates unneeded clearing of the text segment that often
  happens due to text end not being page-aligned.
  
  For instance,
  $ readelf -l /lib/libedit.so.6
  Program Headers:
    Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
    LOAD           0x000000 0x00000000 0x00000000 0x139e1 0x139e1 R E 0x1000
    LOAD           0x014000 0x00014000 0x00014000 0x00f04 0x00f14 RW  0x1000
    DYNAMIC        0x014cc4 0x00014cc4 0x00014cc4 0x000d0 0x000d0 RW  0x4
  $ procstat -v $$ (for /bin/sh)
  68585 0x28097000 0x280aa000 r-x    6    0  21  14 CN vn /lib/libedit.so.6
  68585 0x280aa000 0x280ab000 r-x    1    0   1   0 CN vn /lib/libedit.so.6 <==
  68585 0x280ab000 0x280ac000 rwx    1    0   1   0 CN vn /lib/libedit.so.6
  Note the splitted map entry marked by '<=='.
  
  Reviewed by:    kan
  Approved by:    re (kensmith)
  MFC after:      1 month
  
  Revision  Changes    Path
  1.22      +27 -21    src/libexec/rtld-elf/map_object.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907171932.n6HJWQQQ014408>