Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jul 2005 12:04:10 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-emulation@FreeBSD.ORG
Subject:   Re: Linking linux libs
Message-ID:  <200507121004.j6CA4AhN066704@lurza.secnetix.de>
In-Reply-To: <20050711183241.GH5116@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Dan Nelson <dnelson@allantgroup.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507121004.j6CA4AhN066704>