This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: LoadLibrary error 487 (was Re: Please test latest developer snapshot)
On Feb 26 19:45, Corinna Vinschen wrote:
> On Feb 26 19:43, Corinna Vinschen wrote:
> > On Feb 26 13:23, Christopher Faylor wrote:
> > > The other thing we could do is add a flag to thd dll_info struct which says
> > > "Use DONT_RESOLVE_DLL_REFERENCES" either in the forkee or always depending
> > > on what works for winm.dll.
> >
> > That's what I meant above. It would require a new LoadDLLfuncEx4,
> > wouldn't it? OTOH, LoadDLLfuncEx3 is only referred to via the
> > definition of LoadDLLfuncEx2, so it should be simple to redefine.
>
> Btw., what is the "fn" argument to LoadDLLfuncEx3 good for? Given that
> it's always 0 it seems pretty useless right now...
Erm... I don't know what fn is supposed to do, but right now it's
value is simply used for the error code. In LoadDLLprime it's put
into the upper 8 bytes of the decoration:
.long (" #n "+" #notimp ") | (((" #err ") & 0xff) <<16) | (((" #fn ") & 0xff) << 24)
And in noload it's simply returned together with the err value:
[...]
andl $0xffff0000,%eax# upper word
[...]
pushl %eax # Save for later
[...]
popl %eax # Get back argument
sarl $16,%eax # return value in high order word
jmp *%edx # Return
My question is, shouldn't there be an additional
andl $0x000000ff,%eax
right before the jmp? This would also allow to use the fn value
for the purpose discussed above.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat