This is the mail archive of the
mailing list for the GCC project.
Trouble with automatic symbol export/import on Cygwin64
- From: Jean-Pierre Flori <jpflori at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 7 Apr 2014 13:48:54 +0200
- Subject: Trouble with automatic symbol export/import on Cygwin64
- Authentication-results: sourceware.org; auth=none
While preparing a new release of MPIR (mpir.org) we encountered issues
A detailed discussion of the issue is already available on Cygwin mailing list:
Quickly it seems the problem seem to be that calling assembly defined
functions (assembled with yasm) without the __declspec(dllimport)
magic leads to a "callq" instruction with a chopped off address
instead of a correct magic trampoline code.
This seems to be the case with both gcc 4.7.3 and 4.8.2 but the
culprit might be elsewhere.
Our current solution is to use the _declspec(dllimport) magic, but as
it should not be necessary anymore, it would be nice to understand
what is going wrong here.
Looking a little bit at the import lib produced by gcc, it seems that
problematic symbols have the __nm_ prefix, whereas non-problematic one
Any clue on how this is decided?
In particular, when tryng to compile a minimal lib with dummy function
I don't get __nm_ prefixes.