简体   繁体   中英

Can Winelib link a DLL directly to the ELF executable?

There is a DLL (no source code, but no fancy stuff expected inside, hopefully). Going to write a Linux application to use it. So, GNU all the way: native Linux gcc/gdb/ELF, etc.

I've found here on SO some solutions: with WineLib it's possible to write a code that have access to the win32 LoadLibrary function, and that code still compiles into ELF binary. A bit of API forwarding and here is a *.so file that calls LoadLibrary on the dll and exposes its functions.

Is it correct?

Is it possible to automate it? Is there an example with winedump and winegcc that are probably the tools for this job?

Sounds all perfectly reasonable. The DLL format is properly ancient, and not excessively complex (it had to work on the original 8086 CPU, and it got simpler with 32 bits Windows). Code is just that, x86 instructions, and data may be even more boring.

However, it sounds also very specialized, which probably explains why I've never heard of an actual implementation of this idea.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM