I have a set of special python scripts which extend gcc for debugging / compatibility engineering purposes over a remote connection -- integrating BOTH mingW and Visual Studios C++ symbol mangling, etc. -- but wine is not able to run my scripts quite the same as windows, because the fake dll's do not have the normal PE export table that a real DLL does.... so, help

My scripts can find path information about loaded DLL's directly from the memory resident PEB and TIB structures of the process being debugged; and and then they can call an external program to get a list of all exported functions. For example...
dumpbin.exe /exports C:\windows\system32\msvcrt.dll
Under windows, this command will correctly return the DLL offsets for the exports, but under wine -- it returns an empty set.
I also tried an in-memory method that is supposed to enumerate dll exports, and I thought wine fake-dll's should be compatible with an in-memory exports listing -- but it wasn't. Even this method returned no symbols... ( I have working code that compiles under visual studio 2009, see: stackoverflow . com/questions/4353116/listing-the-exported-functions-of-a-dll for the basic idea; ask if you want the working code with correct headers and I'll post a functional copy. )
The only other thing I could think of was to modify my python scripts so that when no symbols are returned, to use the WINEDLLS paths, and find the msvcrt.dll.so library in the unix libraries.
nm -g --defined-only /usr/local/lib/wine/msvcrt.dll.so
And I get symbol offsets, type, and names ... just fine ...
00040d60 T MSVCRT_fprintf
000273c0 T _cprintf
00026be0 T _cputs
etc.
But the offsets do not add correctly to the base address of the function when loaded into memory.
So, how do I get the exported symbols and their CORRECT offsets from a built in wine library/fake library directly from the in memory PEB/TIB structures in memory?
Detailed Example of the problem:
A program using msvcrt.dll, gave the following PEB information during a debug session:
path ---- base_address ---- base_address+image_size ---- load_count
...
Z:\home\andrew3\windows\src\dllLinkage\myDll.dll 0x10000000 0x10008000 65535
C:\windows\system32\msvcr90.dll 0x7ebe0000 0x7ec08000 65535
C:\windows\system32\msvcrt.dll 0x7eb40000 0x7ebdb000 3
I traced my program to a place where I explicitly called fprintf(), and it disassembled to:
0x100011ec: call 0x100013f6 ; myDll.dll, calling another place in myDll.dll
...
0x100013f6: jmp *0x100061d0 ;myDll.dll using indirection to function fprintf(): jmp $0x7eb61b1
I originally expected the jump to be to the msvcr90.dll -- because an external app called "dependency walker" says that's what myDll.dll actually linked against; but the indirection table entry *0x100061d0 is not part of msvcr90.dll, it's actually inside myDll.dll's address space itself -- so perhaps it's a ?thunk? or other technique to connect msvcr90 calls to wine's builtin msvcrt?
In any event, the jump ends up going into msvcrt.dll at an offset of 0x7eb61b10 - 0x7eb40000 = 0x21b10 and, yes, it does a printf to stderr as expected...
but, that offset also means the symbol dump from "nm" is useless, because fprintf was supposed to be at offset 0x40d60, not 0x21b10 according to nm. And there is no symbol at offset 0x21b10 or anywhere near it in msvcrt.dll. My program does appear to be using msvcrt.dll -- directly -- but I don't know how to get the right symbol names associated with the addresses GDB returns during disassembly.
Ideas?