Date: Tue, 17 Jan 2006 17:00:18 +0100 From: Alexander Leidinger <Alexander@Leidinger.net> To: Ondra Knezour <knezour@weboutsourcing.cz> Cc: freebsd-emulation@freebsd.org Subject: Re: Using Linux shared libraries Message-ID: <20060117170018.4y1rqib0o44kcso0@netchild.homeip.net> In-Reply-To: <43CC25BD.3070100@weboutsourcing.cz> References: <43CC25BD.3070100@weboutsourcing.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
Ondra Knezour <knezour@weboutsourcing.cz> wrote: > Is there some usefull reading about using linux plugins for bsd > applications? Yes, it as simple as "Don't do it, if you don't know how.". Yes, this is somewhat recursive, since if you would know how to do it, you wouldn't have to ask. Technically it's possible (as linuxpluginwrapper does it), but you really have to know what you are doing. The linuxpluginwrapper works, since the plugins provide documented interfaces and use known data structures/types. Both parts are important. For some random library you don't know which data is wrapped how into which structures. If the libs use data structures which are sized differently or layed out differently on FreeBSD and Linux, it will not work. So it's not only about writting a wrapper, it's also about invariants, you don't control in the general case. > Another way may be possible - decompile linux file and compile it on > FreeBSD. I have some asm-like decompiled files for mentioned > libraries, but assembler isn't my best friend, so I want to ask, if > this way may be successfull and if can, which method and tools can > lead to success. You would have to check the size of structures, allocations of structures, offsets into structures, the use of structures, the order of elements in structures (in case it uses structures of the OS)... you better forgot about this one. > Versions used: > Firebird TCP/IP server version FB-V1.5.2.4731 Firebird 1.5 You forgot one possibility: get a linux binary package of Firebird running in the linuxolator. There you can use the binary only linux plugin for Firebird. I think this is the fastest and best way to get the linux plugins working. Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 There is a green, multi-legged creature crawling on your shoulder.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060117170018.4y1rqib0o44kcso0>