Date: Tue, 9 Aug 2005 23:36:57 +0200 From: Miguel Mendez <flynn@energyhq.es.eu.org> To: "M. Warner Losh" <imp@bsdimp.com> Cc: hackers@freebsd.org Subject: Re: Converting libfoo.so for linux to freebsd Message-ID: <20050809233657.745c41b4.flynn@energyhq.es.eu.org> In-Reply-To: <20050809.133734.08360256.imp@bsdimp.com> References: <20050809.133734.08360256.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Tue__9_Aug_2005_23_36_57_+0200_6BEGAe4z2xq3eR+Q Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 09 Aug 2005 13:37:34 -0600 (MDT) "M. Warner Losh" <imp@bsdimp.com> wrote: > I have recently purcahsed a device that comes with a .so for linux, > but no sources. Is there any way one can take an arbitrary linux .so > which appears to have no dependencies to a FreeBSD .so? The binary > code is about 20k or so. Could you be a bit more specific wrt dependencies? Does the device in question provide an API via said .so and a .h? You could try using ndisasm (from the /devel/nasm port) or a perl script called dasm that calls objdump and see if you can get something usable from there. If the .so is small it shouldn't be that much work, although it might be more practical to derive the interface code from the asm output (i.e. reverse engineer) than try to shoehorn the resulting .S into a FreeBSD .so. The other alternative would be building a Linux binary as Kris has suggested, although I suspect that this .so is involved in some sort of i/o which might or might not be easily ported to FreeBSD. Cheers, --=20 Miguel Mendez <flynn@energyhq.es.eu.org> http://www.energyhq.es.eu.org PGP Key: 0xDC8514F1 --Signature=_Tue__9_Aug_2005_23_36_57_+0200_6BEGAe4z2xq3eR+Q Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFC+SH8nLctrNyFFPERAjizAKCmiWrwdPcKFPXWc4I0P8df2feamwCeNGIP LLVA6TPYRLEeu2AprO5886k= =v78V -----END PGP SIGNATURE----- --Signature=_Tue__9_Aug_2005_23_36_57_+0200_6BEGAe4z2xq3eR+Q--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050809233657.745c41b4.flynn>