From owner-freebsd-emulation@FreeBSD.ORG Tue Jul 12 06:33:03 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 5420616A41C for ; Tue, 12 Jul 2005 06:33:03 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vbook.fbsd.ru (swsoft-mipt-nat.sw.ru [195.214.233.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBF9C43D53 for ; Tue, 12 Jul 2005 06:33:02 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.51 (FreeBSD)) id 1Ds5LS-0000RR-Hq; Tue, 12 Jul 2005 00:57:42 +0400 From: Vladimir Grebenschikov To: Dan Nelson In-Reply-To: <20050711183241.GH5116@dan.emsphone.com> References: <000701c58643$71f3a190$6401a8c0@HomePC> <20050711183241.GH5116@dan.emsphone.com> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Tue, 12 Jul 2005 00:57:41 +0400 Message-Id: <1121115461.1043.3.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov Cc: freebsd-emulation@freebsd.org Subject: Re: Linking linux libs X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vova@fbsd.ru 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 06:33:03 -0000 =F7 =D0=CE, 11/07/2005 =D7 13:32 -0500, Dan Nelson =D0=C9=DB=C5=D4: > 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. 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. --=20 Vladimir B. Grebenschikov vova@fbsd.ru