From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 11 20:14:55 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4CE41065673 for ; Fri, 11 Jul 2008 20:14:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 329028FC14 for ; Fri, 11 Jul 2008 20:14:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m6BKEo2u015576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Jul 2008 23:14:50 +0300 (EEST) (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.2/8.14.2) with ESMTP id m6BKEomG063883; Fri, 11 Jul 2008 23:14:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m6BKEo7x063882; Fri, 11 Jul 2008 23:14:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 11 Jul 2008 23:14:50 +0300 From: Kostik Belousov To: Marcin Cieslak Message-ID: <20080711201450.GB17123@deviant.kiev.zoral.com.ua> References: <20080711115436.GZ17123@deviant.kiev.zoral.com.ua> <4877BAB8.1030804@system.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6xO04bqTG+NC5D6o" Content-Disposition: inline In-Reply-To: <4877BAB8.1030804@system.pl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua Cc: freebsd-emulation@freebsd.org Subject: Re: linux emulation: Preliminary support for more auxvec's [patch] X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2008 20:14:55 -0000 --6xO04bqTG+NC5D6o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 11, 2008 at 09:55:36PM +0200, Marcin Cieslak wrote: > Kostik Belousov wrote: > >On Fri, Jul 11, 2008 at 01:43:55PM +0200, Marcin Cieslak wrote: > >>Hello, > >> > >>Attached please find a simple diff to implement additional loader=20 > >>information (for background please see:=20 > >>http://lists.freebsd.org/pipermail/freebsd-emulation/2006-September/002= 591.html) > >Namely, AT_EXECPATH (somewhat similar to the Solaris auxvec of the same > >name) provides (might be relative) path for the binary being executed. >=20 > Thank you very much. >=20 > I have implemented the AT_PLATFORM, therefore all 2.6.16 (and later)=20 > i386/amd64 auxvecs are implemented, except for AT_SYSINFO and=20 > AT_SYSINFO_EHDR that are i386-specific and provide optional way of=20 > invoking linux syscalls (using so-called virtual dynamic shared object). >=20 > I think we don't need those. Do you know of any situation where we _must_ have those new auxvec you implemented ? >=20 > The code is completely untested on i386. My first attempts show that=20 > skype and acroread8 launch faster (probably due to the "hz" effect). >=20 > The patch is here: >=20 > http://akson.sgh.waw.pl/~saper/FreeBSD/linux/auxvec.diff I only briefly looked over it. I suggest that the new AT_COUNT requires more thinking. Look at the src/libexec/rtld-elf/rtld.c, _rtld(), at line 338, where the auxvec is digested by FreeBSD dynamic linker. It seems to be harmless, but at least this is inconsistent. May be, AT_LINUX_PLATFORM etc defines would make more sense. Do you actually need imgp->machine member ? It seems that it is used only inside linux_copyout_strings ? >=20 > This was made against 7-STABLE, but there no major differences in=20 > -current. It is also trivial to port to 64-bit amd64 emulation. Hmm, what are you referencing there ? I know only about one mostly stalled effort. --6xO04bqTG+NC5D6o Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkh3vzkACgkQC3+MBN1Mb4gcGwCeN8opVdZf5Kw3Pohrs5uQTEOb alUAnj+4JipcTqkYr7ADOFVWaZXBQyKs =cP19 -----END PGP SIGNATURE----- --6xO04bqTG+NC5D6o--