Linker differences between Windows and Linux

Jussi Pakkanen jpakkane at gmail.com
Tue Jul 1 04:39:04 CDT 2008


Hi

I'm working on porting the Cuneiform OCR system from Windows to Linux.
I'm getting a lot of problems by the different linking order of Linux
and Windows. I want to make it a native Linux application, that is not
depend on Winelib. (I already have it running, but it is very buggy.)

The original code is a jumble of dll's that export all of their
symbols. The problem is that there are hundreds of duplicate symbols
among in them (for example each dll has an "error code" variable which
all have the same name). Under Linux these symbols get aliased to one
single symbol and cause spurious program crashes.

I assume Wine deals with this by having its own linker. My question is
how does Winelib handle this problem (or does it handle it at all)?
Winelib's documentation does not mention this. Can this symbol
resolver fix be (easily) extracted from Winelib and used on regular
Linux programs? Or is there a way to automatically rename these kinds
of symbols, preferably in the source code?

For those interested, the code is at
https://code.launchpad.net/~jpakkane/cuneiform-linux/trunk (the manual
symbol resolvation fix is checked in in revision 185, so you might
want to check out revision 184).

Thanks for your help.



More information about the wine-devel mailing list