The pedump Utility

This utility has been the workhorse of lcc-win32. Without it, the linker and the debugger would not exist. To be able to generate something, you must be able to see what you are generating. See the technical documentation for more information about pedump.

Files types dumped are:

·EXE               Executable files

·OBJ               Object files

·RES               Resource files

·DLL               DLLs

·OCX              Type libraries+dlls

·LIB                Libraries

·TLB/OCA      Type libraries

·DBG              DLLs debug info

 

Option
Description

/A

Includes everything in the output. All sections, all data dumps, etc. The code sections will be disassembled and if debug information is available, the line numbers will be annotated in the resulting output.

/D

Dumps the code view or gcc debug information. This option supports the NB09 Standard from Microsoft, and the STABS format from gcc.

/E

Dump the resources section.

/EXP

If given an import library, pedump will generate a list of the exported functions in a format suitable for the buildlib utility. See FAQ question 12 for further explanation. If given a DLL, pedump will print a list of the exported symbols from the DLL, in the same format. If given an object file, this option will trigger pedump to print a list of all public symbols defined in the object file, in the same format.

/functionsize

Will produce a table of all functions defined in the object or executable file sorted by their size in bytes. The executable should have a symbol table (debug information should be present).

/H

Includes a hexadecimal dump of the sections in the file.

/HEX

Dump contents in hexadecimal form, without any concern for structures in the file. This allows you to dump any type of file.

/L

Includes line number information.

/OUT:file

Prints the output into <file> instead of standard output. If the given file name contains spaces it should be enclosed in quotes.

/REL

Shows the relocations.

/R

Shows the resources in an executable.

/SUMMARY

Shows the sizes for the main parts of the file only.

/S

Dumps the symbol table. All the symbols are dumped with all the details. Useful if you are writing a compiler.

/SP

Writes all the exported/imported symbols from an object file or executable. This is a smaller and more readable output than /S.

/T

Dumps a type library. This will be determined automatically if you present to pedump a library that contains an exported function like DllRegisterServer.

/X

Extracts a section to a file. The name of the section immediately follows the “x”. For instance /x.data will create a data.scn file with the contents of the data section.