home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
exemap.zip
/
EXEMAP.DOC
< prev
next >
Wrap
Text File
|
1993-05-06
|
7KB
|
163 lines
--------------------------------------------------------------------------
VERSION 2.1.1 of EXEMAP Availability Notice Employee Written Software
--------------------------------------------------------------------------
(c) Copyright International Business Machines Corporation 1993.
All rights Reserved.
Author: Brian Kenn, Australian Programming Centre, IBM Australia
EXEMAP is a EXE file mapping tool that now all supported formats of
EXE files. This includes the latest LX format for OS/2 V2.x, as well
as the NE format for OS/2 V1.x, Windows 3.x, as well as the original
DOS format.
The program is similar in concept to EXEHDR, which is part of the
Toolkit, but provides more extensive information than EXEHDR currently
provides.
The syntax of the command is -
EXEMAP filename[.EXE] [[/M:loadseg]|[/P:pspseg]][/C][/N]
Where:
filename : is any valid drive\path\name.ext file specification.
If the extension is omitted, .EXE is assumed.
/M:loadseg : is the segment (in hex) at which the PC DOS module is
loaded. The PSP is at loadseg-10h.
/P:pspseg : is the segment (in hex) of the PSP for PC DOS modules.
The code is loaded at pspseg+10h.
/C : hints that the EXE file will be converted to a COM file
and that it therefore contains the PSP. /M and /P are then
equivalent.
/N : suppresses the display of relocation items.
When neither /M nor /P are specified, NO PSP segment will be assumed.
The output, which may be quite lengthy, can be redirected to an appropriate
file for browsing.
For example:
EXEMAP C:\OS2\DLL\PMWIN.DLL >PMWIN.MAP
Since EXEMAP.EXE is, itself, an OS/2 module, it can be used to map itself
to demonstrate the new EXE header options.
EXEMAP will run on PC-DOS 3.x+ ,OS/2 V1.3 or V2.x.
NOTE: The use of the PSP and load segment options cause some problems
in an OS/2 environment. When a module is executing under OS/2,
there is no such thing as a PSP, and the segment load address is
meaningless. For this reason, EXEMAP does not assume any
segment fixup values, and simply reports the relocation items as
they occur in the header. EXEMAP differs by assuming the load
segment is the same as the load segment under which it is
executing, and then uses this segment value to perform the
relocation fixup on each of the relocation items. Options are
also provided to override this default assumption.
EXEMAP, instead, makes no assumption about segment values. If
the relocation item fixup function is required, an appropriate
segment value can be specified by using the /M or /P options.
The EXEMAP.ZIP file consists of the following files:
EXEMAP.DOC - This file.
EXEMAP.EXE - The program file.
======================================================================
Changes with 2.1.0
- A very major re-write of the program has been undertaken for this
version. Every part of the code has been re-written, and even today
minor bugs have been fixed in the DOS and OS/2 V1.x portions of the
code.
For OS/2 1.3, the major outstanding bug that has been fixed, is the
correct support of relocation information in iterated data segments.
The Windows support has been updated to 3.1 level, with several new
fields now being reported. This includes the Windows version level
of a module.
The big-ticket item this time round is that OS/2 V2.x is now supported
in all its glory. EXEHDR gives you a partial view of the information
in an OS/2 V2.x EXE file, but EXEMAP goes much further. The
difference in this version is that much more interpretation is given
to the information, that merely displaying the data from the file.
For example:
- Resources are identified by major type -
───────────────────────────────────────────────────────────────────────────────
Resource Table
───────────────────────────────────────────────────────────────────────────────
Type Name Size Object Offset
0001 1 00000DAA 8 00000000 Bitmap Array
0002 2,145 00002030 A 00005FB4 Bitmap Array
0003 900 00000011 7 00000000 Menu
000A 1 00000024 8 0000FDA8 Error Message Table
000A 113 000001E6 8 0000FDCC Error Message Table
0012 3,000 0000000A B 00000000 Help Table
0012 4,002 00000392 9 0000F418 Help Table
0013 3,001 00000058 B 0000000C Help Subtable
0013 4,003 00000004 8 0000FFB4 Help Subtable
───────────────────────────────────────────────────────────────────────────────
- Relocation information now displays module ordinals with a translation
back to the original function name used by the programmer. This makes
it very easy to identify where in a program a specific operating system
call is made.
───────────────────────────────────────────────────────────────────────────────
Page Relocation Information
───────────────────────────────────────────────────────────────────────────────
Object: 1 / Page: 1
Selector Internal Object 1 Alias
0264
Object: 2 / Page: 1
16:16 Pointer Modordinal PMWIN.65 (WinGetMsg) Alias
00C1
16:16 Pointer Modordinal PMWIN.68 (WinDispatchMsg) Alias
021D
16:16 Pointer Modordinal PMGPI.196 (GpiCreateBitmap) Alias
0FB4
16:16 Pointer Modordinal PMWIN.69 (WinPostMsg) Alias
0139
16:16 Pointer Modordinal PMGPI.197 (GpiDeleteBitmap) Alias
0978
16:16 Pointer Modordinal PMGPI.198 (GpiSetBitmap) Alias
0FD2
───────────────────────────────────────────────────────────────────────────────
- Entry points in the entry table now include the external name
of the entry point, where available. This makes the identification
of entry points extremely easy.
───────────────────────────────────────────────────────────────────────────────
Entry Table
───────────────────────────────────────────────────────────────────────────────
Ordinal Obj Offset Flag Attributes
1 2 000046C8 03 Entry16 EXPORT GLOBAL (DRGACCESSDRAGINFO)
2 2 0000331A 03 Entry16 EXPORT GLOBAL (DRGADDSTRHANDLE)
3 2 00004566 03 Entry16 EXPORT GLOBAL (DRGALLOCDRAGINFO)
4 2 00004AB5 03 Entry16 EXPORT GLOBAL (DRGALLOCDRAGTRANSFER)
───────────────────────────────────────────────────────────────────────────────
- All of these readability features also apply to OS/2 V1.x modules.