From owner-freebsd-emulation@FreeBSD.ORG Tue Jul 12 10:04:14 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 6F19B16A41C for ; Tue, 12 Jul 2005 10:04:14 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEC6043D45 for ; Tue, 12 Jul 2005 10:04:13 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (gxwfwn@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.1/8.13.1) with ESMTP id j6CA4AQK066705 for ; Tue, 12 Jul 2005 12:04:11 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.1/8.13.1/Submit) id j6CA4AhN066704; Tue, 12 Jul 2005 12:04:10 +0200 (CEST) (envelope-from olli) Date: Tue, 12 Jul 2005 12:04:10 +0200 (CEST) Message-Id: <200507121004.j6CA4AhN066704@lurza.secnetix.de> From: Oliver Fromme To: freebsd-emulation@FreeBSD.ORG In-Reply-To: <20050711183241.GH5116@dan.emsphone.com> X-Newsgroups: list.freebsd-emulation User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.11-RELEASE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: Linking linux libs X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-emulation@FreeBSD.ORG 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 10:04:14 -0000 Dan Nelson wrote: > Jim Bodkikns (Dakotacom) said: > > 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). > > 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. Another possibility is to write a small linux binary (call it a wrapper or a stub), which performs the actual calls to the linux library, and let your real FreeBSD application communicate with that linux stub via one of the well-known interprocess communication mechanisms (socket I/O, pipes, shared memory, signals, SysV messages, whatever). Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "The last good thing written in C was Franz Schubert's Symphony number 9." -- Erwin Dieterich