From owner-freebsd-toolchain@FreeBSD.ORG Sun Mar 11 10:04:57 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BA4C106564A; Sun, 11 Mar 2012 10:04:57 +0000 (UTC) (envelope-from draco@marino.st) Received: from shepard.synsport.net (mail.synsport.com [208.69.230.148]) by mx1.freebsd.org (Postfix) with ESMTP id 77A928FC12; Sun, 11 Mar 2012 10:04:57 +0000 (UTC) Received: from [192.168.0.217] (atoulouse-256-1-18-190.w90-38.abo.wanadoo.fr [90.38.101.190]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by shepard.synsport.net (Postfix) with ESMTP id 87C18438EC; Sun, 11 Mar 2012 04:59:02 -0500 (CDT) Message-ID: <4F5C7764.2@marino.st> Date: Sun, 11 Mar 2012 10:59:00 +0100 From: John Marino User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20120129 Thunderbird/10.0 MIME-Version: 1.0 To: Konstantin Belousov References: <4F3C5A3A.6050107@FreeBSD.org> <20120216154730.GL3283@deviant.kiev.zoral.com.ua> In-Reply-To: <20120216154730.GL3283@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Pedro Giffuni , freebsd-toolchain@freebsd.org Subject: DragonFly added DT_GNU_HASH support to rtld X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 10:04:57 -0000 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