Date: Tue, 12 Jul 2005 13:09:10 +0200 From: Alexander Leidinger <Alexander@Leidinger.net> To: vova@fbsd.ru Cc: freebsd-emulation@freebsd.org Subject: Re: Linking linux libs Message-ID: <20050712130910.13936e1d@Magellan.Leidinger.net> In-Reply-To: <1121115461.1043.3.camel@localhost> References: <000701c58643$71f3a190$6401a8c0@HomePC> <20050711183241.GH5116@dan.emsphone.com> <1121115461.1043.3.camel@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 12 Jul 2005 00:57:41 +0400 Vladimir Grebenschikov <vova@fbsd.ru> wrote: > __ ____, 11/07/2005 __ 13:32 -0500, Dan Nelson __________: > > In the last episode (Jul 11), Jim Bodkikns (Dakotacom) said: > > > A linux emulation question. > > >=20 > > > 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). > >=20 > > 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. >=20 > I have know examples of more complex magic on linking big database linux > static library into FreeBSD applications, but it was like black magic > with lot of libc compatibility hacks. www/linuxpluginwrapper does something like this. It does it at run- time, not at (static-)link-time. You can also do a little bit of magic (like renaming symbols) with the proprietary object code, like in the lang/icc port. For short: you "just" have to provide the missing symbols at link-time. Bye, Alexander. --=20 Secret hacker rule #11: hackers read manuals. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint =3D C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050712130910.13936e1d>