Analyzes the contents of an object file on OpenVMS VAX and Alpha
systems, and an Executable and Linkable Format (ELF) object
file on OpenVMS I64 systems, and identifies obvious errors. The
/OBJECT qualifier is required.
For general information about object files, refer to the
description of the linker in the VSI OpenVMS Linker Utility
Manual. (Use the ANALYZE/IMAGE command to analyze the contents
of an image file.)
Format
ANALYZE/OBJECT filespec[,...]
1 – 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.
2 – 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 I64, Alpha, or VAX Object
Language.
On OpenVMS I64 systems, the ANALYZE/OBJECT command automatically
distinguishes I64, Alpha, and VAX objects by examining the format
of the object modules header.
ANALYZE/OBJECT is intended primarily for programmers compilers,
debuggers, or other software involving the operating system's
object modules. It checks that that the ELF object format (I64)
or the object language records (VAX and 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
and VAX object languages, refer to the VSI OpenVMS Linker Utility
Manual. Information on the I64 object format will be available in
a future release.
NOTES
For I64 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 VAX and OpenVMS Alpha versions of ANALYZE/OBJECT
are not fully capable of analyzing non-platform objects (for
example I64 objects on VAX or 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 or VAX
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 I64 objects on I64 platforms,
ANALYZE/OBJECT accepts either VAX- or 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 I64, Alpha, or OpenVMS VAX Object
Language. This comparison is particularly important if the
analysis output contains a diagnostic message.
ANALYZE/OBJECT displays the following information for object
modules:
o Module architecture and type
o Module name
o Module version
o Module creation date and time
o Language processor creator
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 consistancy. 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 VAX and
Alpha objects:
o That data arguments in TIR commands are in the correct format
o That "Store Data" TIR commands are storing within legal
address limits
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 VAX and 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 VAX and Alpha End-of-Module (EOM) records and module
header (MHD) records are always analyzed, no matter which
qualifiers you specify.
For I64 objects the Elf header, the section header table
and the note section are always analyzed, no matter which
qualifiers you specify.
3 – Qualifiers
3.1 /DISASSEMBLE
/DISASSEMBLE (I64 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. I64 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.
3.2 /DBG
/DBG (VAX and 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.
3.3 /EOM
/EOM (VAX and 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. Refer to
the VSI OpenVMS Linker Utility Manual for more information.
3.4 /FLAGVALUES
/FLAGVALUES (I64 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 The keyword ON displays all flags whose value is 1.
OFF The keyword OFF displays all flags whose value is 0.
ALL The keyword ALL displays all flag values. The keywords
ON and OFF, in contrast, indicate the value of each
specific flag bit.
3.5 /GSD
/GSD (VAX and 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.
3.6 /INCLUDE
/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.
3.7 /INTERACTIVE
/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.
3.8 /LNK
/LNK (VAX and 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.
3.9 /MHD
/MHD (VAX and 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.
3.10 /PAGE_BREAK
/PAGE_BREAK=keyword (I64 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.
Keywords include NONE, which sets no page breaks; PRINTABLE_
REPORT, which creates page breaks as in listing files, and
SEPARATE_INFORMATION, which sets page breaks between section
information.
3.11 /OUTPUT
/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.
3.12 /SECTIONS
/SECTIONS [=(keyword[,...])] (I64 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 Analyzes and displays sections consisting
[=(suffix[,...])] of debug formatted debug information. In
addition, you can use a list of debug section
name suffixes to selectively format DEBUG
information. The suffix can be specified as
follows:
o ABBREV-Formats DEBUG abbreviations
o ARANGES-Formats DEBUG address lookup tables
o FRAME-Formats DEBUG frame descriptors for
unwinding
o INFO-Formats DEBUG symbols
o LINE-Formats DEBUG source line info
o PUBNAMES-Formats DEBUG name lookup tables
o 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 a
data will be displayed for segments of this
type.
NUMBERS= (number Displays individual sections, as follows:
[,...])
o 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.
o One or more numeric values may be
specified.
o 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 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 Analyzes and displays sections consisting of
[=(suffix[,...])] 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:
o ABBREV-Formats TRACE abbreviations
o ARANGES-Formats TRACE address lookup tables
o INFO-Formats TRACE symbols
o 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.
3.13 /SELECT
/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. Therfore, 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 I64 object file.
Returns "OpenVMS Alpha" if the file an OpenVMS
Alpha object file. Returns "OpenVMS VAX" if the
file is an OpenVMS VAX object file.
FILE_TYPE Writes file type information into the DCL symbol
ANALYZE$FILE_TYPE. Returns "Object" if the file
is an OpenVMS I64, Alpha, or VAX object file.
3.14 /TBT
/TBT (VAX and 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.
3.15 /TIR
/TIR (VAX and 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.
4 – 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 (VAX and 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
DISK:[DIRECTORY]VAX.OBJ;1
OpenVMS VAX
Object
This example displays the information requested about the
object files ALPHA.OBJ and VAX.OBJ.