From owner-freebsd-emulation@FreeBSD.ORG Tue Jul 12 11:10:16 2005 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F12116A422 for ; Tue, 12 Jul 2005 11:10:14 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from mailout09.sul.t-online.com (mailout09.sul.t-online.com [194.25.134.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96E3843DD6 for ; Tue, 12 Jul 2005 11:09:36 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from fwd18.aul.t-online.de by mailout09.sul.t-online.com with smtp id 1DsIdp-0007sk-00; Tue, 12 Jul 2005 13:09:33 +0200 Received: from Andro-Beta.Leidinger.net (VsIdwwZ6Yet16zVo9UOotUrJsG+8L2hxCpS9dpA4rqv1NQshlipKge@[84.165.198.196]) by fwd18.sul.t-online.de with esmtp id 1DsIdX-1CE6Vs0; Tue, 12 Jul 2005 13:09:15 +0200 Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.3/8.13.3) with ESMTP id j6CB9BAp087691; Tue, 12 Jul 2005 13:09:11 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Tue, 12 Jul 2005 13:09:10 +0200 From: Alexander Leidinger To: vova@fbsd.ru Message-ID: <20050712130910.13936e1d@Magellan.Leidinger.net> In-Reply-To: <1121115461.1043.3.camel@localhost> References: <000701c58643$71f3a190$6401a8c0@HomePC> <20050711183241.GH5116@dan.emsphone.com> <1121115461.1043.3.camel@localhost> X-Mailer: Sylpheed-Claws 1.9.11 (GTK+ 2.6.8; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-ID: VsIdwwZ6Yet16zVo9UOotUrJsG+8L2hxCpS9dpA4rqv1NQshlipKge@t-dialin.net X-TOI-MSGID: 78a13130-a502-4849-bdd4-653e77af71bd Cc: freebsd-emulation@freebsd.org Subject: Re: Linking linux libs 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: Tue, 12 Jul 2005 11:10:16 -0000 On Tue, 12 Jul 2005 00:57:41 +0400 Vladimir Grebenschikov wrote: > __ ____, 11/07/2005 __ 13:32 -0500, Dan Nelson __________: > > In the last episode (Jul 11), Jim Bodkikns (Dakotacom) said: > > > A linux emulation question. > > >=20 > > > I suspect I know the answer to this, but what about linking to > > > vendor supplied linux libs? (A vendor product that is provided in the > > > form of libraries that are linked into your apps). > >=20 > > As long as you compile and link using linux gcc and ld to generate a > > Linux executable, it'll work. Don't try and link a Linux library into > > a FreeBSD executable, though, unless the ABI is very simple. For > > example, a standalone crypto module that takes a buffer and a key would > > probably work; anything that tries to do any stdio or call libc > > functions that pass structures won't. >=20 > I have know examples of more complex magic on linking big database linux > static library into FreeBSD applications, but it was like black magic > with lot of libc compatibility hacks. www/linuxpluginwrapper does something like this. It does it at run- time, not at (static-)link-time. You can also do a little bit of magic (like renaming symbols) with the proprietary object code, like in the lang/icc port. For short: you "just" have to provide the missing symbols at link-time. Bye, Alexander. --=20 Secret hacker rule #11: hackers read manuals. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint =3D C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7