This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re[2]: Importing a variable from a DLL


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]