HP 3000 Manuals

LISTPROG [ HP Link Editor/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Link Editor/XL Reference Manual

LISTPROG 

This command displays (on LINKLIST) the symbols in an executable program
file.  This command produces the same output as the MAP option of the
LINK command.

If you do not specify which symbols to display using the parameters
listed below, the following types of symbols are displayed:

   *   Procedure and program entry points.

   *   Unresolved external symbols.

   *   Imported code symbols.

   *   HP COBOL II chunk symbols.

   *   Exported data symbols, except compiler-generated symbols beginning
       with $, S$, or C$.

   *   Certain compiler-generated static data symbols, beginning with M$,
       which appear in HP COBOL II listings.

   *   Storage requests (for example, HP FORTRAN 77 COMMON).

   *   Module symbols.

Syntax 

        LISTPROG PROG= executable_prog_file 
                 [;ALL]
                 [;CODE]
                 [;DATA]
                 [;ENTRYSYM]
                 [;MILLICODE]
                 [;STUB]
                 [;VALUE]

Parameters 

executable_prog_file      Names the executable program file to display.

ALL                       Displays the symbols in the executable program
                          file, including compiler-generated local
                          symbols.

CODE                      Displays all imported and exported (not local)
                          code symbols.

DATA                      Displays all exported data symbols and storage
                          requests.

ENTRYSYM                  Displays all procedure and program entry
                          points.

MILLICODE                 Displays all millicode symbols.

STUB                      Displays all stub and plabel symbols.

VALUE                     Displays the symbols (within symbol type) by
                          their value rather than alphabetically by their
                          name.

Example 

       LinkEd> LISTPROG EX1PROG

This command displays symbols in the executable program file, EX1PROG.
(The source program for EX1PROG is EX1SRC and is shown in figure 2-11.)

The first part is the header which gives general information about the
executable program file.  PROGRAM names the executable program file.  XL
LIST shows the names of executable libraries specified in the XL
parameter of the LINK command.  CAPABILITIES shows the capabilities
assigned to the program via the CAP parameter of the LINK command.
NMHEAP SIZE gives the value specified by the NMHEAP parameter of the LINK
command.  NMSTACK SIZE shows the value specified for the NMSTACK
parameter of the LINK command.  And finally, VERSION gives the format
version of the executable program file.  The symbols in the executable
program file are listed next.  See the next section "Understanding the
Symbol Listing" for explanations of the symbols and columns appearing in
the symbol portion of the listing.

     PROGRAM        : EX1PROG
     XL LIST        :
     CAPABILITIES   : BA, IA
     NMHEAP SIZE    :
     NMSTACK SIZE   :
     VERSION        : 85082112

     Sym                       C H X P Sym    Sym        Sym       Lset
     Name                              Type  Scope      Value      Name
     ----                      - - - - ----  -----      -----      ----
     $START$                   0   3 3 sec_p univ       000059B4
     _start                    0   3 3 sec_p univ       00005A04
     ex1                       0   3 3 pri_p univ       000059E8
     M$1                       0       data  local   dp+00000000

Understanding the Symbol Listing 

This section describes the fields that appear in the symbol listing
produced by this command.

Column                Description 

Sym Name              Contains the name of the symbol.  If the name
                      exceeds 25 characters, it is truncated and an
                      asterisk appears in the first truncated position.

C                     Contains the type checking level of the symbol.
                      See the PARMCHECK= check_level parameter of the
                      ADDXL and LINK commands for a definition of the
                      values that appear in this column.

H                     Specifies whether the symbol is hidden or not.  If
                      an H appears in this column, the symbol was hidden
                      by the HIDERL command.  If the column is blank, the
                      symbol is not hidden.

X                     Specifies the xleast level of the symbol.  See the
                      XLEAST= xleast_level parameter of the ADDXL command
                      for a definition of the values that appear in this
                      column.

P                     Specifies the privilege or execution level at which
                      this symbol runs.  See the PRIVLEV= priv_level 
                      parameter of the ADDXL and LINK commands for a
                      definition of the values that appear in this
                      column.

Sym Type              Contains the symbol type.  The symbol types are
                      shown below (see Table 4-2  for the relationship
                      of Sym Type values to Sym Scope values).

                      abs     -  Absolute
                      code    -  Code
                      data    -  Data
                      entry   -  Entry
                      milli   -  Millicode
                      mod     -  HP Pascal module name
                      plab    -  Procedure label
                      pri_p   -  Primary program entry point
                      sec_p   -  Secondary program entry point
                      stub    -  Stub

Sym Scope             Specifies the symbol's scope.  The symbol scopes
                      are shown below (see Table 4-2  for the
                      relationship of Sym Scope values to Sym Type
                      values).

                      ext     -  External
                      local   -  Local
                      univ    -  Universal

Sym Value             Specifies the value of the symbol.  For pri_p,
                      sec_p and entry univ symbols, this column contains
                      the address of an export stub.  For stub ext and
                      plab local symbols (values displayed in the lp+
                      format), this column shows the address of the XRT
                      entry for this import stub.  For stub local
                      symbols, this column contains the address of the
                      stub (a promotion stub or an import stub).  For all
                      data univ symbols, this column contains the address
                      of a literal (if not represented in dp+ format) or
                      the offset from the dp (data pointer) register.
                      For all other symbols, it shows the address of the
                      symbol.

Lset Name             Specifies the name of the locality set to which
                      this symbol belongs.  Only user-defined locality
                      sets are listed.

          Table 4-2.  Symbol Types and Scopes (LISTPROG) 

-----------------------------------------------------------------------------------------------
|                   |                   |                                                     |
|     Sym Type      |     Sym Scope     |                     Description                     |
|                   |                   |                                                     |
-----------------------------------------------------------------------------------------------
|                   |                   |                                                     |
| abs               | univ              | A symbol that defines a non-relocatable symbol or   |
|                   |                   | value and is visible to other object modules.       |
|                   |                   |                                                     |
| abs               | local             | A symbol that defines a non-relocatable symbol or   |
|                   |                   | value and is invisible to other object modules.     |
|                   |                   |                                                     |
| code              | local             | A local label generated by the compiler, a user     |
|                   |                   | label or a local label within a millicode routine.  |
|                   |                   |                                                     |
| code              | univ              | The actual starting point of the code of a level    |
|                   |                   | one procedure or function.  An entry univ symbol    |
|                   |                   | must exist for this symbol in order for other       |
|                   |                   | object modules to reference the procedure or        |
|                   |                   | function.                                           |
|                   |                   |                                                     |
| data              | local             | A data symbol which is visible inside an object     |
|                   |                   | module, but invisible to other object modules.      |
|                   |                   |                                                     |
| data              | univ              | A data symbol defined in an object module that is   |
|                   |                   | visible to other object modules.                    |
|                   |                   |                                                     |
| entry             | univ              | The export stub for a level one procedure or        |
|                   |                   | function.  It is visible to other object modules.   |
|                   |                   |                                                     |
| entry             | local             | The entry point to a nested procedure or program,   |
|                   |                   | referenceable only within the module.               |
|                   |                   |                                                     |
| milli             | univ              | A millicode routine linked into an object module.   |
|                   |                   |                                                     |
| mod               | local             | An HP Pascal module name.                           |
|                   |                   |                                                     |
| plab              | local             | An export stub created for a procedure or function  |
|                   |                   | (declared in a relocatable object module) whose     |
|                   |                   | address has been taken.                             |
|                   |                   |                                                     |

| pri_p             | univ              | The main entry point into an outer block of a       |
|                   |                   | program file.                                       |
|                   |                   |                                                     |
| sec_p             | univ              | The secondary entry point into an outer block of a  |
|                   |                   | program file.                                       |
|                   |                   |                                                     |
| stub              | ext               | A procedure or function which is referenced by an   |
|                   |                   | object module but not defined by it.  The loader    |
|                   |                   | resolves this reference at run time.                |
|                   |                   |                                                     |
| stub              | local             | A promotion or an import stub.                      |
|                   |                   |                                                     |
-----------------------------------------------------------------------------------------------



MPE/iX 5.0 Documentation