Le Mon, 07 Apr 2014 09:49:27 +0000, Jean-Pierre Flori a écrit : > Le Mon, 07 Apr 2014 09:14:41 +0000, Jean-Pierre Flori a écrit : >> Looking a little further, it seems the problematic functions are those >> directly assembled from assembly code. >> That was the case of mpn_store on x86_64. >> >> And when I remove all dllimport, the call to the function mpn_addadd_n >> also gives a segfault when executing t-addadd_n.exe. >> >> Note that the test t-aors.exe does not segfault, and indeed it only >> uses the mpn_add_1 and mpn_sub_1 functions which are not from assembly. >> > It seems the dll produced at least has different treatment for these tow > kinds of functions. > > jp@napoleon-7 ~ > $ nm local/bin/cygmpir-16.dll | grep store 00000004ff238170 T > __gmpn_store 00000004ff238198 t __gmpn_store.1 00000004ff2381a0 t > __gmpn_store.2 00000004ff2381b3 t __gmpn_store.3 00000004ff2381bd t > __gmpn_store.4 00000004ff2381be t __gmpn_store.5 00000004ff2381c3 t > __gmpn_store.6 00000004ff2381c9 t __gmpn_store.7 ... > > jp@napoleon-7 ~ > $ nm local/bin/cygmpir-16.dll | grep addadd_n 00000004ff208e10 T > __gmpn_addadd_n 00000004ff208e50 t __gmpn_addadd_n.1 00000004ff208eac t > __gmpn_addadd_n.2 00000004ff208ebe t __gmpn_addadd_n.3 00000004ff208f0f > t __gmpn_addadd_n.4 00000004ff208f54 t __gmpn_addadd_n.5 > 00000004ff208f6e t __gmpn_addadd_n.6 > > jp@napoleon-7 ~ > $ nm local/bin/cygmpir-16.dll | grep add_1 00000004ff207d40 T > __gmpn_add_1 > > And > > jp@napoleon-7 ~/mpir $ nm .libs/libmpir.dll.a | grep add_1 > 0000000000000000 T __gmpn_add_1 0000000000000000 I __imp___gmpn_add_1 > > jp@napoleon-7 ~/mpir $ nm .libs/libmpir.dll.a | grep addadd_n > 0000000000000000 I __imp___gmpn_addadd_n 0000000000000000 I > __nm___gmpn_addadd_n
Note in particular the __nm_ prefix. It is as advertiserd here: http://www.cygwin.com/ml/cygwin/2002-01/ msg00236.html But when looking at the Cygwin32 produced import lib, I don't see any nm prefix. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple