Calling a Linux library from FreeBSD

2003-03-05 Thread Martin Nilsson
Is it possible to open and call functions in a static Linux library 
(.so) from a native FreeBSD program?

I have tried with a small program that just dlopens the library but it 
doesn't work as i does with a FreeBSD .so (The Linuxulator is loaded)

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.

Thanks for any help,

Martin

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: Calling a Linux library from FreeBSD

2003-03-05 Thread Dan Nelson
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
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message