HP OpenVMS DCL Dictionary


Previous Contents Index


ANALYZE/OBJECT

Analyzes the contents of an object file on OpenVMS Alpha systems, and an Executable and Linkable Format (ELF) object file on OpenVMS Integrity server systems, and identifies obvious errors. The /OBJECT qualifier is required.

For general information about object files, see the description of the linker in the HP OpenVMS Linker Utility Manual. (Use the ANALYZE/IMAGE command to analyze the contents of an image file.)


Format

ANALYZE/OBJECT filespec[,...]


Parameter

filespec[,...]

Specifies the object files or object module libraries you want analyzed (the default file type is .OBJ). Use commas (,) or plus signs (+) to separate file specifications. The asterisk (*) and the percent sign (%) wildcard characters are allowed in the file specification.

Description

The ANALYZE/OBJECT command describes the contents of one or more object modules contained in one or more files. It also performs a partial error analysis. This analysis determines whether all records in an object module conform in content, format, and sequence to the specifications of the Integrity servers or Alpha Object Language.

On OpenVMS Integrity server systems, the ANALYZE/OBJECT command automatically distinguishes Integrity servers and Alpha objects by examining the format of the object modules header.

ANALYZE/OBJECT is intended primarily for programmers of compilers, debuggers, or other software involving the operating system's object modules. It checks that the ELF object format (Integrity servers or the object language records (Alpha) generated by the object modules are acceptable to the Linker utility, and it identifies certain errors in the file. It also provides a description of the records in the object file or object module library. For more information on the linker and on the Alpha object languages, see the HP OpenVMS Linker Utility Manual.

Notes

For Integrity servers images and objects, the Analyze utility determines whether the file it analyzes is an image file or object file. Although Analyze allows you to specify ANALYZE/IMAGE on an ELF object file, use ANALYZE/IMAGE for ELF image files and ANALYZE/OJBECT for ELF object files.

The OpenVMS Alpha versions of ANALYZE/OBJECT are not fully capable of analyzing non-platform objects (for example Integrity servers objects on Alpha).

The output format of ANALYZE/OBJECT for ELF objects may change. Further, the default behavior for analyzing ELF objects differs from the behavior for analyzing Alpha objects. For ELF objects, a summary of the major ELF tables is displayed. With this information, you can select specific sections for further analysis. To locate errors, the entire object should be analyzed by selecting all sections.

When you analyze Integrity servers objects on I64 platforms, ANALYZE/OBJECT accepts Alpha-only qualifiers, but ignores any effect of these qualifiers.

The ANALYZE/OBJECT command analyzes the object modules in order, record by record, from the first to the last record in the object module. Fields in each record are analyzed in order from the first to the last field in the record. After the object module is analyzed, you should compare the content and format of each type of record to the required content and format of that record as described by the OpenVMS Integrity servers or Alpha Object Language. This comparison is particularly important if the analysis output contains a diagnostic message.

ANALYZE/OBJECT displays the following information for object modules:

Linking an object module differs from analyzing an object module. The object's contents are not interpreted; rather, only the meta information is checked for consistency. As a result, even if the analysis is error free, the linking operation may not be. In particular, the analysis does not check the following for Alpha objects:

Therefore, as a final check, you should still link an object module whose analysis is error free.

If an error is found, however, the first error of the worst severity that is discovered is returned. For example, if a warning (A) and two errors (B and C) are signaled, then the first error (B) is returned as the image exit status, which is placed in the DCL symbol $STATUS at image exit.

ANALYZE/OBJECT uses positional qualifiers; that is, qualifiers whose function depends on their position in the command line. When a positional qualifier precedes all of the input files in a command line, it affects all input files. For example, the following command line requests that the analysis include the global symbol directory records in files A, B, and C:


$ ANALYZE/OBJECT/GSD A,B,C

Conversely, when a positional qualifier is associated with only one file in the parameter list, only that file is affected. For example, the following command line requests that the analysis include the global symbol directory records in file B only:


