Rob Latham writes:
> [EMAIL PROTECTED] ([EMAIL PROTECTED]) said:
> 
> > I have on my system an elf binary named pedump that does I think what
> > you want.   Unfortunately, I can't find any trace of where I got it, so
> > I'll let it speak for itself and hope that may give you a clue.  
> 
> http://oak.oakland.edu/pub/simtelnet/win95/prog/pedump.zip
> 
> but it builds fine on linux (last i checked about a year ago).
> 
This seems to be an old pedump  utility from Sang Cho's disassambler
suite, mentioned on http://www.winehq.com/tools.html
(ftp://ftp.winehq.com/pub/wine/disasm.tar.gz)
PEdump is now incorporated in the disassembler, but the tool missed
command line switches to only dump the Header.
Sang Cho sometimes told me that he abandoned his project.

Apply appended patch to inhibit heap corruption with pedump from
http://oak.oakland.edu/pub/simtelnet/win95/prog/pedump.zip

Bye

Uwe Bonnes                [EMAIL PROTECTED]

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

--- pedump.c~   Wed Oct 15 23:30:40 1997
+++ pedump.c    Wed Mar  8 10:25:44 2000
@@ -1168,7 +1168,8 @@
     while (dwFunctionName &&
           *(pdw=(DWORD *)GetActualAddress (lpFile, dwFunctionName)) )      
        {
-           if ((*pdw) & 0x80000000 )   nSize += mnlength + 10 + 1 + 6;
+           if ((*pdw) & 0x80000000 )   nSize += 4   + 2 +    mnlength + 1   + 10      
+   +1;
+           /*                                  DWORD  short  dllname   ":"  
+"NoNameXXXX" "\0"*/
            else nSize += strlen ((char *)GetActualAddress (lpFile, *pdw+2)) + 1+6;
            dwFunctionName += 4;
            nCnt++;

Reply via email to