From owner-freebsd-emulation@FreeBSD.ORG Tue Jan 17 16:00:47 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5503F16A43A for ; Tue, 17 Jan 2006 16:00:47 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA97C43D45 for ; Tue, 17 Jan 2006 16:00:36 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5FC98.dip.t-dialin.net [84.165.252.152]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.1/8.13.1) with ESMTP id k0HFrmZh031886; Tue, 17 Jan 2006 16:53:49 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from localhost (localhost [127.0.0.1]) by Andro-Beta.Leidinger.net (8.13.3/8.13.3) with ESMTP id k0HG0IXQ044544; Tue, 17 Jan 2006 17:00:19 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Tue, 17 Jan 2006 17:00:18 +0100 Message-ID: <20060117170018.4y1rqib0o44kcso0@netchild.homeip.net> X-Priority: 3 (Normal) Date: Tue, 17 Jan 2006 17:00:18 +0100 From: Alexander Leidinger To: Ondra Knezour References: <43CC25BD.3070100@weboutsourcing.cz> In-Reply-To: <43CC25BD.3070100@weboutsourcing.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.3) / FreeBSD-4.11 X-Virus-Scanned: by amavisd-new Cc: freebsd-emulation@freebsd.org Subject: Re: Using Linux shared libraries X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2006 16:00:47 -0000 Ondra Knezour 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.