On Tuesday 17 September 2002 13:01, Max Bowsher wrote: [...] > $ echo '__declspec(dllexport) void foo () {}' > foo.c > $ gcc -shared foo.c -o foo.dll > $ objdump -p foo.dll | fgrep -A 5 Characteristics [...]
It worked on my 2.95.2 collector's item cross compiler... Oh, and the export table does indeed show the foo() function as well. (BTW, the native objdump works just as fine as the one that belongs to the cross compiler. As expected, since it's based on libbfd, I suppose.) Anyway, unless I'm missing something, we still need import libs to be generated for compilers that can't link DLLs directly. I've just looked at a few DLLs, but it seems to me that objdump -p <DLL> digs the required info out. Here's the interesting part of the output from SDL.dll, for example: [Ordinal/Name Pointer] Table [ 0] SDL_AddTimer [ 1] SDL_AllocRW [ 2] SDL_AudioDriverName [ 3] SDL_AudioInit [ 4] SDL_AudioQuit [ 5] SDL_BuildAudioCVT ... Has anyone tried hacking a script to turn that into a .def file? Or should I, or someone else, just try to add a feature to objdump? //David Olofson --- Programmer, Reologica Instruments AB .- M A I A -------------------------------------------------. | Multimedia Application Integration Architecture | | A Free/Open Source Plugin API for Professional Multimedia | `----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter | `-------------------------------------> http://olofson.net -' _______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool