Yes, I think that's what I got the first time. I've not had time to play around with it further, and I get the impression that pntld was created because NT shared libraries don't do lazy resolution? I'm not sure what
The main reason is that NT shared libraries (AFAIK) don't support linking against symbols in the loading binary.
the problem is, as load_module does load the module and resolve all of the symbols. It just seems to not like one or more segments. I'm not sure yet whether that's coming from pntld (in which case the problem is in pntld), or whether it's from the mingw library stubs that the module is linked against (in which case the problem is in the nt dynamic loading stuff).
You can try enabling DLDEBUG in dlopen.c for lots of debug.
I've pretty much given up on using ld -shared, as there doesn't seem to be any way to force it to supress errors for unresolved symbols (even though there are command options to do just that, they don't seem to have any effect).
Thus the reason for the existence of pntld.
As always, suggestions are welcome!
Bill