http://www.perlmonks.org?node_id=1006968


in reply to Re^4: 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

Well, I managed to "see" it, but it is persistently greyed out, how do you turn it on?

Replies are listed 'Best First'.
Re^6: if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location
by bulk88 (Priest) on Dec 04, 2012 at 22:43 UTC
    Open perl.exe, not somexsmodule.dll. Then it will not be greyed out.

      Aha, now that is more interesting -- taking your advice from earlier enabling debugging info  perl -pi.orig -le " if( m{^\s*(OPTIMIZE|CCFLAGS|LDDLFLAGS|LDFLAGS)\s*=}i ){ s{ -s }{   }g } " Makefile

      And now I'm cooking with gas :) The relevant snippet from depends.exe

      GetProcAddress(0x674C0000 [auto\io\IO.DLL], "boot_IO") called from "PE +RL516.DLL" at address 0x713DD74F and returned 0x674C2670. LoadLibraryExA("blib\arch\auto\XML\LibXML\LibXML.dll", 0x00000000, LOA +D_WITH_ALTERED_SEARCH_PATH) called from "PERL516.DLL" at address 0x71 +3DA0DE. LDR: LdrRelocateImageWithBias() failed 0xc000007b LDR: OldBase : 6E400000 LDR: NewBase : 010A0000 LDR: Diff : 0xffffffff92ca0000 LDR: NextOffset : 012D9F88 LDR: *NextOffset : 0x302e LDR: SizeOfBlock : 0x5c LoadLibraryExA("blib\arch\auto\XML\LibXML\LibXML.dll", 0x00000000, LOA +D_WITH_ALTERED_SEARCH_PATH) returned NULL. Error: %1 is not a valid W +in32 application (193).

      now Dynaloader also spits out for module XML::LibXML: load_file:%1 is not a valid Win32 application ...

        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.