From owner-freebsd-current@FreeBSD.ORG Wed Jan 10 06:53:21 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0DAA16A407 for ; Wed, 10 Jan 2007 06:53:21 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 4756513C459 for ; Wed, 10 Jan 2007 06:53:21 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A5E36F.dip.t-dialin.net [84.165.227.111]) by redbull.bpaserver.net (Postfix) with ESMTP id 583372E06D; Wed, 10 Jan 2007 07:59:05 +0100 (CET) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 100D45B497E; Wed, 10 Jan 2007 07:53:11 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.13.8/8.13.8/Submit) id l0A6rAYh066271; Wed, 10 Jan 2007 07:53:10 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Wed, 10 Jan 2007 07:53:10 +0100 Message-ID: <20070110075310.4vdsp3q68wgs4k4g@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Wed, 10 Jan 2007 07:53:10 +0100 From: Alexander Leidinger To: Boris Samorodov References: <20070108165157.GA94941@stud.fit.vutbr.cz> <57417212@srv.sem.ipt.ru> <20070108180014.GA4540@stud.fit.vutbr.cz> <20070108210813.368389dc@Magellan.Leidinger.net> <20070109204604.62915dc7@Magellan.Leidinger.net> <89565167@srv.sem.ipt.ru> <20070109213151.2bf5a8f3@Magellan.Leidinger.net> <46677978@srv.sem.ipt.ru> <80597611@srv.sem.ipt.ru> <20070109210153.GA35342@stud.fit.vutbr.cz> <89559334@srv.sem.ipt.ru> In-Reply-To: <89559334@srv.sem.ipt.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) / FreeBSD-7.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.864, required 6, autolearn=not spam, BAYES_00 -15.00, DK_POLICY_SIGNSOME 0.00, FORGED_RCVD_HELO 0.14) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: Divacky Roman , freebsd-current@freebsd.org Subject: Re: broken linuxulator in -current as of Jan 8 17:51:45 CET X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jan 2007 06:53:21 -0000 Quoting Boris Samorodov (from Wed, 10 Jan 2007 00:42:49 +0300)= : > On Tue, 9 Jan 2007 22:01:53 +0100 Divacky Roman wrote: >> On Tue, Jan 09, 2007 at 11:57:08PM +0300, Boris Samorodov wrote: >> > On Tue, 09 Jan 2007 23:51:01 +0300 Boris Samorodov wrote: >> > >> > > for i in (linux,freebsd) do >> > > for y in (/usr,/usr/local,etc) do >> > >> > I ment if linux, use '/compat/linux + y' prefix. >> > >> > > find_a_library >> > > done >> > > done >> > >> > Hm, even if we can implement it, the (potential) problem with linux >> > ports installed to /usr/local remains... > >> how does this solve the problem? I might misunderstand whats going on > > All possible linux paths are searched fistly. That's not possible. The way the linuxulator works is: - the linker in userland calls open("/foo/bar") - kernel looks for "/compat/linux/foo/bar" * it is there -> return it * it is not there -> look for "/foo/bar" + if it is there -> return it + if it is not there -> return error - the userland get's something which may be linux or FreeBSD stuff - the linker read()s this - the linker sees a wrong ELF ABI and bails out What you describe would require changing the linker to set a flag =20 which let's the kernel know it has to search in the linux or in the =20 FreeBSD path, and the linker has to search the complete path list =20 twice. This is out of question. Another approach would be to teach the linker to not bail out on ELF =20 ABI errors and continue searching the right lib. This would also need =20 a change in the linker, but it is a change which the glibc people may =20 accept (compared to the search twice and set a flag solution). This =20 would not be an immediate solution, but after a while the new linker =20 would hit every linux distribution and it would arrive in FreeBSD =20 (yes, we can replace the linker with a self-made one, and this would =20 be the solution in the mean time, but so far no such change is done in =20 glibc). Anyone up to implement this and to convince the glibc people =20 that it is a good idea to include this behavior in the runtime linker? Bye, Alexander. --=20 Computer Science is the only discipline in which we view adding a new wing to a building as being maintenance =09=09-- Jim Horning http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137