Google (http://groups.google.com/group/microsoft.public.win32.programmer.kernel/msg/4e96409329944018?dmode=source) says you have a non-relocatable DLL. I think you messed up a different compiler flag when you removed -s, or there is a bug in your Mingw. Look for a PE .reloc section (looking at mingw produced dlls, they all have .reloc sections), or for a by the book answer 100% accurate answer, look in the Data Directory, then at IMAGE_DIRECTORY_ENTRY_BASERELOC entry ("Relocation Table") and make the RVA and size aren't 0. I use StudPE. There are other tools out there ("dumpbin mydll.dll" will show section names and sizes, I also know of PE Explorer (shareware)). Try running dependency walker on a dll that was compiled with "-s" and the makefile unchanged.
in reply to Re^7: if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location
in thread if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location