$ ANALYZE/OBJECT A,B/GSD,C

For Alpha objects, typically all records in an object module are analyzed. However, when the /DBG, /EOM, /GSD, /LNK, /MHD, /TBT, or /TIR qualifier is specified, only the record types indicated by the qualifiers are analyzed. All other record types are ignored.

By default, the analysis includes all record types unless you explicitly request a limited analysis using appropriate qualifiers.

Note

For Alpha objects, End-of-Module (EOM) records and module header (MHD) records are always analyzed, no matter which qualifiers you specify.

For Integrity servers objects, the Elf header, the section header table and the note section are always analyzed, no matter which qualifiers you specify.


Qualifiers

/DISASSEMBLE (Integrity servers only)

Positional qualifier.

Displays all sections of type SHT_PROGBITS where the executable flag is set (SHDR$M_SHF_EXECINSTR in the section header). The section data will be displayed as machine instructions with symbolization of labels, branch targets, and so on. All local and global symbols from the symbol table are used for symbolization. The output is similar to compiler generated machine code listings.

Note

This qualifier is accepted only for objects. Integrity servers images contain only global symbols, if any at all. In addition, output produced with this qualifier differs from output produced by ANALYZE/OBJECT/SECTIONS=CODE, which provides machine code output for the same sections, although without symbolization.

/DBG (Alpha only)

Positional qualifier.

Specifies that the analysis should include all debugger information records. If you want the analysis to include debugger information for all files in the parameter list, insert the /DBG qualifier immediately following the /OBJECT qualifier. If you want the analysis to include debugger information selectively, insert the /DBG qualifier immediately following each of the selected file specifications.

/EOM (Alpha only)

Positional qualifier.

Specifies that the analysis should be limited to MHD records, EOM records, and records explicitly specified by the command. If you want this to apply to all files in the parameter list, insert the /EOM qualifier immediately following the /OBJECT qualifier.

To make the /EOM qualifier applicable selectively, insert it immediately following each of the selected file specifications.

Note

End-of-module records can be EOM or EOMW records. See the HP OpenVMS Linker Utility Manual for more information.

/FLAGVALUES=(keyword[,...]) (Integrity servers only)

Several fields in an ELF module represent bit flags. Where possible, these bit-flag values are examined and displayed individually. By default, only the flag values that are set to 1 (ON) are displayed. The keywords are as follows:
Keyword Description
ON Displays all flags whose value is 1.
OFF Displays all flags whose value is 0.
ALL Displays all flag values. The keywords ON and OFF, in contrast, indicate the value of each specific flag bit.

/GSD (Alpha only)

Positional qualifier.

Specifies that the analysis should include all global symbol directory (GSD) records.

If you want the analysis to include GSD records for each file in the parameter list, specify the /GSD qualifier immediately following the /OBJECT qualifier.

If you want the analysis to include GSD records selectively, insert the /GSD qualifier immediately following each of the selected file specifications.

/INCLUDE [=(module[,...])]

When the specified file is an object module library, use this qualifier to list selected object modules within the library for analysis. If you omit the list or specify an asterisk (*), all modules are analyzed. If you specify only one module, you can omit the parentheses.

/INTERACTIVE

/NOINTERACTIVE (default)

Controls whether the analysis occurs interactively. In interactive mode, as each record is analyzed, the results are displayed on the screen, and you are asked whether you want to continue.

/LNK (Alpha only)

Positional qualifier.

Specifies that the analysis should include all link option specification (LNK) records.

If you want the analysis to include LNK records for each file in the parameter list, specify the /LNK qualifier immediately following the /OBJECT qualifier.

If you want the analysis to include LNK records selectively, insert the /LNK qualifier immediately following each of the selected file specifications.

/MHD (Alpha only)

Positional qualifier.

Specifies that the analysis should be limited to MHD records, EOM records, and records explicitly specified by the command. If you want this analysis to apply to all files in the parameter list, insert the /MHD qualifier immediately following the /OBJECT qualifier.

