PE-COFF and import tables

pps i-love-spam@yandex.ru
Sat May 9 17:59:00 GMT 2009


Dave Korn wrote:
>> I can notice that COREDLL file is referenced twice, first one with only 
>> two functions
>> in it (_fileno, _strdup) and second one with other functions.
> 
>   This is a bit unusual, we would have to see the linker command line that
> builds the DLL to know exactly why this happens.


I also noticed that kind of weird stuff. I my case one of the dlls is 
listed like 10 times! :)
It happens because one of the dll's exportes data member and the other 
dll auto imports it. That data member is referenced in 10 or so 
different files I believe. To fix that I appended 
__declspec(dllexport/dllimport) to the declaration of the exported 
symbol and in such case it's all ok.

Also I had references to coredll.dll and COREDLL at the same time. I 
personally don't like that COREDLL thing and to fix that I deleted 
libceoldname.a (which references COREDLL instead of coredll.dll) and for 
all unresolved references I manually added code forwarding functions like:
wchar_t * wcsdup(const wchar_t *s){ return _wcsdup(s); }



More information about the Binutils mailing list