From owner-freebsd-toolchain@FreeBSD.ORG Sun Apr 29 18:22:49 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 B13AA106564A; Sun, 29 Apr 2012 18:22:49 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3B6258FC12; Sun, 29 Apr 2012 18:22:49 +0000 (UTC) Received: by qcsg15 with SMTP id g15so1368242qcs.13 for ; Sun, 29 Apr 2012 11:22:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=pQBDijj5AbtUUhsu7Ls02Y1k7uabeT0pM1h997xUJRE=; b=ih2LKu3MhUDYh1ODdVcSSdUAQQO4RTNBducUzepeC/F5dW0bGRACFq1X9kroxMBBG0 5nv9ZtGPIGTxd8BW+Ii8NV9BLjC3lN0KqX7mNk7k4EWT67TZGX6H4XyDOKFNz8WzH5zT rzs2tQwhcp5XEn0Av/jmWR5qxco37WYfVtxdfA/dkBfb436HE1w6XW865nEoL4UuqPcy jlJyj0t6/XxHQDI/G/qe9qe0r0ObN7GybQjt8/4wMU30mC0Pr2n78TbOZoRSV7sgNSCo PXculjHeCWYMbh8BIcZcYZ+x45zr/GFuj76f6QD+Wz6Zdp94UROeY940mslA6CJK9pZt H4aQ== Received: by 10.229.135.202 with SMTP id o10mr4772635qct.84.1335723768502; Sun, 29 Apr 2012 11:22:48 -0700 (PDT) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPS id gw8sm21100057qab.7.2012.04.29.11.22.47 (version=SSLv3 cipher=OTHER); Sun, 29 Apr 2012 11:22:47 -0700 (PDT) Date: Sun, 29 Apr 2012 14:22:41 -0400 From: Alexander Kabaev To: Konstantin Belousov Message-ID: <20120429142241.646db441@kan.dyndns.org> In-Reply-To: <20120415144322.GU2358@deviant.kiev.zoral.com.ua> References: <4F3C5A3A.6050107@FreeBSD.org> <20120216154730.GL3283@deviant.kiev.zoral.com.ua> <4F5C7764.2@marino.st> <20120415144322.GU2358@deviant.kiev.zoral.com.ua> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/g5OYvipX5G=6G26.XpE_.pV"; protocol="application/pgp-signature" Cc: kan@freebsd.org, John Marino , Pedro Giffuni , freebsd-toolchain@freebsd.org Subject: Re: 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, 29 Apr 2012 18:22:49 -0000 --Sig_/g5OYvipX5G=6G26.XpE_.pV Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 15 Apr 2012 17:43:22 +0300 Konstantin Belousov wrote: > On Sun, Mar 11, 2012 at 10:59:00AM +0100, John Marino wrote: > > Hi Konstantin, > >=20 > > 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. > >=20 > > The guy porting libreoffice to pkgsrc was finding > > -Wl,--hash-style=3Dgnu 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) > >=20 > > 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. > >=20 > > full commit: > > >http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7629c6317998f8= 50ebca23c296822ba08af09e5b > >=20 > >=20 > > Modification to base compiler so all system libs and binaries can > > take advantage of it: > > >http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4687ecd9561d76= f3d02ccb4f7adeecd5e3afdd8f > >=20 > >=20 > > 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. > >=20 > > 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. > >=20 >=20 > I finally ported the Dragonfly commit to FreeBSD. There were several > changes reverted in dragonfly version of the extracted > matched_symbol() function which were restored. I also blindly > converted all non-x86 arches. >=20 > The matched_symbol() extraction is the good opportunity to apply the > style(9) formatting to the large chunk of rtld code. >=20 > Any testers, esp. on non-x86 architectures, are welcome. You would > need to modify gcc spec file for you architecture, see corresponding > x86 changes in contrib/gcc/config/i386. >=20 > For me, patch successfully worked on the machine were I disabled sysv > hashes at all. >=20 > http://people.freebsd.org/~kib/misc/rtld-gnu_hash.1.patch Nothing jumps out, looks good. I am not a fan of mixing and matching different styles within the same file though.=20 --=20 Alexander Kabaev --Sig_/g5OYvipX5G=6G26.XpE_.pV Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iD8DBQFPnYb2Q6z1jMm+XZYRAvzaAJ9wPWBG7egHmFqwDyLwFH125zri1QCeM0es E3xRgyGgvWiCc1hTgo4MW7w= =PU+1 -----END PGP SIGNATURE----- --Sig_/g5OYvipX5G=6G26.XpE_.pV--