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

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

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


From: Volker Grabsch
Subject: Re: [Mingw-cross-env-list] libssh2 using export table?
Date: Mon, 12 Dec 2011 12:05:02 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Moritz Bunkus schrieb:
> "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."

Sorry for not providing a full answer, but maybe the
following hints are useful for you.

First, maybe you simply forgot to strip your final EXE files?

    i686-pc-mingw32-strip yourprogram.exe

You could also use "-s" (shorthand for "--strip-all") option:

    i686-pc-mingw32-strip -s yourprogram.exe

Second, your problem might be related to GCC's "-fvisibility=hidden"
switch. Maybe there's a corresponding linker option?

    http://gcc.gnu.org/wiki/Visibility


HTH,
Volker

-- 
Volker Grabsch
---<<(())>>---



reply via email to

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