From owner-freebsd-toolchain@FreeBSD.ORG Mon Dec 12 11:19:05 2011 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C4B61065673 for ; Mon, 12 Dec 2011 11:19:05 +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 1936E8FC13 for ; Mon, 12 Dec 2011 11:19:04 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pBCB8QcG000229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Dec 2011 13:08:26 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pBCB8QCn034495; Mon, 12 Dec 2011 13:08:26 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pBCB8Qd3034494; Mon, 12 Dec 2011 13:08:26 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 12 Dec 2011 13:08:26 +0200 From: Kostik Belousov To: toolchain@freebsd.org Message-ID: <20111212110826.GM50300@deviant.kiev.zoral.com.ua> References: <201112121103.pBCB3FuT097580@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FYQbxHc1c8B/Anrp" Content-Disposition: inline In-Reply-To: <201112121103.pBCB3FuT097580@svn.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: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228435 - in head/libexec/rtld-elf: . amd64 arm i386 ia64 mips powerpc powerpc64 sparc64 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: Mon, 12 Dec 2011 11:19:05 -0000 --FYQbxHc1c8B/Anrp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 12, 2011 at 11:03:15AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Mon Dec 12 11:03:14 2011 > New Revision: 228435 > URL: http://svn.freebsd.org/changeset/base/228435 >=20 > Log: > Add support for STT_GNU_IFUNC and R_MACHINE_IRELATIVE GNU extensions to > rtld on 386 and amd64. This adds runtime bits neccessary for the use > of the dispatch functions from the dynamically-linked executables and > shared libraries. > =20 > To allow use of external references from the dispatch function, resolut= ion > of the R_MACHINE_IRESOLVE relocations in PLT is postponed until GOT ent= ries > for PLT are prepared, and normal resolution of the GOT entries is finis= hed. > Similar to how it is done by GNU, IRELATIVE relocations are resolved in > advance, instead of normal lazy handling for PLT. > =20 > Move the init_pltgot() call before the relocations for the object are > processed. > =20 > MFC after: 3 weeks An example use of the facilities is provided at http://vger.kernel.org/~davem/cgi-bin/blog.cgi/2010/02/07 Inner working is described by http://www.airs.com/blog/archives/403 To use this feature on FreeBSD, you need patched gas from recent binutils. Patch is available at http://people.freebsd.org/~kib/misc/gas_ifunc_freebsd.1.patch. The 4.6 gcc should be configured with --enable-gnu-indirect-function option to turn on the 'ifunc' function attributes, no patch for compiler is required. Only dynamically linked executables and shared objects are supported, support for static binaries requires changes for csu. Since in-tree toolchain cannot handle dispatch, and I am only interested in the dynamic linking case, I did not modified csu. If we ever need dispatch for system libraries (cases like CPU-optimized string functions, or math) and have a capable toolchain, I promise to add support for static binaries. I handled just x86oids. If maintainer of missed architecture wants to implement dispatch, I am willing to help (as usual). Does anybody on toolchain@ know how to submit the gas change to maintainers for inclusion into mainline, or better, can submit it himself ? I assume that no copyright assignment is required for this trivial flip of settings. --FYQbxHc1c8B/Anrp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7l4KkACgkQC3+MBN1Mb4guPACgw8rUbLaX0VIlDbgKQcrP97Hw sZUAoOckniL1/o/Q7XMsuI3hs5Vbqqcv =eV03 -----END PGP SIGNATURE----- --FYQbxHc1c8B/Anrp-- From owner-freebsd-toolchain@FreeBSD.ORG Wed Dec 14 12:42:40 2011 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29D2F1065670; Wed, 14 Dec 2011 12:42:40 +0000 (UTC) (envelope-from gerald@pfeifer.com) Received: from ainaz.pair.com (ainaz.pair.com [209.68.2.66]) by mx1.freebsd.org (Postfix) with ESMTP id 04FD98FC12; Wed, 14 Dec 2011 12:42:39 +0000 (UTC) Received: from 123.0.128.10.in-addr.arpa.noptr.antlabs.com (unknown [118.97.46.125]) by ainaz.pair.com (Postfix) with ESMTPSA id 7970F3F417; Wed, 14 Dec 2011 07:24:19 -0500 (EST) Date: Wed, 14 Dec 2011 20:24:22 +0800 (CIT) From: Gerald Pfeifer To: Kostik Belousov In-Reply-To: <20111212110826.GM50300@deviant.kiev.zoral.com.ua> Message-ID: References: <201112121103.pBCB3FuT097580@svn.freebsd.org> <20111212110826.GM50300@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: svn-src-head@freebsd.org, toolchain@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228435 - in head/libexec/rtld-elf: . amd64 arm i386 ia64 mips powerpc powerpc64 sparc64 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: Wed, 14 Dec 2011 12:42:40 -0000 On Mon, 12 Dec 2011, Kostik Belousov wrote: > Does anybody on toolchain@ know how to submit the gas change to > maintainers for inclusion into mainline, or better, can submit it > himself ? I assume that no copyright assignment is required for this > trivial flip of settings. I would just send to binutils@sourceware.org. And indeed, the patch is sufficiently small not to require copyright assignment or disclaimer or the like from what I can tell. Gerald From owner-freebsd-toolchain@FreeBSD.ORG Wed Dec 14 13:54:20 2011 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E60F6106564A; Wed, 14 Dec 2011 13:54:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id A38658FC18; Wed, 14 Dec 2011 13:54:20 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:3cf8:b464:1fa8:24c] (unknown [IPv6:2001:7b8:3a7:0:3cf8:b464:1fa8:24c]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id BAB355C37; Wed, 14 Dec 2011 14:54:19 +0100 (CET) Message-ID: <4EE8AA8E.40004@FreeBSD.org> Date: Wed, 14 Dec 2011 14:54:22 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111130 Thunderbird/9.0 MIME-Version: 1.0 To: Gerald Pfeifer References: <201112121103.pBCB3FuT097580@svn.freebsd.org> <20111212110826.GM50300@deviant.kiev.zoral.com.ua> In-Reply-To: X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, toolchain@freebsd.org Subject: Re: svn commit: r228435 - in head/libexec/rtld-elf: . amd64 arm i386 ia64 mips powerpc powerpc64 sparc64 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: Wed, 14 Dec 2011 13:54:21 -0000 On 2011-12-14 13:24, Gerald Pfeifer wrote: > On Mon, 12 Dec 2011, Kostik Belousov wrote: >> Does anybody on toolchain@ know how to submit the gas change to >> maintainers for inclusion into mainline, or better, can submit it >> himself ? I assume that no copyright assignment is required for this >> trivial flip of settings. > > I would just send to binutils@sourceware.org. And indeed, the > patch is sufficiently small not to require copyright assignment > or disclaimer or the like from what I can tell. See the thread starting here: http://cygwin.com/ml/binutils/2011-12/msg00144.html