mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mingw-cross-env-list] libssh2 using export table?


From: Moritz Bunkus
Subject: [Mingw-cross-env-list] libssh2 using export table?
Date: Fri, 2 Dec 2011 17:34:37 +0100

Hey,

I'm using an unmodified mingw-cross-env for my project MKVToolNix. The
current release is the first one built with mingw-cross-env[2], and
one user asked my this question[1]:

"Why do all .exe files in mkvtoolnix have an export table? They are
all exporting ~100 functions of names starting with libssh2, e.g.
libssh2_channel_close."

which I couldn't answer because my knowledge about DLLs and EXEs on
Windows is very limited. He further elaborated:

"The export table should only exists on DLLs. It is likely all EXEs
are linking to libssh2 and libssh2 is built as a DLL-like library,
which is built as a static library, but with all functions still
marked 'export'. So all libssh2 functions, no matter used or not, are
linked and exported, making the EXEs very big."

How would I go about checking whether or not his assumption about the
libssh2 built by mingw-cross-env is correct? How could I change that
behavior (I guess by patching libssh2 not to use the dllexport
declspecs), or could someone do it instead of me (like I said, I'm
primarily a Linux developer whose knowledge about DLLs is mightily
lacking)?

Thanks.

Kind regards,
mo

[1] The full conversation took place here:
http://forum.doom9.org/showthread.php?p=1542182#post1542182
[2] The build in question is available here if anyone would want to
take a look at the EXEs in question:
http://www.bunkus.org/videotools/mkvtoolnix/win32/mkvtoolnix-unicode-5.1.0.7z



reply via email to

[Prev in Thread] Current Thread [Next in Thread]