Importing a variable from a DLL

Paul Sokolovsky paul-ml@is.lg.ua
Thu Aug 26 03:33:00 GMT 1999


Hello Mumit,

Mumit Khan <khan@xraylith.wisc.EDU> wrote:


MK> There is no silver bullet, sorry.

[]

MK> Functions are trivial to handle via thunks (via import
MK> libraries created by dlltool or implib or some such tool);
MK> it's the variables that you have to worry about, which have
MK> no traditional way to "fix up" in the DLL model.

    But at least there might be achieved proper diagnostics of such
issues, if dlltool would correctly mark data symbols in def, that
implib would only contain __imp_<symbol> and not <symbol>, and we'd
get link error when linking with object which doesn't have
__declspec(dllimport) on that symbol, and not runtime segfaults,
as we have now.

MK> You'll just have to deal with it.

MK> I know of one case where the developers talked about writing
MK> a custom PE loader to deal with this (at the expense of
MK> compatibility of existing tools), but that project never saw
MK> daylight outside of the South Bay cafes.

    It would be better just use ELF and forget about all the gore.
But rules defined by others.

MK> Bearer of bad news,
MK> Mumit



Best regards,
 Paul                            mailto:paul-ml@is.lg.ua



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list