git: rtld: Support DT_GNU_HASH (startup performance increase)

John Marino marino at
Sun Mar 11 01:06:19 PST 2012

commit 7629c6317998f850ebca23c296822ba08af09e5b
Author: John Marino <draco at>
Date:   Fri Mar 9 08:40:34 2012 +0100

    rtld: Support DT_GNU_HASH (startup performance increase)
    This is another "First BSD to get" feature that Linux and Solaris
    had years ago.  Essentially DT_GNU_HASH is a GNU extension to the ELF
    format that allows symbol searches much faster than the System V ABI
    standard hash does.  Both versions of our binutils have the capability
    of generating GNU hashes alongside of (or instead of) the SysV hash.
    The benefit comes at the real-time link stage when the rtld is
    searching the libraries for symbols.  For very large programs
    written in languages such as c++ that tend to link in many libraries
    with many symbols, the reduction in start-time can be dramatic.
    According to benchmarks done by binutils team in 2006, more than 90% of
    the symbol queries of OpenOffice Writer are rejected by the Bloom filter
    before the string comparison takes place:

Summary of changes:
 libexec/rtld-elf/i386/reloc.c   |    2 +-
 libexec/rtld-elf/rtld.c         |  347 ++++++++++++++++++++++++++-------------
 libexec/rtld-elf/rtld.h         |   20 ++-
 libexec/rtld-elf/x86_64/reloc.c |    2 +-
 4 files changed, 255 insertions(+), 116 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list