Browse Prior Art Database

Extraction and Hierarchical Reporting of Program Linkage Relationships

IP.com Disclosure Number: IPCOM000121879D
Original Publication Date: 1991-Oct-01
Included in the Prior Art Database: 2005-Apr-03
Document File: 6 page(s) / 205K

Publishing Venue

IBM

Related People

Lee, JP: AUTHOR [+2]

Abstract

The inner workings of a programming development tool known as CALLTREE are described. This tool performs the following: - Module linkage information is extracted from the output of the link/bind step. - Module names and module addresses are parsed from the bind/link map. - Inter-module reference information is derived from the bind/link object relocation dictionary. - A test is made for CALL op codes at the linkage points to distinguish inter-module calls from other references. - A listing is generated that shows call nesting hierarchy, recursion warning, module descriptions and module type. - A cross reference is generated that shows all callers of each module.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 49% of the total text.

Extraction and Hierarchical Reporting of Program Linkage Relationships

      The inner workings of a programming development tool
known as CALLTREE are described.  This tool performs the following:
-  Module linkage information is extracted from the output of the
link/bind step.
     -  Module names and module addresses are parsed from the
bind/link map.
     -  Inter-module reference information is derived from the
bind/link object relocation dictionary.
     -  A test is made for CALL op codes at the linkage points to
distinguish inter-module calls from other references.
-  A listing is generated that shows call nesting hierarchy,
recursion warning, module descriptions and module type.
-  A cross reference is generated that shows all callers of each
module.

      CALLTREE is a tool that extracts and reports linkage
relationships in multi-module programs.  It is currently implemented
as a VM REXX EXEC that can analyze Motorola 680X0 programs developed
with the M6BIND binder.  The underlying concepts and techniques may
be applicable to other environments.

      As illustrated in Fig. 1, the input to CALLTREE consists of the
link/bind map, the link/bind object, and module descriptions
(discrete or consolidated), if available.  The output of CALLTREE is
a listing and a consolidated module descriptions file that improves
the performance of subsequent invocations.

      An example of a link/bind map is shown in Fig. 2.  The map
identifies names of modules involved (SHMSX, SHMTMR, SHMTR1, etc., in
this example), and addresses in each module that other modules can
reference (012574, 0129C8, 013094, etc).  However, there is no
indication of what modules, if any, reference each address.

      As shown in Fig. 3, a typical link/bind object file contains
the following:
-  a header containing lengths of other fields
-  executable code and static data (TEXT)
-  a relocation dictionary (RLD) that identifies fields needing
adjustment if the TEXT is loaded at a different address
-  a system relocation dictionary that identifies references to names
not resolved, if any
-  an external symbol dictionary that contains offsets of names
available for possible subsequent linker/binder processing steps

      The CALLTREE algorithm takes advantage of the fact that a
static call from any module to another results in an RLD element in
the link/ bind object file.  However, not all RLD elements are the
result of inter-module calls.  CALLTREE uses RLD information
selectively.

      The CALLTREE algorithm consists of these major steps:
1.   The module names and module addresses are parsed out of the
link/bind map and put in a temporary table.
2.   Each RLD element in the link/bind object is processed as
follows:
      a.   The "sign", "type", and "length-1" fields shown in Fig. 3
are tested for values consistent with the compilers inter-module
linkage method (for example, PL.8 targeted to 680X0 u...