Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Mar 2003 09:58:01 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Martin Nilsson <martin@filex.se>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Calling a Linux library from FreeBSD
Message-ID:  <20030305155801.GD21653@dan.emsphone.com>
In-Reply-To: <3E66037C.8060209@filex.se>
References:  <3E66037C.8060209@filex.se>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Mar 05), Martin Nilsson said:
> Is it possible to open and call functions in a static Linux library
> (.so) from a native FreeBSD program?

Important things like struct stat and off_t are different sizes, so
even if you can link with them, all except the most basic program will
seg fault.  XFree86 modules are an exception since they went to great
pains to develop their own ABI that was portable across OSes.

That's a shared library, btw.  Static libraries end in ".a" .

> Why am I trying this? I got a couple of cheap Cryptoswift SSL
> accelerators off ebay and they only come with Linux drivers. The
> kernel driver seems simple enough to port but openssl communicates
> with the card thru a precompiled library that that I don't have the
> source for.

You may have to install the linux-devel port, and build anything that
requires that library under Linux emulation.

-- 
	Dan Nelson
	dnelson@allantgroup.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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