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:
http://sources.redhat.com/ml/libc-alpha/2006-07/msg00034.html