0

There is a windows application that I have the source to. It compiles under MinGW, links fine against wine, and executes, on a Linux system.

However, I would like it to call into a Linux library.

Since the Linux lib is statically linked, I thought I could convert it to the COFF format, and that it would execute correctly under wine. I could even make some degree of changes to the Linux-lib sources to accommodate this, though truly porting it to win32 would be impossible.

I tried converting it to COFF32 (it is a 32bit lib already, and the windows project is 32bit as well). However, objconv seems to be unable to convert it. Can anyone help me understand the conversion error? (I'm afraid I cannot provide the source code, as it is proprietary.)

~objconv -fCOFF32 -xs _build/Common/libcommon.a bin/common.lib~

~Error 2037: Symbol storage/binding type 10 not supported~

Edit: I have gotten the object to convert. However, wine now fails to load the executable. :(

gcc -o "${CommonObj}" -m32 -march=i386 -g0 ${Opts_Cmmn[@]}

i686-w64-mingw32-objcopy -O pe-i386 -S "./${CommonObj}" "${LibOut}"

I notice that objcopy outputs this warning:

->output.exe:.comment: section below image base

Wine then fails to load the executable:

-> Application could not be started, or no application associated with the specified file.

-> ShellExecuteEx failed: Bad EXE format for ./output.exe

user41010
  • 91
  • 8
  • Does the Linux library license permit being linked into proprietary code? – stark Feb 26 '23 at 12:50
  • @stark It does. I'm only leary to make dramatic changes to it, because we won't receive support for the altered version. – user41010 Feb 26 '23 at 19:14

0 Answers0