eNOFT Manual Abstract This document describes the external features of eNOFT, a stand-alone utility that displays object files native to TNS/E systems. This document also describes the external features and usage of the ar archive facility that may be used on either TNS/R or TNS/E systems. Product Version N/A Supported Release Version Updates (RVUs) This manual supports H06.03 and all subsequent H-series release version updates until otherwise indicated in a replacement manual.
Document History Part Number Product Version Published 527507-002 N/A November 2004 527507-003 N/A May 2005 527507-004 N/A July 2005 527507-005 N/A February 2013
Legal Notices Copyright 2013 Hewlett-Packard Development Company L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
eNOFT Manual Glossary Index What’s New in This Manual v Manual Information v New and Changed Information About This Manual vii Audience vii Related Reading viii Notation Conventions viii HP Encourages Your Comments Tables v xii 1.
Contents 2.
Contents 3. The ar Utility LISTPROC or LP 2-48 LISTSOURCE or LS 2-50 LISTUNREFERENCED or LUR 2-52 LISTUNRESOLVED or LU 2-53 XREFPROC or XP 2-54 File Handling Commands 2-56 2-56 CD 2-56 COMMENT 2-56 COMP 2-56 DEMANGLE or DE 2-57 DIR or FILES 2-58 ENV 2-58 EXIT or E or QUIT or Q 2-58 FC and ! 2-58 FILE or F 2-59 HELP or ? 2-59 HISTORY or H 2-60 LOG and OUT 2-61 NOEXIT 2-61 OBEY 2-61 SHOW 2-62 VOLUME or CD 2-62 3. The ar Utility 4.
Contents B. Differences Between eNOFT and NOFT The 32-Bit and 64-Bit Programming Models Code and Data Sections A-12 User Code A-13 User Data A-14 The MCB (Master Control Block) A-15 Relocation Tables A-15 The DWARF Symbol Table A-17 Archives A-18 Tools That Work With Object Files A-20 A-12 B. Differences Between eNOFT and NOFT Architecture B-1 Debugging B-1 Displays B-1 Summary of eNOFT Commands B-1 Glossary Index Tables Table A-1. Table A-2. Table B-1. Table B-2. Table B-3. Table B-4.
What’s New in This Manual Manual Information eNOFT Manual Abstract This document describes the external features of eNOFT, a stand-alone utility that displays object files native to TNS/E systems. This document also describes the external features and usage of the ar archive facility that may be used on either TNS/R or TNS/E systems. Product Version N/A Supported Release Version Updates (RVUs) This manual supports H06.
What’s New in This Manual New and Changed Information eNOFT Manual—527507-005 vi
About This Manual This manual explains how to use the following TNS/E native object file utilities: eNOFT, which displays object files ar, which creates and maintains archives of object files Subsections: Audience on page vii Related Reading on page viii Notation Conventions on page viii Audience This manual is intended for systems programmers and application programmers who are familiar with the following: HP NonStop™ servers NonStop Kernel (NSK) operating system The compilers a
About This Manual Related Reading Related Reading eld Manual COBOL85 Manual for TNS/E Notation Conventions This section contains generic information. For notations specific to eNOFT, see Common Formats of Command Arguments on page 1-3. Hypertext Links Blue underline is used to indicate a hypertext link within text. By clicking a passage of text with a blue underline, you are taken to the location described.
About This Manual General Syntax Notation A group of items enclosed in brackets is a list from which you can choose one item or none. The items in the list can be arranged either vertically, with aligned brackets on each side of the list, or horizontally, enclosed in a pair of brackets and separated by vertical lines. For example: FC [ num ] [ -num ] [ text ] K [ X | D ] address { } Braces. A group of items enclosed in braces is a list from which you are required to choose one item.
About This Manual Notation for Messages If there is no space between two items, spaces are not permitted. In this example, no spaces are permitted between the period and any other items: $process-name.#su-name Line Spacing. If the syntax of a command is too long to fit on a single line, each continuation line is indented three spaces and is separated from the preceding line by a blank line. This spacing distinguishes items in a continuation line from items in a vertical list of selections.
About This Manual Notation for Messages Nonitalic text. Nonitalic letters, numbers, and punctuation indicate text that is displayed or returned exactly as shown. For example: Backup Up. lowercase italic letters. Lowercase italic letters indicate variable items whose values are displayed or returned. For example: p-register process-name [ ] Brackets. Brackets enclose items that are sometimes, but not always, displayed.
About This Manual Notation for Management Programming Interfaces Notation for Management Programming Interfaces This list summarizes the notation conventions used in the boxed descriptions of programmatic commands, event messages, and error lists in this manual. UPPERCASE LETTERS. Uppercase letters indicate names from definition files. Type these names exactly as shown. For example: ZCOM-TKN-SUBJ-SERV lowercase letters.
1 Introduction to eNOFT and ar The ar utility creates and maintains archives composed of groups of object files. You can mix PIC and non-PIC files in an archive, but you may not mix TNS, TNS/R or TNS/E object files within the same archive. After an archive has been created, new files can be added and existing files can be extracted, deleted, or replaced. For details on the use of ar, see Section 3, The ar Utility and Section 5, ar Diagnostic Messages.
Introduction to eNOFT and ar Starting eNOFT Starting eNOFT The eNOFT utility can be used as an interactive or batch process. Interactive (Command-Line) Mode eNOFT launches and runs as an interactive process if no command is specified. In addition, the PC version of eNOFT can also be launched by double-clicking on its file name. eNOFT can perform most tasks from the terminal prompt by specifying the commands serially on the command line. eNOFT terminates after the last command is processed.
Introduction to eNOFT and ar Common Formats of Command Arguments infile is a text file containing one or more eNOFT commands. Commands listed in this file must follow the same rules for the command-line processing. If infile does not exist, a syntax error will be generated and the program terminates normally. If both an infile and commands are given, eNOFT ignores the infile. outfile specifies a file name to which eNOFT writes its output.
Introduction to eNOFT and ar top half of the 64-bit address was not the sign extension of the bottom half, eNOFT will give a warning message with the truncated display. Hexadecimal numbers are prefixed with "0x". Sizes are represented as decimal values in bytes. All code outputs are in multiples of 16-byte bundles of instructions. This form of argument specifies the procedure or subprocedure.
Introduction to eNOFT and ar files." The form of argument specifies the compilation unit entry in the object file. | sourcename compilation unit index available from LISTSOURCE. sourcename may specify a fully qualified path (for example, node name, volume, and subvolume for Guardian) or a filename only. New to eNOFT, wildcard input string may be entered to search for items containing a match to the given pattern.
Introduction to eNOFT and ar If is specified without any keyword, output will be in appropriate "units" of bytes, depending on the part of the object file. New to eNOFT, defaults to decimal unless its value is prefixed with 0x for hexadecimal. Notes: and values differs for DUMPADDRESS, DUMPOFFSET and DUMPPROC. For DUMPADDRESS, the values denote the virtual address range set in the object file.
2 eNOFT Options This section contains the following information: SET and RESET Commands - globally set how and where eNOFT will dump specified parts of the object file. Dump Commands - display contiguous parts of the object file. List Commands - organize and list specific sections of the object file. File Handling Commands - affect the user interface. SET and RESET Commands SET and RESET commands globally set how and where eNOFT will dump specified parts of the object file.
eNOFT Options SET CASE or SC New to eNOFT, SET without an argument will echo the current setting of and SET by itself shows all settings. SET sets the set-cmd to argument.
eNOFT Options SET DISPLAY OR SD SET DISPLAY OR SD SD [ BRIEF | B | DETAIL | D ] New to eNOFT, this command globally sets the display format to BRIEF or DETAIL and is applicable to the following commands: COMP, RTDU, UNWINDINFO, LISTATTRIBUTE, LISTCOMPILERS, LISTDEBUG, LISTPROC, LISTSOURCE, LISTUNRESOLVED, LISTUNREFERENCED, and XREFPROC.
eNOFT Options SET FORMAT or SF "2:001:0013:0" shown next to the procedure "main" denotes the source index, file index, line number (ordinal shown here), and bundle instruction, respectively: [ 2:001:0013:0 main] 0x70010cc0: {0: 02c00916800 M alloc r32 = ar.pfs, 0x09, 0x00, 0x02, 0x00 1: 00000000000 M adds sp = -48, sp 2: 10800100880 I adds r34 = 0x00, gp ;; template: 0x09} [ : : : main] 0x70010cd0: {0: 00008000000 M nop.m 0x00 1: 00000000000 I mov r33 = rp 2: 00008000000 I nop.
eNOFT Options [ : SET HISTORYBUFFER or SHB : : main] 0x00000010: {0: 00008000000 M nop.m 0x00 1: 00000000000 I mov r33 = rp 2: 00008000000 I nop.i 0x00 ;; template: 0x01} [ : : : main] 0x00000020: {0: 10800c60500 M adds r20 = 0x030, sp ;; 1: 00000000000 M st8 [r20] = r34 2: 00008000000 I nop.i 0x00 template: 0x0a} 14 [ T399myClass thisMyClass; 2:004:0014:0 main] 0x00000030: {0: 00008000000 M nop.m 0x00 1: 00000000000 I nop.i 0x00 2: 0b1fe7db000 B br.call.sptk.
eNOFT Options SET HISTORYWINDOW or SHW If the buffer size is reduced, the number of command lines in storage is truncated with the oldest commands in this queue deleted first (FIFO). The command lines deleted from the buffer are not retrievable. If the buffer size is increased, commands in queue are retained with additional buffer allocated to handle up to the specified buffer size.
eNOFT Options SET SCOPESOURCE or SSS Use of this command or its equivalent RESET command overrides any existing SET SCOPESOURCE setting. This command takes precedence over the local command scope option in event of a conflict. The alias NOFT command PROC is not supported. SET SCOPESOURCE or SSS SSS This command narrows the scope to a single source file.
eNOFT Options Dump Commands LOC or L sorts the output in virtual address order and is not applicable to linkfiles. Often the addresses being sorted are addresses of procedures. When source files are being sorted, the address of the source file is the same as the address of the first procedure or subprocedure in the source file. Dump Commands The dump commands display contiguous parts of the object file.
eNOFT Options DUMPADDRESS or DA DUMPADDRESS or DA DA [ IN ] This command displays the object file contents from a virtual address inside a loadfile's memory space and is applicable to loadfiles and import libraries. Use SECTHDRS or LAYOUT to locate the starting address and size of any particular section. The following sample shows two 16-byte bundles of code instructions for the .text section, automatically shown in format ICODE because this is in a code area.
eNOFT Options DUMPDATA or DD The following sample shows the content of the .plt section of a loadfile in the default ICODE format. Each code section displayed will be prefixed with its name in the header. enoft> dumpcode ******** Section .plt in Icode (File Offset 0x800) (Source file not located for this symbol; no proc or or src line number is available for this kind of symbol.
eNOFT Options DUMPDATA or DD BRIEF or B is an alias to command LAYOUT DATA. defaults to the HEX format if not specified. See SET FORMAT for details. The following sample shows all available data sections in the default hexadecimal format. Each data section displayed will be prefixed with its name in the header. enoft> dumpdata ******** Section .rconst in Hex (File Offset 0x7d0) MemAddress Contents --------------------------------------------------------------------32 zero bytes skipped.
eNOFT Options 0x080001c0: DUMPOFFSET or DO 00000000 080001d0 00000000 00000000 .... .... .... .... ******** Section .pdata is empty. ******** Section .xdata is empty. ******** Section .sdata is empty. ******** Section .srodata is empty. ******** Section .sdata1 is empty. . . . This command replaces the following NOFT commands: DATA, READONLY, LARGEDATA, and SMALLDATA.
eNOFT Options DUMPPROC or DP DUMPPROC or DP DP [ ] [ IN ] This command displays some or all parts of a procedure. Use LISTPROC to find all available procedures or subprocedures. The default format is ICODE.
eNOFT Options DWARF The following sample shows parts of the .rela.dyn section in (raw) hexadecimal format. See RELOC for the default READABLE format display of this section. enoft> dumpsection .rela.dyn in hex ********** .rela.
eNOFT Options DWARF ******** Section .debug_info (File Offset 0x3000) 0x0000b DW_AB_CODE_compile_unit (0x1) DW_TAG_compile_unit (0x11) DW_AT_ DW_CHILDREN_yes DW_FORM_ VALUE comp_dir (0x001b) string (0x08) language (0x0013) data1 (0x0b) "\SPEEDY.$DATA06.T8432H01" DW_LANG_C89 name (0x0003) string (0x08) "\SPEEDY.$DATA06.T8432H01.CPLMAIN C" producer (0x0025) string (0x08) "T0549H01_01OCT2004_CCOM_22Mar200 4_GRD 3.
eNOFT Options DWARF stmt_list (0x0010) data8 (0x07) (0x2025) data8 (0x07) 0x00015 DW_AB_CODE_compile_unit_nopc (0x2) DW_TAG_file_type (0x29) DW_AT_ DW_FORM_ name (0x0003) 0x0001c DW_CHILDREN_no string (0x08) DW_AB_CODE_compile_unit_prof (0x3) DW_TAG_base_type (0x24) DW_AT_ DW_CHILDREN_no DW_FORM_ byte_size (0x000b) data1 (0x0b) encoding (0x003e) data1 (0x0b) name (0x0003) string (0x08) 0x00027 DW_AB_CODE_subprogram_void (0x4) DW_TAG_subprogram (0x2e) DW_AT_ DW_CHILDREN
eNOFT Options DWARF 3 \SPEEDY.$DATA01.TOOLSY02 FiNdx Dir File_Name 0 1 CPLMAINC 1 2 #0062090 2 3 STDIOH 3 3 SYSTYPEH 4 3 ERRNOH Size Time ADDRESS LINE COL STMT BB FILE(II) 0x0000000070000880:0 45. 0 T F \SPEEDY.$DATA06.T8432H01.CPLMAINC 0x00000000700008a0:1 49. 0 T F \SPEEDY.$DATA06.T8432H01.CPLMAINC . . . ******** Section .
eNOFT Options DYNAMIC DYNAMIC This is an alias for DUMPSECTION.dynamic and is applicable to loadfiles and import libraries. The dynamic section contains information about other sections that are needed by the runtime loader, such as virtual addresses of the .liblist through .rela.dyn sections and sizes. The following shows the dynamic section of a loadfile. enoft> dynamic ******** Section .dynamic (File Offset 0x498) Index Tag Value (e.g.
eNOFT Options FUNCDESC or FD A sample display of this command is shown below for a loadfile: enoft> filehdr ******** ELF File Header Ident: ELF64-bit Big_Endian VER_1 NSK Type: PIC_Program (loadfile) Target Machine: IA64 Version: 1 (current) Entry Point Address: 0x70000ae0 Program Hdr file offset: 0x00000040 Sections Hdr file offset: 0x000040b0 Flags: (0x2500000) Target OSS 32-bit DATA MODEL IEEE_float Non-empty Liblist Localized DATA1 (unprotected) File Hdr Size: 64 Program Hdr Size: 5
eNOFT Options FUNCDESC or FD The following shows the function descriptor section of a loadfile. enoft> funcdesc ******** Section .fptr (File Offset 0x21d0) Mem_Addr Proc_Addr GP_Value --------------------------------------------------------------------0x080001d0 0x0000000070000880 0x00000000080001f0 0x080001e0 0x0000000070000880 0x00000000080001f0 ******** Section .IA_64.
eNOFT Options GOT GOT This is an alias for DUMPSECTION .got and is only applicable to loadfiles. The .got global offset table section contains 64-bit addresses of data items that are referenced indirectly, as well as the addresses of official function descriptors and EnterPriv labels. The following shows the global offset table section of a loadfile. enoft> got ******** Section .
eNOFT Options HASH HASH This command displays the contents of the .hash and .hash.gblzd sections and is only applicable to loadfiles. Section .hash also applies to import libraries. The .hash and .hash.gblzd sections are used for looking up symbols in the .dynsym and .dynsym.gblzd sections, respectively. The NOFT option GLOBALIZED is not supported. Use DUMPSECTION to display the .hash.gblzd section. The following shows the hash section of a loadfile. (No .hash.gblzd section is available for this file.
eNOFT Options HASHVAL 20 0x00000000 21 0x00000000 22 0x06399473 23 0x00000061 24 0x00000062 54 44 _DTORS 54 a 37 b . . . (Computed) Next in Chain Hash Value Chain Dynsym Index Dynsym Name --------------------------------------------------------------------0 0x00000000 1 0x00000000 . . . 34 0x00000000 35 0x06389473 36 0x00000000 37 0x00000000 43 _CTORS . . . HASHVAL This command displays the contents of the .hashval and .hashval.
eNOFT Options LIBLIST The following shows the hash section of a loadfile: enoft> hashval ******** Section .hashval (File Offset 0x16e4) Index Hash_Value Info Bucket Dynsym_Name --------------------------------------------------------------------0 0x00000000 0x00000000 0 *** No symbol *** 1 0x00000000 0x00000000 0 *** No symbol *** . . .
eNOFT Options LIC The following shows the .liblist section of a loadfile: enoft> liblist ******** Section .liblist (File Offset 0x5d8) Count ReExport NotFound DLL_Name --------------------------------------------------------------------1 no no zcrtldll 2 no no zcredll 3 no no ZI18NDLL 4 no no ZICNVDLL LIC New to eNOFT, this is an alias for DUMPSECTION.lic, the library import characterization section, and is only applicable to loadfiles that have been preset.
eNOFT Options PROCINFO or PI PROCINFO or PI New to eNOFT, this is an alias for DUMPSECTION.procinfo and is only applicable to linkfiles. The names, addresses, "attributes", and nesting of procedures and subprocedures parts of the section are used by the linker to create stack unwinding information in loadfiles. The entry points that have the callable attribute are used to create gateways. The following shows the .procinfo section for a linkfile: enoft> procinfo ******** Section .
eNOFT Options PROGHDRS PROGHDRS This command displays the contents of the program headers and is applicable to loadfiles and import libraries. The following shows a listing of the program headers for a loadfile.
eNOFT Options RTDU The following shows the dynamic relocation table for a loadfile: enoft> reloc ******** Section .rela.
eNOFT Options RTDU Note linkfiles only have source RTDU's .source.rtdu, while programs have both source RTDU's and at most one object RTDU .object.rtdu. Use DUMPSECTION to display an individual section else STRTAB RTDU for the name section. DETAIL or D option adds the memory content of the RTDU data section information for each procedure. The following shows the RTDU section of a linkfile: enoft> rtdu ******** Section .source.
eNOFT Options SECTHDRS SECTHDRS This command displays the contents of the section headers. The following shows a listing of sections for a loadfile: enoft> secthdrs ******** ELF Section Headers (File Offset 0x40b0) ShNdx Name Type FileOffset VirtAddr Flags Link Size Info AddrAlign Entsize --------------------------------------------------------------------0 0x00000000 0x00000000 NULL 0 1 .tandem_info TANDEM_INFO A A A 8 0 0 8 5 0 8 0x000005d8 0x700005d8 A 5 .
eNOFT Options STRTAB STRTAB STRTAB [ * | DYNSTR | DYNSTR2 | PROCNAMES | RTDU | SHSTRTAB | STRTAB | UNWIND ] New to eNOFT, this command displays the contents of all string tables in the object file. For linkfiles, the possible string tables are sections named .procnames, .shstrtab, and .strtab. For loadfiles, the possible string tables are sections named .dynstr, .dynstr2, .IA_64.unwind.strings, and .shstrtab, as well as the source RTDU names section.
eNOFT Options SYMTAB enoft> strtab dynstr ******** Section .
eNOFT Options SYMTAB By definition, the .dynsym.gblzd section only contains symbols that are exported or undefined. Option EXPORT or E lists all exported symbols that are global and defined from sections .dynsym and .dynsym.gblzd in loadfiles and import libraries. Symbols available only to other linkfiles and local to loadfiles (not exported) are not listed. Option DATA or D lists data symbols and option PROC or P lists code symbols. The NOFT option GLOBALIZED is not supported herein.
eNOFT Options TANDEMINFO This command replaces NOFT commands ELFSYMTBL and DYNSYM. TANDEMINFO This is an alias for DUMPSECTION .tandem_info and is applicable to loadfiles and import libraries. The following shows the .tandem_info section for a loadfile: enoft> tandeminfo ******** Section .
eNOFT Options UNWIND UNWIND New to eNOFT, this command displays the contents of the sections of stack unwinding information and is applicable to linkfiles and loadfiles. .IA_64.unwind and .IA_64.unwind_info sections describe the stack frame information about procedures from the .text and .restext sections. For loadfiles, the .IA_64.unwind.strings section pointed at from .IA_64.unwind function will be dumped using the STRTAB command.
eNOFT Options UNWIND The following shows the .IA_64.unwind section of a loadfile. Display for the complementary .IA_64.unwind_info is not available as of this writing. enoft> unwind ******** Section .IA_64.
eNOFT Options UNWIND P = privileged R = resident S = shell pTAL subprocs and Cobol nested procs have a 'parent'. For linkfiles, this command shows the following: enoft> unwind ******** Section .IA_64.unwind (File Offset 0x510) UwNdx Start_Offset End_Offset Info_Ptr Section_Name --------------------------------------------------------------------0 0x00000000 0x00000020 0x00000000 .text 1 0x00000020 0x00000290 0x00000018 .text This command replaces NOFT command RUNTIMEPROC.
eNOFT Options List Commands List Commands The following commands organize and list specific sections of the object file. Unless otherwise specified, the default format is READABLE. DBGINFO { | } New to eNOFT, this command lists compilation source and debug file information for a given procedure name, index, or address. When is specified, line number and instruction bundle index will also be given. This command is applicable to loadfiles and import libraries.
eNOFT Options LAYOUT LAYOUT [ * | CODE | DATA ] This command lists the parts of the current object file in the order of their relative file offsets. New to eNOFT,CODE limits the display to code sections only and DATA limits the display to data sections only. New to eNOFT, virtual addresses are shown for all applicable sections. The section type is only displayed for sections of unknown name.
eNOFT Options LISTATTRIBUTE or LA LISTATTRIBUTE or LA [ DETAIL | D ] This command lists common file and process attributes associated with the object file. These attributes are from the .tandeminfo section, unless otherwise noted.
eNOFT Options LISTATTRIBUTE or LA The following shows file and process attributes for a program file: enoft> listattribute ******** List of Common File Attributes Name: d:/temp/hello.
eNOFT Options LISTATTRIBUTE or LA Instrumented File Ansistreams The following NOFT attributes do not apply to TNS/E and thus are not shown in eNOFT: DEBUG/INSPECT PFS Size Directly Needed Public SRLs Directly Needed Public SRL Bitmap Userlibrary Timestamp SRL Client. Attribute "Executable" in the NOFT command is also not supported. enoft> LISTATTRIBUTE DETAIL ******** List of Common File Attributes Name: $guest.bn.
eNOFT Options LISTCOMPILERS or LC --------------------------------------------------------------------(build proc symbols table...
eNOFT Options LISTDATA or LD Compiler: C89 Descript: T0549H01_01OCT2004_CCOM_22Mar2004_GRD 3.3 TOOLSY02 Release Compiler: C89 Descript: T0549H01_01OCT2004_CCOM_22Mar2004_WIN32 3.3 TOOLSY02 Release LISTDATA or LD This is an alias for SYMTAB DATA that lists all data symbols from sections .dynsym and .dynsym.gblzd in loadfiles and import libraries, and section .symtab from linkfiles. The display shows a subset of the applicable elf symbols sections.
eNOFT Options LISTDATA or LD Lcl Data C 49 0x700007d8 Lcl Data Data Asm Data C Data .rconst 4 .data _ctors Asm 54 0x08000004 Lcl 8 hw 51 0x700007d0 Lcl .data _dtors 50 0x08000000 Lcl 400 8 .rconst a C 1 .data Number of symbols matching scope: 12 ('Bind' tells if the symbol is local or global) ('Type' tells if it is code or data or some special kind of entry) ('E' = STO_EXPORT set, 'M' = STO_MULTIPLE_DEF_OK set) ******** Section .dynsym.gblzd not found.
eNOFT Options LISTDEBUG or LDE LISTDEBUG or LDE [ * | PROC | P | DATA | D ] [ DETAIL | D ] New to eNOFT, this command lists all names in the .debug_info symbols table that meet the variable (data) or subprogram (subprogram, subroutine, entry point) criteria. DETAIL or D provides more information, such as type of the symbol.
eNOFT Options LISTEXPORTS or LE LISTEXPORTS or LE This is an alias for SYMTAB EXPORT and is applicable to loadfiles and import libraries. This command lists all exported symbols that are global and defined from sections .dynsym and .dynsym.gblzd in loadfiles and import libraries. Symbols available only to other linkfiles and local to loadfiles (not exported) are not listed. The display shows a subset of the .dynsym and .dynsym.gblzd sections whereby only global symbols that are defined are shown.
eNOFT Options LISTPROC or LP BRIEF or B limits display to counts of symbols matching scope. enoft> listoptimize ******** Optimization of Procedures UwNdx Opt Procedure Name ----------------------------------------------------------------------2 2 T8432G08_01FEB2001_CRTLMAIN 0 2 __INIT__1_C 1 2 _MAIN 3 1 main LISTPROC or LP { * | } [ EXCLUDE | E | SUBPROC | SP | NOSUBPROC | NSP ] [ DETAIL | D ] This command lists procedures and subprocedures, as determined by the current scope.
eNOFT Options LISTPROC or LP 2 0x70000ae0 _MAIN 3 0x70000cc0 T8432H01_01OCT2004_CCPLMAIN 4 0x70000ce0 myproc1 5 0x70000d00 main DETAIL or D provides detailed information about procedures and subprocedures. For C++ procedures, DETAIL provides the "demangled" (original) names as well as the "mangled" internal equivalents. New to eNOFT, this command displays the specified procedure (or subprocedure) in the DETAIL format if scoping is specified here or globally.
eNOFT Options LISTSOURCE or LS LISTSOURCE or LS [ * | ] [ DETAIL | D ] This command lists all source files in an object file, as determined by the current scope. The default display shows all available source files. New to eNOFT, the display will be in the DETAIL format if or is specified here or globally. The following shows two source files used to build a linkfile. The NOFT attribute "Address" is not supported.
eNOFT Options LISTSOURCE or LS The attributes "Size", "Address of First Procedure", "Optimization Level Default", and "Symbols" in the NOFT command are not supported. enoft> listsource * detail ******** List of Source Files (Compilation Units) Source: 0 \SPEEDY.$DATA06.T8432H01.CPLMAINC Copies: 1 Compiler: C89 Descript: T0549H01_01OCT2004_CCOM_22Mar2004_GRD 3.3 TOOLSY02 Release Header: \SPEEDY.$DATA06.T8432H01\CPLMAINC Header: \SPEEDY.$DATA01\#0062090 Header: \SPEEDY.$DATA01.
eNOFT Options LISTUNREFERENCED or LUR LISTUNREFERENCED or LUR [ * | PROC | P | DATA | D ] [ DETAIL | D ] This command is similar to that in NOFT except the asterisk "*" is optional. This command lists all the names that are undefined and unreferenced in this object file and need to be linked in before it is executable.
eNOFT Options LISTUNRESOLVED or LU LISTUNRESOLVED or LU [ * | PROC | P | DATA | D ] [ EXCLUDE | E ] This command is similar to that in NOFT in that it lists all the names that are undefined (yet referenced) in this object. However the asterisk "*" is optional and this command also lists "unresolved" data symbols.
eNOFT Options XREFPROC or XP XREFPROC or XP [ * | ] [ CALLEDBY | CALLS | BOTH ] [ DETAIL | D ] This command displays an alphabetical cross-reference listing of procedures. CALLEDBY option lists each procedure and the procedures it is called by (default). CALLS option lists each procedure and the procedures it calls. BOTH option gives both sets of information, first CALLEDBY, then CALLS.
eNOFT Options XREFPROC or XP 0x70000e50 6 proc1 0x70000ec0 proc1 5 main 0x70000e60 strcpy 5 main 0x70000e30 Number of Called (callee) procedures: 8 UwNdx Calling Procedures Called Procedures Address(es) --------------------------------------------------------------------1 __INIT__1_C 0x70000b70 C_INT_INIT_START_ 2 _MAIN C_INT_INIT_COMPLETE_ 0x70000c80 exit 0x70000d50 main 0x70000d20 5 main malloc 0x70000df0 printf 0x70000e50 proc1 0x70000e60 strcpy 0x70000e30 6 proc1 0x70000ec0 printf eNOFT Manual—5275
eNOFT Options File Handling Commands File Handling Commands The following user interface commands retain the styles and content of NOFT as much as practical to maintain continuity for users. This feature terminates the output of the current command and if eNOFT is running in command-line mode, terminates the eNOFT program itself. On some emulators, the control key is required to be pressed concurrently with the break key
.
eNOFT Options DEMANGLE or DE ref-objfile is the reference object file. If not specified, the current object file is used (if it exists). Target-objfile is the target object file. As COMP processes each section/header, it displays a message each time it encounters a difference between the two objects. If there are no differences in the sections/headers, then a message is displayed stating that the sections/headers compared identically.
eNOFT Options DIR or FILES DIR or FILES New to eNOFT, this command lists all entries in the specified directory. pathname may be fully qualified or relative, with forward slashes for OSS names and reverse slashes for the PC environment. Without any option, this command reverts to the default directory (directory at the time eNOFT was invoked.) No validation of specified pathname is performed; validation is only performed while attempting to open the target file.
eNOFT Options FILE or F FILE or F objectfile This command opens the specified target object file. The NOFT option "?" is not supported. Use ENV to view the current file settings. objectfile must match the eNOFT product input requirements. If the new object file is valid, the prior object file, if any, is closed and SET CASE is set to the applicable sensitivity of the new object file.
eNOFT Options HISTORY or H help-topic gives detailed information on specific topics about eNOFT or the ELF object file format. The NOFT help topic shortcuts is not supported.
eNOFT Options LOG and OUT LOG and OUT [ OFF | outfile [ ASCII ] ] The LOG command echoes a copy of the current session's input and output to a specified file. The OUT command redirects the output listings from the standard terminal to a specified file; the input remains being displayed to the standard terminal. The NOFT option "?" is not supported. OFF resets to not logging. New to eNOFT, this command also resets to not logging if no option is entered.
eNOFT Options SHOW In the Guardian environment, infile must be of the EDIT file type. A data error will be generated if the file type is not of this code. The command files may be nested to any depth but cannot be circularly linked; for example, recursive. Opening a currently opened OBEY command file will result in an error. The commands listed in this file must follow the rules specified for command-line processing.
3 The ar Utility The ar utility creates and maintains archives composed of groups of object files. You can mix PIC and non-PIC files in an archive. After an archive has been created, new files can be added and existing files can be extracted, deleted, or replaced.
The ar Utility Name Function (page 2 of 2) -r Replace or add files to the archive. If the archive specified by archive does not exist, ar creates a new archive and writes a diagnostic message to standard error (unless you specify the -c option). If no files are specified and the archive exists, no changes are made to that archive. Files that replace existing files do not change the order of the archive; files that do not replace existing files are appended to the archive.
The ar Utility modifier-option is an ar option that gives instructions for the operation of the action-option. The modifier-options are as follows: Name Function (page 1 of 2) -a Position new files in the archive after the file specified by the position-name operand. -b Position new files in the archive before the file specified by the position-name operand. -c Suppress the diagnostic message that would be written to standard error by default when the archive file is created.
The ar Utility Name Function (page 2 of 2) -v Give verbose output. When used with the -d, -r, or -x options, this option causes ar to write the name of each file involved in archiving operations. When used with -p, this option causes ar to write the name of each file to the standard output before writing the file itself to the standard output.
The ar Utility archive depends on the platform, as follows: Environment Archive Guardian is the pathname of the archive file to be created or modified. Archives created in the Guardian environment are given file code 700 on TNS/R, and file code 800 on TNS/E platforms. OSS is the filename of the archive file to be created or modified. PC is the filename of the archive file to be created or modified. It can be partially or fully qualified, and can include system and folder names.
The ar Utility object file and target-independent files contain an archive symbol table and are suitable for use by Binder or the linkers(nld, ld or eld). If ar detects mixing of the kinds of HP object files, it generates the archive but does not generate a symbol table, issuing an appropriate warning message instead. When an archive contains a mix of TNS, TNS/R, or TNS/E object files, it is not usable by either Binder or the linkers (nld, ld, or eld)because no symbol table is generated.
4 eNOFT Diagnostic Messages eNOFT sends all information to the standard output and does not differentiate error messages from its standard output when redirection of output is specified. A return code of "1" is generated on fatal termination and "0" (EXIT_SUCCESS) otherwise. In interactive mode, messages that appear in the output listing fall into one of four severity levels: Fatal Errors on page 4-1 Data Errors on page 4-1 Syntax Errors on page 4-1 Warnings on page 4-2.
eNOFT Diagnostic Messages Warnings where code is a value from 3000 to 3999. In interactive mode, eNOFT returns a prompt after the error message is displayed. In command-line mode, eNOFT continues with the next command after the error message is displayed. Warnings eNOFT generates a recovery mode message and course of action. enoft> WARNING *** [code] where code is a value from 2000 to 2999.
5 ar Diagnostic Messages The ar utility produces messages when errors occur in command input or in data on which the utility is operating. The following messages are in alphabetic order. ar: archive: Guardian or User Defined Error 43 Unable to obtain disk space for file extent. Cause. The maximum size of an archive file is 128,073,728 bytes.
ar Diagnostic Messages ar: member: encountered error errnum. Cause. When building an archive in the Guardian environment, ar encountered a File System error identified by the number errnum when processing the specified member. The archive should be intact except for the member that caused the error. Recovery. Correct the error condition and add the member to the archive using the -r option, also specifying a or b if the position of the member is relevant. ar: member: file too large. Cause.
ar Diagnostic Messages archive, cannot open archive to set permissions. Cause. An I/O error occurred in the Guardian environment when ar attempted to open the specified archive to set the file permissions. Recovery. Use the FUP utility to look at the permissions on the archive and make any corrections needed. archive, cannot reopen to add symbol table. Cause. An I/O error occurred when the specified archive was being reopened prior to constructing the archive symbol table. Recovery.
ar Diagnostic Messages archive, not a valid archive file. Cause. In the Guardian environment, a file specified as an existing archive must be an odd, unstructured file having file code 700 or 800. Recovery. If archive refers to a file that is not currently in archive format, delete that file and reenter the ar command.
ar Diagnostic Messages file name filename: filename too long for filesystem. Cause. During an extract (-x) operation, the filename of the specified file is longer than the maximum supported by the File System; the specific member is not extracted. Recovery. Use the -T option to truncate the filename to the maximum length allowed by the File System during extraction. illegal option combination for option. Effect. The identified option combination is not allowed. Recovery. Reenter the command correctly.
ar Diagnostic Messages no position operand specified. Cause. A positional option must be followed by a position operand preceding the name of the archive. Recovery. Reenter the command correctly. no archive members specified. Cause. An ar command with the operational option specified requires file-member operands. Recovery. Reenter the command correctly. no archive specified. An archive file is not specified in the command.
ar Diagnostic Messages W option is not a recognized flag. Cause. The flag specified with the -W option is not recognized by ar. Recovery. Reenter the command correctly.
ar Diagnostic Messages eNOFT Manual—527507-005 5-8
A TNS/E Native Object Files This appendix contains the following information: The Object File Format - the types of object files and their content. Code and Data Sections - the "ordinary" code and data sections that come from application source code, possibly with additions by the compiler or linker. Relocation Tables - when code is relocated, who resolves the address and prepares relocation tables? The DWARF Symbol Table - this table contains information used by debuggers and the Cobol compiler.
TNS/E Native Object Files Types of TNS/E Object Files Table A-1. Types of TNS/E Object Files Type of Object File Description Linkfile This is the term for the object files that are produced by a compiler or by the assembler, and can be given as input to the linker. It is also possible for the linker to produce a linkfile as output when run with the -r option. Program This is the term for a main program. There is one program in every process. DLL This stands for dynamic-link library.
TNS/E Native Object Files How to Distinguish the Different Types of Object Files DLL’s and import libraries can also be used at compile time by the COBOL compiler to find out information about procedure call interfaces. Some DLL’s are called public libraries because they are provided as part of the TNS/E implementation and are found in a special way by the linker and runtime loader. A public library has the same format as any other DLL, and can have an import library to represent it.
TNS/E Native Object Files Summary of the Contents of an Object File User Data Sections (.data, .sdata, .bss, .sbss, .rdata, .srdata, and .rconst) A .tandem_info section (possibly abbreviated to four bytes) The .procinfo and .procnames Sections DWARF Symbol Table Sections Relocation Table Sections (.rela.x, where .x could be any of the section names listed above) ELF Symbol Table Sections (.symtab and .strtab) Source RTDU Sections (.rtdu.index, .rtdu.names, and .rtdu.data) ELF Section Headers and the .
TNS/E Native Object Files Summary of the Contents of an Object File Table A-2. Contents of a Loadfile or Import Library GPRelative Loadfile Contents Import LIbrary ELF Header X ELF Program Headers X .tandem_info X .lic .dynamic X .liblist X .dynsym.gblzd X .hash.gblzd X .hashval.gblzd .rela.gblzd .dynstr2 X .IA_64.unwind .IA_64.unwind_info .IA_64.unwind.strings .rconst .plt .restext .text .hash X .dynsym X .dynstr X .hashval .rela.dyn .gateway .
TNS/E Native Object Files Summary of the Contents of an Object File Table A-2. Contents of a Loadfile or Import Library GPRelative Loadfile Contents .gateway Import LIbrary (for a DLL) DWARF Symbol Table Sections .source.rdtu (if present, there are three of them.) .object.rdtu (if present, there are three of them.) X .shstrtab X ELF Section Headers X Note that the sections from .got through .
TNS/E Native Object Files Summary of the Contents of an Object File .liblist Section In a loadfile, this tells the names of the DLL’s that were in the linker command stream when the linker built this loadfile. In an import library that represents a single DLL it contains the same information as in that DLL. .dynsym.gblzd Section This is a symbol table section, similar to the .dynsym section (see below), but just for globalized symbols. It may be present in loadfiles and import libraries. .hash.
TNS/E Native Object Files Summary of the Contents of an Object File Text Sections Text sections contain application-defined executable code (procedures). The object file design also allows them to contain data, but that is not expected to happen. In linkfiles, there can be any number of text sections. Their names must begin either .text or .restext, corresponding to whether they contain non-resident or resident text, respectively. In loadfiles, all the sections that had names beginning .
TNS/E Native Object Files Summary of the Contents of an Object File .rdata Section This contains application-defined initialized data that does not get modified at runtime (although the initial values may be addresses that need modification when the loadfile is first brought into memory). .fptr Section This section contains official function descriptors. An official function descriptor contains the address and GP value for a procedure that exists in this loadfile.
TNS/E Native Object Files Summary of the Contents of an Object File initialized to zero. The object file design supports such sections, although compilers might not use them. .bss Section This contains application-defined uninitialized data, but this section doesn’t have the restriction that makes it possible to put data into the .sbss section. It occupies no space in an object file, but rather reserves memory space that is automatically initialized to zero.
TNS/E Native Object Files Summary of the Contents of an Object File Object RTDU Sections An object RTDU, which is part of the SQL/MP implementation, can be placed into a program by a tool named SQLCOMP. The object RTDU is represented by three sections. .shstrtab Section This is a string space that is pointed at from the ELF section headers. It is required.
TNS/E Native Object Files The 32-Bit and 64-Bit Programming Models NSK has also invented the .rela.gblzd section to handle globalized symbols in our implementation of C++. Other implementations take different approaches, not just to handle this specific feature of C++ but with regard to the issue of preemption in general. This invention of the .rela.
TNS/E Native Object Files User Code and .procnames sections, the DWARF sections, and the various linker-created sections in loadfiles, are not detailed here. User Code In linkfiles there can be many text sections. The sections whose names begin .text contain procedures and subprocedures that are not resident. The sections whose names begin .restext contain procedures and subprocedures that are resident.
TNS/E Native Object Files User Data Certain procedures may be included just to identify an object file. Such a procedure is called a VPROC ("version procedure"). The names of such procedures would always be found in the .procinfo section of a linkfile or in the stack unwinding information of a loadfile.
TNS/E Native Object Files The MCB (Master Control Block) The MCB (Master Control Block) The linker adds the MCB to the .data section of a program (or creates a section of this name if there was none before). The MCB is a data item that can be referenced by the name _MCB within the program. The linker only creates the MCB in programs (not DLL's), and only if the program makes a reference to the symbol named _MCB. This is a description of the fields that are nonzero in the MCB of an object file.
TNS/E Native Object Files Relocation Tables then it must be defined with an address in this object file, and that is the address that is used for the symbol. If the symbol is of type STB_GLOBAL then the definition of the symbol that is used to resolve the reference might exist in this object file or in another object file. The process of figuring out the target address is called resolving the reference.
TNS/E Native Object Files The DWARF Symbol Table programs (not even by the linker's -alf or -alfp options). So, such relocation table entries may be omitted by the linker when it creates a main program. In loadfiles, the elements of the .rela and .rela.gblzd sections are sorted by target symbol index. In particular, that means that all the entries with the same target symbol are consecutive.
TNS/E Native Object Files Archives .debug_relocs This section describes the places in DWARF sections of DLL's that contain code and data addresses, so that they can be updated by the -alf option of the linker when that option is used to rebase the DLL. Archives An archive is a single file that contains within it copies of other files, called the "members" of the archive. Archives are created by the tool named ar. An archive may be used for various purposes, one of which is to be an input for the linker.
TNS/E Native Object Files Archives of the field is filled with blanks. The other fields of the ar_hdr are all readable ASCII character fields. In the ar_hdr for the symbol table piece, the ar_name is a single slash ("/"). The contents of the symbol table piece are the following (in this order): a four-byte integer that tells the number of symbols in the symbol table piece an array of four-byte integers a string space (see below) The integers mentioned above are binary integers (big endian).
TNS/E Native Object Files Tools That Work With Object Files name of the first symbol name of the second symbol ... ______________________________ ar_hdr for the long member name string space the string space of long member names ______________________________ ar_hdr for the first member contents of the first member ______________________________ ar_hdr for the second member contents of the second member ...
B Differences Between eNOFT and NOFT Architecture NOFT supports TNS/R object files which include ELF and COFF object file structures. eNOFT supports TNS/E architecture, which is exclusively ELF. All TNS/E object files are big endian files with DWARF2 debugging symbol tables. Code on the TNS/E platform is always little endian. When accessing a code area of the object file (for example, .text), eNOFT displays in 16-byte "bundles" whereas NOFT displays in units of 4-byte "words".
Differences Between eNOFT and NOFT Summary of eNOFT Commands Table B-1.
Differences Between eNOFT and NOFT Summary of eNOFT Commands Table B-2.
Differences Between eNOFT and NOFT Summary of eNOFT Commands Table B-2.
Differences Between eNOFT and NOFT Summary of eNOFT Commands Table B-3.
Differences Between eNOFT and NOFT Summary of eNOFT Commands Table B-4. File User Interface Commands NOFT eNOFT Options ENV ENV - EXIT QUIT EXIT QUIT E Q - FILE FILE objectfile HELP UNDOCUMENTED HELP [command | help-topic] HISTORY HISTORY [] HELP HELP ALL LOG SET LOG OUT SET OUT LOG OUT - OBEY OBEY infile SHOW [* | set-cmd] VOLUME [\] [.$] [.
Glossary Archive file. This file contains copies of other files, called the "members" of the archive. An archive may be used for various purposes, one of which is to be an input for the linker. The linker uses archives as a source of linkfiles. Archives are not used at load time. Big endian. This term describes a method of storing data so that the most significant byte appears in a lower-numbered location in memory. As with TNS/R, TNS/E data structure is big endian.
Glossary Export. Export. To provide a symbol definition for use by other loadfiles. A loadfile offers for export a symbol definition for use by other loadfiles that need a data item or function having that symbolic name. Gateway. For every callable function there is a gateway; all calls to the function jump first to the gateway, which effects the transition to privileged state if the caller is not already privileged.
Glossary Indirect reference (of a loadfile). and run. It is useful in cross-linking. See Implicit library import library (imp-imp) and Zimpimp file. Indirect reference (of a loadfile). A library in a loadfile’s searchList that is not named in its libList. Instance. A particular case of a class of items, objects, or events. For example, a process is defined as one instance of the execution of a program; multiple processes might be executing the same program simultaneously.
Glossary Loadfile Loadfile. hThis term describes the input to the runtime loader and default output of the linker. This object file may contain name references to symbols that exist in other loadfiles in the same process. Such references are typically resolved when the loadfiles are brought into memory by the runtime loader rld . This term is synonymous with the term "executable" file. An executable object code file is one that is ready for loading into memory and executing on the computer.
Glossary Program mapped to different addresses for different processes in the same CPU. PIC introduces several new elements into ELF files, some of which are adapted from the Intel LP64 ELF structure. TNS/E supports only PIC files. TNS/R supports PIC and nonPIC file types. Program. This term describes one type of loadfile that is capable of being run on the system. This is the main program and there can only be one program associated with a process. Public Libraries.
Glossary Strip file each of these section items. A section is not required to be present if it would not contain any useful information for a given object file. In loadfiles, some of the sections are further organized in segments that get loaded into virtual memory. Strip file. These are files do not have debugging information; that is, DWARF symbol table, in it. Stripping can be done on any object file.
Glossary TNS/E object file format the processor generates a fault to allow software to find and load the missing entry from a memory-management structure. TNS/E object file format. This object file format is an amalgam of Intel IA-64 code architecture and the HP NonStop operating system extensions. TNS/E object files are categorized into three types of files: linkfiles, loadfiles, and import libraries.
Glossary Zreg file Zreg file. This is the internal name of the public DLL registry file, which lists the names of all the public DLL's.
Index A Export Glossary-2 ar utility 1-1 Archive file Glossary-1 F FUNCDESC or FD 2-19 B G batch mode 1-2 Big endian Glossary-1 Bundle Glossary-1 C Client (of a loadable library) Glossary-1 Code file Glossary-1 command arguments 1-3 command line mode 1-2 D Default Glossary-1 DEMANGLE or DE 2-57 Direct reference (of a loadfile) Glossary-1 DLL file Glossary-1 Dump Commands 2-8 DUMPADDRESS or DA 2-9 DUMPCODE or DC 2-9 DUMPDATA or DD 2-10 DUMPOFFSET or DO 2-12 DUMPPROC or DP 2-13 DUMPSECTION or DS 2-14
Index M Loader Glossary-3 Loader Library Glossary-4 Loadfile Glossary-4 LoadList Glossary-4 Localized Glossary-4 SET DEMANGLE or SDE 2-2 SET DISPLAY OR SD 2-3 SET FORMAT or SF 2-3 SET HISTORYBUFFER or SHB 2-5 SET HISTORYWINDOW or SHW 2-6 SET LINES or SL 2-6 SET SCOPEPROC or SSP 2-6 SET SCOPESOURCE or SSS 2-7 SET SORT or ST 2-7 starting enoft 1-2 stopping enoft 1-2 Strip file Glossary-6 STRTAB 2-31 Symbol Glossary-6 Symbol definition Glossary-6 Symbol Resolution Glossary-6 Symbol value Glossary-6 Symbolic
Index Z Z Zimpimp file Glossary-7 Zreg file Glossary-8 eNOFT Manual—527507-005 Index-3
Index Z eNOFT Manual—527507-005 Index-4