This is the mail archive of the cygwin-apps@cygwin.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: Did I find an error in the current binutils or what???


Corinna Vinschen wrote:


>>Except that the cygwin1.dll/libcygwin.a that you are linking against does 
>>not have the requisite auto-import support thunks (_nm__*).  Perhaps this 
>>cygwin was compiled using a (very) old binutils?  pre-20010802 ?
>>
> 
> Yes.  It has been cross-compiled on a Linux box.  The binutils are...
> uhm... compiled on 2001-07-12 so they are definitely pre-20010802.
> Somehow I don't understand how that stuff is supposed to work.  I'm
> not a binutils expert...


Okay, then I'm gonna assume that you are linking against a kernel that you 
built yourself, and not the "official" cygwin kernel that cgf built 
(otherwise, the following applies to him):

You ought rebuild your cross-binutils from the binutils-20011002-1-src as 
distributed from the cygwin mirrors.

Recent binutils (post-20010802) add special autoimport-support thunks to 
the dll's that they create.  These are used to create a lookup table for 
the variable exports, by fooling the windows runtime loader.  (I don't 
understand the whole thing, but it's a neat concept.)

Anyway, the *DLL* as well as your client app need to be built using a 
recent binutils, in order for the auto-import thing to work properly.

Of course, with the cygwin1.dll, auto-import shouldn't be necessary. 
__progname *ought* to be declared (with appropriate __declspec() markings) 
in some header file somewhere, so that's a cygwin bug.

--Chuck



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