git: rtld: Shrink by eliminating stdio

John Marino marino at crater.dragonflybsd.org
Fri Mar 16 14:34:40 PDT 2012


commit b2cf26499615896e389f50012c0bf803e99bc7f3
Author: John Marino <draco at marino.st>
Date:   Fri Mar 16 20:46:52 2012 +0100

    rtld: Shrink by eliminating stdio
    
    Eliminate stdio for parsing libmap.conf, and instead parse it from direct
    mapping.  Also stop using strerror(3) in rtld which sucks in msgcat and
    stdio.  Instead directly access sys_errlist array of error messages with
    private rtld_strerror() function.
    
    Results on x86_64 (includes debug symbols):
    
    > size /usr/libexec/ld-elf.so.2*
       text	   data	    bss	    dec	    hex	filename
      95294    1560    7680  104534   19856 /usr/libexec/ld-elf.so.2
     108830    3128   18216  130174   1fc7e /usr/libexec/ld-elf.so.2.old
    
    > ls -al /usr/libexec/ld-elf.so.2*
    -r-xr-xr-x  1 root  wheel  305763 Mar 16 20:33 /usr/libexec/ld-elf.so.2
    -r-xr-xr-x  1 root  wheel  370392 Mar 14 00:02 /usr/libexec/ld-elf.so.2.old
    
    Taken from:
    FreeBSD SVN 232862 (2012-03-12)
    FreeBSD SVN 232974 (2012-03-14)

Summary of changes:
 libexec/rtld-elf/libmap.c     |  173 +++++++++++++++++++++-------------------
 libexec/rtld-elf/map_object.c |   11 ++-
 libexec/rtld-elf/rtld.c       |   15 +++-
 libexec/rtld-elf/rtld.h       |    1 +
 4 files changed, 110 insertions(+), 90 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b2cf26499615896e389f50012c0bf803e99bc7f3


-- 
DragonFly BSD source repository





More information about the Commits mailing list