From owner-freebsd-toolchain@FreeBSD.ORG Sat Feb 18 21:38:38 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 D2AD21065692; Sat, 18 Feb 2012 21:38:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 39BB28FC23; Sat, 18 Feb 2012 21:38:37 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q1ILcXn3040333 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 18 Feb 2012 23:38:33 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q1ILcX7h044066; Sat, 18 Feb 2012 23:38:33 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q1ILcWdL044065; Sat, 18 Feb 2012 23:38:32 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 18 Feb 2012 23:38:32 +0200 From: Konstantin Belousov To: John Marino Message-ID: <20120218213832.GL3283@deviant.kiev.zoral.com.ua> References: <4F3C5A3A.6050107@FreeBSD.org> <20120216154730.GL3283@deviant.kiev.zoral.com.ua> <4F3D3409.3040006@marino.st> <20120216202709.GQ3283@deviant.kiev.zoral.com.ua> <4F3F4AE2.30203@marino.st> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/esV2TVMZzkOBRzt" Content-Disposition: inline In-Reply-To: <4F3F4AE2.30203@marino.st> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: kan@freebsd.org, Pedro Giffuni , freebsd-toolchain@freebsd.org Subject: Re: DragonFly added support for ELF preinit, init, and fini arrays 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: Sat, 18 Feb 2012 21:38:39 -0000 --/esV2TVMZzkOBRzt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 18, 2012 at 07:53:22AM +0100, John Marino wrote: > On 2/16/2012 9:27 PM, Konstantin Belousov wrote: > >On Thu, Feb 16, 2012 at 05:51:21PM +0100, John Marino wrote: > >>One obvious case for the immediate use is the building of gold linker in > >>binutils 2.22. By default, it moves constructors into the init array, > >>so gold will segfault if it was linked with itself. (The workaround is > >>to patch option.h file to change the ctors-in-init-array to false before > >>building gold so it has the same behavior as gnu ld). > >Linking gold with gold is quite a work to setup a test case. > >Could you provide me with isolated test cases like you did for the > >exception handling ? > Hi Konstantin, > I have attached 5 small tests, where 4 of them are from glibc. They=20 > should be sufficient by themselves to check your patch. However, if you= =20 > feel you need more then I could extract a few tests from the gnu ld=20 > testsuite. Thank you, it was very useful. It seems that test4 needed some adjustments to actually provide the required dso for tests. Now, the patch at http://people.freebsd.org/~kib/misc/init_array.2.patch passes your tests and allows to boot world built with pre-patched csu into multiuser mode. I decided to move the calls to initializers for main binary into rtld, and used the brand note to distinguish old and new csu. ATM patch is only for i386 and amd64, I will port to other architectures after some feedback. --/esV2TVMZzkOBRzt Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9AGlgACgkQC3+MBN1Mb4j67ACgk9In3187yUgAlh70zJ2q1Zv6 MTYAn2Z4DntnRakSlBveczSPg54f39Zw =27is -----END PGP SIGNATURE----- --/esV2TVMZzkOBRzt--