To make the /MHD qualifier applicable selectively, insert immediately following each of the selected file specifications.

/OUTPUT [=filespec]

Directs the output of the object analysis (the default is SYS$OUTPUT). If you specify a file type and omit the file name, the default file name ANALYZE is used. The default file type is .ANL.

The asterisk (*) and the percent sign (%) wildcard characters are not allowed in the file specification.

/PAGE_BREAK=keyword (Integrity servers only)

Specifies if and where page breaks (form feeds) are inserted in the report file. This qualifier is only useful if /OUTPUT is used to write a report file. It is ignored if /INTERACTIVE is used to specify an interactive analysis.

The keywords are as follows:
Keyword Description
NONE Creates a report without any page break.
PRINTABLE_REPORT Creates a printable report with page breaks as in listing files. The number of lines per page is the default number of lines on a printer page. This is the default behavior for ANALYZE_OBJECT when no qualifier is not specified.
SEPARATE_INFORMATION Inserts a page break between different section information.

/SECTIONS [=(keyword[,...])] (Integrity servers only)

Selects individual program sections or section types to display.

Note

This qualifier and its keywords can only be used to form an inclusion list of sections to be displayed. This qualifier is not negatable and cannot be used to form an exclusion list. If no values are specified, the default keyword is HEADERS.

The keywords are as follows:
Keyword Description
ALL Displays a detailed analysis of every section in the module. Note that this keyword can generate a large amount of output.
CODE Displays all sections of type SHT_PROGBITS where the executable flag is set (SHDR$M_SHF_EXECINSTR in the section header). The section data will be displayed as machine instructions.
DEBUG
[=(suffix[,...])]
Analyzes and displays sections consisting of debug formatted debug information.

In addition, you can use a list of debug section name suffixes to selectively format DEBUG information. The debug section names, which appear as ".debug_suffix", can be viewed in the summary table. The suffix can be specified as follows:

  • ABBREV---Formats DEBUG abbreviations
  • ARANGES---Formats DEBUG address lookup tables
  • FRAME---Formats DEBUG frame descriptors for unwinding
  • INFO---Formats DEBUG symbols
  • LINE---Formats DEBUG source line info
  • PUBNAMES---Formats DEBUG name lookup tables
  • PUBTYPES---Formats DEBUG type lookup tables
EXTENSIONS Analyzes and displays sections of type SHT_IA64_EXT. The data is displayed in hexadecimal format.
GROUP Analyzes and displays sections of type SHT_GROUP. Sections of this type consist of a list of the section numbers of sections belonging to that group.
HEADERS The default keyword. Displays the ELF header and the section header details.
LINKAGES Analyzes and displays sections of type SHT_VMS_LINKAGES.The data is displayed as a list of linkage descriptors.
NOBITS Analyzes and displays sections of type SHT_NOBITS. There is no module data associated with sections of this type.
NOTE Analyzes and displays sections of type SHT_NOTE. The data for this section is displayed as a list of formatted OpenVMS note entries.
NULL Displays all sections of type PT_NULL. No data will be displayed for segments of this type.
NUMBERS= (number [,...]) Displays individual sections, as follows:
  • The selected sections will have a detailed display of their header and their contents. An informational message is displayed for section numbers that do not exist in the module.
  • One or more numeric values may be specified.
  • Section numbers may be specified in decimal, octal (using the %O prefix), or hexadecimal (using the %X prefix).
PROGBITS Displays all sections of type SHT_PROGBITS, except unwind sections.

Formatting for the sections of type SHT_PROGBITS depends on the EXECINSTR flag (SHDR$M_SHF_EXECINSTR) in its section header. If this bit is set, the section data will be displayed as machine instructions. Otherwise, it will be displayed as hexadecimal data.

Unwind sections will be displayed if /SECTIONS=UNWIND is specified.

