Date: Sat, 18 Feb 2012 23:38:32 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: John Marino <draco@marino.st> Cc: kan@freebsd.org, Pedro Giffuni <pfg@freebsd.org>, freebsd-toolchain@freebsd.org Subject: Re: DragonFly added support for ELF preinit, init, and fini arrays Message-ID: <20120218213832.GL3283@deviant.kiev.zoral.com.ua> In-Reply-To: <4F3F4AE2.30203@marino.st> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--/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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120218213832.GL3283>