From: hhh h. <the...@ho...> - 2008-09-13 10:26:40
|
Hello, I'll assume that you know that nealy all functions inside a DLL use Windows API, an that Windows API is not supported in Linux kernel. Bear in mind that even if you have the source code, and it has known functions... ( e.g.: malloc()... ) in the compiled version, the result.dll, the malloc call is assembled into the windows-spefic malloc implementation, that calls a function like _mzAlloc (or something like that), that actually performs all the mem allocation tasks. Obviosly, linux kernel malloc implementation( compiled version) probably will not have the same function name and other aspects ( reside on the same address, uses the same number of args, etc, etc ). So, assuming you considered the above and the code that resides in the .DLL is a very simple one, you *can* parse the header, load the symbol table, resolve it, load it to a buffer, witch allows you to execute code, and "jmp" to that location. It is... very hard work, and even if you can do it, the code in the dll, must be very simple( even function calls inside the parsed come, must be in the same calling covention to execute right... and you'll have to resolve the code address all hiover again). I would not bother without a very good reason... mind you, even if you pull this off, it'll be a hogger of a code.... Date: Thu, 11 Sep 2008 18:32:59 -0300From: fre...@gm...To: dev...@li...Subject: [Dev-C++] dll / linux Hello,I need import some functions of a .dll on linux. I using kernel 2.6.24, Ubuntu 8.04 server edition.tanks _________________________________________________________________ Receba GRÁTIS as mensagens do Messenger no seu celular quando você estiver offline. Conheça o MSN Mobile! http://mobile.live.com/signup/signup2.aspx?lc=pt-br |