Use this command to display link map data about a C load module.
Link map data for each C load module consists of the names and addresses of
all the object files and C functions in the C load module.
Requirements and Restrictions
- You can enter this command only for C load modules.
- You must build the C load module offline in such a way that it contains
link map data. See TPF Application
Programming for more information about how to include link map data when
building C load modules.
Format
- progname
- is a 4-character alphanumeric C load module name.
- Loadset
- specifies the loadset that contains the C load module you want to
display. If you do not specify this parameter and there is more than
one version of the program active in main storage, the activation number of
the entry control block (ECB) determines the version of the program that is
displayed. If there are no active versions in loadsets, the base
version is displayed.
- lsname
- is the 5- to 8-character alphanumeric name of a loadset.
- BASE
- displays the base version of the C load module.
The LOADSET parameter is valid only after the E-type loader
restart routine ends.
- Objfile-objname
- displays link map data for one or more object files, where
objname is the object file name. Object file names are 4 to 6
alphanumeric characters, but you can specify less than 4 characters if you use
a wildcard character. Object file versions are not considered part of
the object file name for purposes of matching. If you do not specify
this parameter, link map data is displayed for all object files in the C load
module.
- Function-funcname
- displays link map data for one or more functions, where funcname
is the function name. If you do not specify this parameter, link map
data for functions is not displayed; only link map data for object files
is displayed.
- Note:
- Not all functions in a C load module will be included in the link map
display:
- Only functions that include a standard C function prolog (functions
written in C or functions written in assembler that use the TMSPC and TMSEC
macros) will be included in the link map display.
- Functions that are not referenced in the C load module will not be
included in the link map display.
- If you use the INLINE option to compile any of the included object files,
some functions may not be included in the link map display. See the
user's guide, programmer's guide, and language reference for the IBM
C or C++ compiler on the System/390 platform used by your installation for
more information about the INLINE option.
- Address-addr
- displays the following link map data, where addr is a 1- to
8-character hexadecimal address:
- The name and address of the closest function that has an address less than
the specified address and the name and address of the object file that
contains that function.
- The name and address of the object file that contains the specified
address.
- The offset of the specified address into the listed object file.
- The name and address of the closest function in the listed object file
that has an address less than the specified address (if there is one).
The C load module must be in main storage and the specified address must
be in the specified C load module.
Additional Information
- Online help information is available for this command. To display
the help information, enter one of the following:
ZDMAP HELP
ZDMAP ?
- The OBJFILE and FUNCTION parameters act as filters. If you specify
both parameters, the link map display will include:
- Object files that match the specified object file name and also include
functions with matching function names.
- The matching functions in those object files.
- A zero-length object file can be part of the display. Some possible
reasons for a zero-length object file include:
- The object file defines a zero-length CSECT.
- The object file defines nothing at all.
- The object file defines only duplicate CSECTs.
- The object file defines only DSECTs or C structures.
- The object file was included more than once in the build script.
- You can include an asterisk (*) in either the function name or the object
file name as a wildcard character to match zero or more characters in the
name. You must use the wildcard character on terminals that do not
support special characters such as the underscore character (_), which may
be part of a function name.
- Case is ignored when matching function names and when matching object file
names.
- Addresses displayed as part of the link map display are only valid as long
as the C load module remains in main storage at the same address. Lock
programs in main storage by using the ZRPGM command, and avoid E-type loader
activity that could overwrite programs or remove them from main storage to
ensure the addresses are valid for any length of time.
- You can display the main storage copy of a C load module contained in a
loadset that was deactivated if the program allocation table (PAT) slot for
the program version was not deleted. However, if the loadset is
activated again, you cannot display the previous main storage copy of the C
load module in the loadset because all references to that loadset use the copy
of the program that was activated in main storage.
- In a loosely coupled complex, the ZDMAP command displays link map data for
the program base currently used by the processor from which you enter the
command. This command cannot be used to display the program link map
data of any other image.
- If you enter the ZDMAP command before the E-type loader restart
routine completes its processing, you cannot specify the LOADSET
parameter. Therefore, you can use this command to display only the base
version of a program during restart.
Examples
The following information is displayed in the examples:
- COMPILED ON
- The compilation date and time of the object file in the C load module will
not be displayed if the information is not available.
- FUNCTION NAME
- As many as 255 characters of a function name will be displayed. The
output shown in the examples is for terminals that support lowercase
characters and special characters such as the underscore character
(_). See TPF System Installation Support
Reference for information about how to customize your output with a user
exit.
- OFFSET
- This hexadecimal value is the offset of the function into the object
file.
- ADDRESS
- If the address is in the range of the C load module, the name and address
of the closest function that has an address less than the specified address
(if there is one), the name and address of the object file that contains that
function, and the offset of the specified address into the listed object file
will be displayed.
The following example displays online link map information for all object
files included in C load module CDM0. Only the first page is
displayed. By entering ZPAGE, a second page would be displayed.
+--------------------------------------------------------------------------------+
|User: ZDMAP CDM0 |
| |
|System: DMAP0001I 15.18.25 LINK MAP DATA DISPLAY |
| CDM0J1 ACTIVE IN LOADSET LINKMAP |
| C LOAD MODULE ADDRESS - 02181020 |
| C LOAD MODULE SIZE - 00003774 |
| |
| CDMAINJ1 IS AN OBJECT FILE AT ADDRESS 02181098 |
| OBJECT FILE SIZE - 00000250 |
| COMPILED ON 1997/03/18 AT 10.20.26 |
| |
| CDMPRSJ1 IS AN OBJECT FILE AT ADDRESS 021812F0 |
| OBJECT FILE SIZE - 00000520 |
| COMPILED ON 1997/03/18 AT 10.20.41 |
| |
| CDMHLPJ1 IS AN OBJECT FILE AT ADDRESS 02181818 |
| OBJECT FILE SIZE - 00000118 |
| COMPILED ON 1997/03/18 AT 10.23.03 |
| |
| CDMDSPJ1 IS AN OBJECT FILE AT ADDRESS 02181938 |
| MORE DATA AVAILABLE, ENTER ZPAGE TO CONTINUE |
+--------------------------------------------------------------------------------+
The following example displays the address of a specific function in the C
load module. In this example, the C load module is the ISO-C library
called CTAL.
+--------------------------------------------------------------------------------+
|User: ZDMAP CTAL F-SERRC_OP |
| |
|System: DMAP0001I 15.18.25 LINK MAP DATA DISPLAY |
| CTALJ1 ACTIVE IN LOADSET LINKMAP2 |
| C LOAD MODULE ADDRESS - 0188D440 |
| C LOAD MODULE SIZE - 00016F90 |
| |
| CSERRO40 IS AN OBJECT FILE AT ADDRESS 0189CB68 |
| OBJECT FILE SIZE - 000000F8 |
| COMPILED ON 1996/09/11 AT 14.36.16 |
| OFFSET ADDRESS FUNCTION NAME |
| 00000000 0189CB68 serrc_op |
| |
| END OF DISPLAY |
+--------------------------------------------------------------------------------+
The following example displays the addresses of all functions matching
ZDMAP_PARSE* in C load module CDM0. Because the OBJFILE parameter is
not used, the matching function and any object files that contain the matched
function are displayed. For example, if a function has the same name in
multiple object files in the C load module, all matching instances of the
function that have a different address are displayed.
For the same result, you can also enter:
ZDMAP CDM0 OBJFILE-* FUNCTION-ZDMAP_PARSE*
+--------------------------------------------------------------------------------+
|User: ZDMAP CDM0 FUNC-ZDMAP_PARSE* |
| |
|System: DMAP0001I 15.18.25 LINK MAP DATA DISPLAY |
| CDM040 ACTIVE IN LOADSET BASE |
| C LOAD MODULE ADDRESS - 0219B020 |
| C LOAD MODULE SIZE - 00003774 |
| |
| CDMPRSJ1 IS AN OBJECT FILE AT ADDRESS 0219B2F0 |
| OBJECT FILE SIZE - 00000520 |
| COMPILED ON 1997/03/18 AT 10.20.41 |
| OFFSET ADDRESS FUNCTION NAME |
| 00000000 0219B2F0 zdmap_parse |
| |
| CDMER1J1 IS AN OBJECT FILE AT ADDRESS 0219CC18 |
| OBJECT FILE SIZE - 00000140 |
| COMPILED ON 1997/03/18 AT 10.20.53 |
| OFFSET ADDRESS FUNCTION NAME |
| 00000000 0219CC18 zdmap_parse_error_handler |
| |
| END OF DISPLAY |
+--------------------------------------------------------------------------------+
In the following example, the asterisk (*) is used as a wildcard character
to request all functions beginning with process in C load module
CDM2 in loadset LINKMAP in object file CDMPRC.
The following are some examples with specific letters:
- process* yields all functions (and the object files in which
they are contained) that begin with process.
- *process yields all functions (and the object files in
which they are contained) that end with process.
- *process* yields all functions (and the
object files in which they are contained) that contain character string
process.
- process*it* yields all functions (and the object files in which
they are contained) that begin with process and contain character
string it.
+--------------------------------------------------------------------------------+
|User: ZDMAP CDM2 L-LINKMAP O-CDMPRC F-PROCESS* |
| |
|System: DMAP0001I 15.18.25 LINK MAP DATA DISPLAY |
| CDM2J1 ACTIVE IN LOADSET LINKMAP |
| C LOAD MODULE ADDRESS - 021C2020 |
| C LOAD MODULE SIZE - 00001F3C |
| |
| CDMPRCJ1 IS AN OBJECT FILE AT ADDRESS 021C2098 |
| OBJECT FILE SIZE - 00001C18 |
| COMPILED ON 1997/03/18 AT 10.24.13 |
| OFFSET ADDRESS FUNCTION NAME |
| 000002A0 021C2338 process_Address |
| 00000618 021C26B0 process_one_object_file |
| 00000FE8 021C3080 process_one_function |
| 00001238 021C32D0 process_Objfile_and_Function |
| 00001848 021C38E0 process_return_storage |
| |
| END OF DISPLAY |
+--------------------------------------------------------------------------------+
The following example displays the closest object file and function that
has an address less than the specified address. The offset of the
specified address into the object file is also displayed.
+--------------------------------------------------------------------------------+
|User: ZDMAP CDM3 A-21C7100 |
| |
|System: DMAP0001I 15.18.25 LINK MAP DATA DISPLAY |
| CDM340 ACTIVE IN LOADSET BASE |
| C LOAD MODULE ADDRESS - 021C7020 |
| C LOAD MODULE SIZE - 00000268 |
| |
| CDMRELJ1 IS AN OBJECT FILE AT ADDRESS 021C7098 |
| OBJECT FILE SIZE - 00000160 |
| COMPILED ON 1997/03/18 AT 10.24.01 |
| OFFSET ADDRESS FUNCTION NAME |
| 00000000 021C7098 tpf_cdm3_release_locks |
| |
| 021C7100 IS AT OFFSET 000068 INTO OBJECT FILE CDMRELJ1 |
| |
| END OF DISPLAY |
+--------------------------------------------------------------------------------+
Related Information