RELOCATIONS Analyzes and displays sections of type SHT_RELA. The data for this section is displayed as table of relocation entries.
STRTAB Analyzes and displays sections of type SHT_STRTAB. The data for this section is displayed as a string table.
SYMTAB Displays sections of type SHT_SYMTAB. The data for this section is displayed as a symbol table.
TRACE
[=(suffix[,...])]
Analyzes and displays sections consisting of traceback information.

In addition, you can use a list of trace section name suffixes to selectively format TRACE information. The trace section names, which appear as ".trace_suffix", can be viewed in the summary table. The suffix can be specified as shown below. In addition, because there is one common debug and traceback section, ".debug_line", the suffix "line" can be specified as shown below as well:

  • ABBREV---Formats TRACE abbreviations
  • ARANGES---Formats TRACE address lookup tables
  • INFO---Formats TRACE symbols
  • LINE---Formats TRACE source line info
UNWIND Analyzes and displays sections of type SHT_IA64_UNWIND. Each section of this type has an associated Unwind Information section of type SHT_PROGBITS. This associated section is also displayed.

/SELECT=(keyword[,...])

Allows for the collection of specific object file information and displays the selected keyword items in the order specified.

Note

The /SELECT qualifier can be used on object and image files. The same keywords are valid selections. However, some information can not be in an object, such as the link date and time. Therefore, for some keywords the Analyze utility returns "Unknown". In the following table, only the keywords (which are useful for object files) and their return values are listed.

Analyze creates DCL symbols for all selectable information with the /SELECT qualifier. The symbol names consist of the prefix ANALYZE$ and a descriptive name of the information they hold. The symbol value is the selected information, usually printed to SYS$OUTPUT. Effectively, all of the printed information is duplicated in the symbols. For unselected information, the corresponding symbols will contain the null string.

The keywords are as follows:
Keyword Description
ARCHITECTURE Writes the architecture information into the DCL symbol ANALYZE$ARCHITECTURE. Returns "OpenVMS IA64" if the file is an OpenVMS Integrity servers object file. an OpenVMS Alpha object fileReturns "OpenVMS Alpha" if the file is an OpenVMS Alpha object file.
FILE_TYPE Writes file type information into the DCL symbol ANALYZE$FILE_TYPE. Returns "Object" if the file is an OpenVMS Integrity servers or Alpha object file.

/TBT (Alpha only)

Positional qualifier.

Specifies that the analysis should include all module traceback (TBT) records.

If you want the analysis to include TBT records for each file in the parameter list, specify the /TBT qualifier immediately following the /OBJECT qualifier.

If you want the analysis to include TBT records selectively, insert the /TBT qualifier immediately following each of the selected file specifications.

/TIR (Alpha only)

Positional qualifier.

Specifies that the analysis should include all text information and relocation (TIR) records.

If you want the analysis to include TIR records for each file in the parameter list, specify the /TIR qualifier immediately following the /OBJECT qualifier.

If you want the analysis to include TIR records selectively, insert the /TIR qualifier immediately following the selected file specifications.


Examples

#1

$ ANALYZE/OBJECT/INTERACTIVE  LINEDT
 
      

In this example, the ANALYZE/OBJECT command produces a description and a partial error analysis of the object file LINEDT.OBJ. Output is to the terminal, because the /INTERACTIVE qualifier has been used. As each item is analyzed, the utility displays the results on the screen and asks if you want to continue.

#2

$ ANALYZE/OBJECT/OUTPUT=LIOBJ/DBG  LINEDT (Alpha only) 
 
      

In this example, the ANALYZE/OBJECT command analyzes only the debugger information records of the file LINEDT.OBJ. Output is to the file LIOBJ.ANL.

#3

$ ANALYZE/OBJECT/SELECT=(ARCH,FILE) *.OBJ
DISK:[DIRECTORY]ALPHA.OBJ;1 
   OpenVMS ALPHA 
   Object 
   
 
      

This example displays the information requested about the object files ALPHA.OBJ.


Previous Next Contents Index