Hi Konstantin,

It seems that no BSD supported DT_GNU_HASH despite this option being available on the base binutils (FreeBSD's 2.17.50 binutils supports it). This gnu extension is a big performance improvement over the specified SysV hash.

The guy porting libreoffice to pkgsrc was finding -Wl,--hash-style=gnu to be the default build for that package. Indeed, using the standard hash results in very long startup times for something like Writer (> 8 seconds launched from a SSD)

The result is that we brought in DT_GNU_HASH support to our real-time linker this weekend. We're still waiting to see how that improves libreoffice startup times.

full commit:
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7629c6317998f850ebca23c296822ba08af09e5b


Modification to base compiler so all system libs and binaries can take advantage of it:
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4687ecd9561d76f3d02ccb4f7adeecd5e3afdd8f


For a while, binaries with dynamic symbol tables will have both types of hashes embedded. At some point in the future, we may switch over to only generating the GNU hash. This will break forward compatibility, but that happens rather frequently for other reasons anyway.

I was a bit surprised FreeBSD didn't already have this functionality given the performance benefits, so hopefully these DragonFly commits will be interesting for you.

Regards,
John
_______________________________________________
freebsd-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"

Reply via email to