From owner-freebsd-toolchain@FreeBSD.ORG Thu Feb 16 01:34:51 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 F3E6A106566B for ; Thu, 16 Feb 2012 01:34:50 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm13.bullet.mail.ne1.yahoo.com (nm13.bullet.mail.ne1.yahoo.com [98.138.90.76]) by mx1.freebsd.org (Postfix) with SMTP id A6CF38FC08 for ; Thu, 16 Feb 2012 01:34:50 +0000 (UTC) Received: from [98.138.90.50] by nm13.bullet.mail.ne1.yahoo.com with NNFMP; 16 Feb 2012 01:22:04 -0000 Received: from [98.138.226.57] by tm3.bullet.mail.ne1.yahoo.com with NNFMP; 16 Feb 2012 01:22:04 -0000 Received: from [127.0.0.1] by smtp208.mail.ne1.yahoo.com with NNFMP; 16 Feb 2012 01:22:04 -0000 X-Yahoo-Newman-Id: 769126.7353.bm@smtp208.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: es_.R8UVM1lyVQ.V_toEZ0rRylP531Xf4S.oPQmldFAgvXP HrBQWfuvMWTOxFvO.1ALkBjVnnkjqS9YzdLBRlZazEjvRaDgJqzPro7eED6f v86VBdv9zD41Lb2XnAfFhibuQg4HY__6F3SRyVEbj1wr0zeMXyzb2.vDp_W9 a2RtRraleQYQdTvgtZ4.RueUrfzJGK3YGAzToTfAsJjrS7EodGHgfJbnJ6.I 9ls4_2V9THsq29bDx1twgzxtcstsV0zespt2mr30qCEiba3NSJoLHPE_RwZ3 LnvClFPN.2nOkVD49R_i0F5Q9YAP4eWlC.tSXuG6H34pnO_FlZVaSNg36yft 1C3qDp2zgHkLjil9vE11j1OQ5oFE4CWDeq0j5WAomyfYcd5MipIL8XSwKZHN vVPJdNHyF7m.8jhRrscbjyRh6jPoOAn10uk_EpvQezStY3BW5jfFIW0FUNYN xFUAadkNfBAqBrAVWhf0NQd8Zlcv5RNk3GUGz9HECXi94ew5oDOHY2LAdyEC 5bUdm_xhVMlne0XxOXi2n1iv4WpnbS_2tQrokA9l0FG1EC9P0MEARo0ZLiSV F4eOsRMGUIdeEvR3.00b174yhLRW.noWYnhjWOqHyvmiPk9uNWRs48yJGJ3z qR66q7RFslg-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Received: from [192.168.10.101] (pfg@200.118.157.7 with plain) by smtp208.mail.ne1.yahoo.com with SMTP; 15 Feb 2012 17:22:04 -0800 PST Message-ID: <4F3C5A3A.6050107@FreeBSD.org> Date: Wed, 15 Feb 2012 20:22:02 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111227 Thunderbird/9.0 MIME-Version: 1.0 To: freebsd-toolchain@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 16 Feb 2012 03:42:56 +0000 Cc: Subject: 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: Thu, 16 Feb 2012 01:34:51 -0000 Hello; FYI, this commit in DragonFly seems interesting: http://leaf.dragonflybsd.org/mailarchive/commits/2012-02/msg00146.html It appears like linux had them from a while and some years ago they started using them for C++ in gcc: http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01872.html cheers, Pedro. From owner-freebsd-toolchain@FreeBSD.ORG Thu Feb 16 16:16:59 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 780D8106564A; Thu, 16 Feb 2012 16:16:59 +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 BDE688FC18; Thu, 16 Feb 2012 16:16:58 +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 q1GFlVAu095080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 16 Feb 2012 17:47:31 +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 q1GFlV9s014076; Thu, 16 Feb 2012 17:47:31 +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 q1GFlU7B014075; Thu, 16 Feb 2012 17:47:30 +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: Thu, 16 Feb 2012 17:47:30 +0200 From: Konstantin Belousov To: Pedro Giffuni Message-ID: <20120216154730.GL3283@deviant.kiev.zoral.com.ua> References: <4F3C5A3A.6050107@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ocX8nJS1hl+tlwGc" Content-Disposition: inline In-Reply-To: <4F3C5A3A.6050107@FreeBSD.org> 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: John Marino , 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: Thu, 16 Feb 2012 16:16:59 -0000 --ocX8nJS1hl+tlwGc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 15, 2012 at 08:22:02PM -0500, Pedro Giffuni wrote: > Hello; >=20 > FYI, this commit in DragonFly seems interesting: >=20 > http://leaf.dragonflybsd.org/mailarchive/commits/2012-02/msg00146.html >=20 > It appears like linux had them from a while and some years ago they start= ed > using them for C++ in gcc: >=20 > http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01872.html >=20 > cheers, If you read the commit message, you will notice something at the end. I have WIP patches to add support for the init arrays to our rtld. It is not tested yet, and I want to ponder more about the ABI changes in csu that I introduce. In fact, I am more interested in having answer to the question, what immediate and long-term use do we have for the feature. Also, I want non-artificial test cases for DT_INIT_ARRAY and DT_FINI_ARRAY. http://people.freebsd.org/~kib/misc/init_array.1.patch --ocX8nJS1hl+tlwGc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk89JRIACgkQC3+MBN1Mb4jwbgCdEjrMOSnFnkNWvIH8+Gb4WnIk yWsAn1L8bWpl/TJ+gaDoIw5nZ9uj/tmS =qhbl -----END PGP SIGNATURE----- --ocX8nJS1hl+tlwGc-- From owner-freebsd-toolchain@FreeBSD.ORG Thu Feb 16 17:08:54 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 17DE7106566B; Thu, 16 Feb 2012 17:08:54 +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 E24128FC17; Thu, 16 Feb 2012 17:08:53 +0000 (UTC) Received: from [10.31.9.93] (unknown [213.225.137.129]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by shepard.synsport.net (Postfix) with ESMTP id 094D343B4E; Thu, 16 Feb 2012 10:51:25 -0600 (CST) Message-ID: <4F3D3409.3040006@marino.st> Date: Thu, 16 Feb 2012 17:51:21 +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: 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: Thu, 16 Feb 2012 17:08:54 -0000 On 2/16/2012 16:47, Konstantin Belousov wrote: > On Wed, Feb 15, 2012 at 08:22:02PM -0500, Pedro Giffuni wrote: >> Hello; >> >> FYI, this commit in DragonFly seems interesting: >> >> http://leaf.dragonflybsd.org/mailarchive/commits/2012-02/msg00146.html >> >> It appears like linux had them from a while and some years ago they started >> using them for C++ in gcc: >> >> http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01872.html >> >> cheers, > If you read the commit message, you will notice something at the end. > > I have WIP patches to add support for the init arrays to our rtld. > It is not tested yet, and I want to ponder more about the ABI changes > in csu that I introduce. > > In fact, I am more interested in having answer to the question, what > immediate and long-term use do we have for the feature. Also, I want > non-artificial test cases for DT_INIT_ARRAY and DT_FINI_ARRAY. > > http://people.freebsd.org/~kib/misc/init_array.1.patch Hi Konstantin, 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). Also, GCC now supports generation of .init_array and .fini_array directly rather than using .ctor and .dtor sections. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770 I can't say how much current software depends on the functionality working though. Mostly this would be transparently handled by gcc and the linker. The main benefit from what I can tell is that .init_array is more efficient at startup because the array is executed in order while .ctors is executed in reverse. .ctors is also considered legacy and supporting it is "backwards compatible". Apparently ARM eabi only uses .init_array and not .ctors. There seems to be a slow movement to eliminate .ctors on the linux side with rationale that .init_array support has been available 11 years and the gcc patch is an indication of that attitude. John From owner-freebsd-toolchain@FreeBSD.ORG Thu Feb 16 20:27:15 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 F3F3C1065670; Thu, 16 Feb 2012 20:27:14 +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 65A648FC1A; Thu, 16 Feb 2012 20:27:13 +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 q1GKRAW1015673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 16 Feb 2012 22:27:10 +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 q1GKRATO015501; Thu, 16 Feb 2012 22:27:10 +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 q1GKR9be015500; Thu, 16 Feb 2012 22:27:09 +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: Thu, 16 Feb 2012 22:27:09 +0200 From: Konstantin Belousov To: John Marino Message-ID: <20120216202709.GQ3283@deviant.kiev.zoral.com.ua> References: <4F3C5A3A.6050107@FreeBSD.org> <20120216154730.GL3283@deviant.kiev.zoral.com.ua> <4F3D3409.3040006@marino.st> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eZdNmHDYna/PvIuD" Content-Disposition: inline In-Reply-To: <4F3D3409.3040006@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: 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: Thu, 16 Feb 2012 20:27:15 -0000 --eZdNmHDYna/PvIuD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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= =20 > binutils 2.22. By default, it moves constructors into the init array,=20 > so gold will segfault if it was linked with itself. (The workaround is= =20 > to patch option.h file to change the ctors-in-init-array to false before= =20 > 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 ? --eZdNmHDYna/PvIuD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk89Zp0ACgkQC3+MBN1Mb4i3VwCbBC7Q7Fsl/LstQV8Z/td0Zhel y7MAn3DoiOFk8yld99DalhuR/sM9NFsH =GAvO -----END PGP SIGNATURE----- --eZdNmHDYna/PvIuD-- From owner-freebsd-toolchain@FreeBSD.ORG Thu Feb 16 21:28:04 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 5FD25106564A; Thu, 16 Feb 2012 21:28:04 +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 3AC148FC13; Thu, 16 Feb 2012 21:28:03 +0000 (UTC) Received: from [10.31.9.93] (unknown [213.225.137.129]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by shepard.synsport.net (Postfix) with ESMTP id EC24A43B4E; Thu, 16 Feb 2012 15:28:02 -0600 (CST) Message-ID: <4F3D74E0.4030408@marino.st> Date: Thu, 16 Feb 2012 22:28: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> <4F3D3409.3040006@marino.st> <20120216202709.GQ3283@deviant.kiev.zoral.com.ua> In-Reply-To: <20120216202709.GQ3283@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: 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: Thu, 16 Feb 2012 21:28:04 -0000 On 2/16/2012 21:27, 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 ? Yes, I have several isolated tests that I pulled out of the glibc test framework. I can also pull small tests out of the ld testsuite as well as the gold testsuite. I'm on a business trip at the moment with a big deliverable tomorrow, so I wouldn't be able to really get to it until Saturday at the earliest. Regards, John From owner-freebsd-toolchain@FreeBSD.ORG Sat Feb 18 06:53:31 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 884CC1065687; Sat, 18 Feb 2012 06:53:31 +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 468E28FC1A; Sat, 18 Feb 2012 06:53:31 +0000 (UTC) Received: from [192.168.0.11] (atoulouse-256-1-26-95.w90-38.abo.wanadoo.fr [90.38.109.95]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by shepard.synsport.net (Postfix) with ESMTP id 87FEA43B4A; Sat, 18 Feb 2012 00:53:29 -0600 (CST) Message-ID: <4F3F4AE2.30203@marino.st> Date: Sat, 18 Feb 2012 07:53:22 +0100 From: John Marino User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Konstantin Belousov References: <4F3C5A3A.6050107@FreeBSD.org> <20120216154730.GL3283@deviant.kiev.zoral.com.ua> <4F3D3409.3040006@marino.st> <20120216202709.GQ3283@deviant.kiev.zoral.com.ua> In-Reply-To: <20120216202709.GQ3283@deviant.kiev.zoral.com.ua> Content-Type: multipart/mixed; boundary="------------040509020809040403020201" Cc: 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 06:53:31 -0000 This is a multi-part message in MIME format. --------------040509020809040403020201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 should be sufficient by themselves to check your patch. However, if you feel you need more then I could extract a few tests from the gnu ld testsuite. John --------------040509020809040403020201 Content-Type: application/octet-stream; name="init_array_tests.tar.bz2" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="init_array_tests.tar.bz2" QlpoOTFBWSZTWWi0WEAAElD/8/6wIcB9//+/L6XePv/n3/qQABAAFAABAAICAAhgCX74Osay aDMzWGkySpSg2aUpQcyaaGQAMRkGQA0wQMQDRpoAMgaABJJkECiNqA02oaDQAAABkAAAANHq HMmmhkADEZBkANM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ckMSMcBgEYAusTsMSzEALMUYIjgNII0INCO4qXEbu6IJrVLg7gjkImrKQjGcLVBJJIyFVUki yMYyFVTIa9km2I7iGgDAXAO57GceJ9JDefQI6gc47Yjwg7B3lU0K5FaQgoHKqUIO+gZxUHQI YgIG+oP/i7kinChINFosIAA= --------------040509020809040403020201-- 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--