nld and noft Manual Abstract This manual explains how to use the following TNS/R native object file utilities: nld (T6017), which links and changes object file attributes; noft (T9626), which displays object files; ar (T8629), which creates and maintains archives of object files; and strip (T8629), which removes unnecessary information from loadable object files (loadfiles) in the HP NonStop™ Kernel Open System Services (OSS) environment.
Document History Part Number Product Version Published 426922-001 nld D44, noft D42, ar D43 November 2000 427686-001 nld D44, noft D42, ar D43, strip D43 February 2001 520384-001 nld D44, noft D42, ar D43, strip D43 July 2001 520384-002 nld D44, noft D42, ar D43, strip D43 February 2002 520384-003 nld D44, noft D45, ar D43, strip D43 May 2003
nld and noft Manual Glossary Index Examples What’s New in This Manual xi Manual Information xi New and Changed Information Tables xii About This Manual xv Audience xv Related Reading xvi Your Comments Invited xvi Notation Conventions xvii 1. Introduction to the Utilities Native Object Files nld 1-2 noft 1-4 ar 1-5 strip 1-5 1-2 2.
2. nld Utility (continued) Contents 2.
3. nld Options (continued) Contents 3. nld Options (continued) -L or -libvol 3-8 -libname 3-9 -nostdfiles 3-9 -nostdlib 3-9 -noverbose 3-10 -NS_extent_size 3-10 -NS_max_extents 3-10 -o 3-11 -r 3-11 -rename 3-12 -s 3-12 -set 3-13 -stdin 3-15 -strip 3-16 -ul 3-16 -verbose 3-16 -x 3-17 -y 3-17 4.
5. noft Options (continued) Contents 5. noft Options (continued) FILE or F 5-15 HELP or ? 5-17 HISTORY or H 5-20 LAYOUT 5-21 LISTATTRIBUTE or LA 5-22 LISTCOMPILERS or LC 5-23 LISTOPTIMIZE or LO 5-26 LISTPROC or LP 5-27 LISTSOURCE or LS 5-29 LISTSRLEXPORTS or LLE 5-30 LISTSRLFIXUPS or LLF 5-30 LISTSRLINFO or LLI 5-31 LISTUNREFERENCED or LUR 5-32 LISTUNRESOLVED or LU 5-35 LOG 5-38 OBEY 5-39 OUT 5-39 QUIT or Q 5-40 RESET 5-41 SET 5-42 SHOW 5-47 SYSTEM or VOLUME 5-48 XREFPROC or XP 5-49 6. ar Utility 7.
10. nld Diagnostic Messages Contents 10. nld Diagnostic Messages General Information 10-1 Terms That Appear in nld Diagnostic Messages Fatal Errors 10-12 Nonfatal Errors 10-61 Warnings 10-69 Informational Messages 10-77 10-2 11. noft Diagnostic Messages Fatal Errors 11-1 Data Errors 11-4 Warnings 11-18 Syntax Errors 11-22 12. ar Diagnostic Messages A.
A. Sample nld and noft Session (continued) Contents A. Sample nld and noft Session (continued) noft Command Examples on a Loadfile FILE A-15 LISTATTRIBUTE A-16 LISTCOMPILERS A-17 LISTPROC A-17 LISTSOURCE A-18 SET SORT A-19 LISTSRLINFO A-19 LISTUNRESOLVED A-20 LISTOPTIMIZE A-21 XREFPROC A-21 DUMPPROC A-24 LISTSRLFIXUPS A-26 LISTSRLEXPORTS A-27 LISTSRLFIXUPS A-27 A-15 Glossary Index Examples Example 2-1. Example 2-2. Example 2-3. Example 2-4. Example 2-5. Example 2-6. Example 2-7. Example 2-8.
Examples (continued) Contents Examples (continued) Example 4-4. Example 4-5. Example 4-6. Example 5-1. Example 5-2. Example 5-3. Example 5-4. Example 5-5. Example 5-6. Example 5-7. Example 5-8. Example 5-9. Example 5-10. Example 5-11. Example 5-12. Example 5-13. Example 5-14. Example 5-15. Example 5-16. Example 5-17. Example 5-18. Example 5-19. Example 5-20. Example 5-21. Example 5-22. Example 5-23. Example 5-24. Example 5-25. Example 5-26. Example 5-27. Example 5-28. Example 5-29. Example 5-30.
Examples (continued) Contents Examples (continued) Example 5-35. Example 5-36. Example 5-37. Example 5-38. Example 5-39. Example 5-40. Example 9-1. Example 9-2. Example 9-3. Example A-1. Example A-2. Example A-3. Example A-4. Example A-5. Example A-6. Example A-7. Example A-8. Example A-9. Example A-10. Example A-11. Example A-12. Example A-13. Example A-14. Example A-15. Example A-16. Example A-17. Example A-18. Example A-19. Example A-20. Example A-21. Example A-22. Example A-23. Example A-24.
Examples (continued) Contents Examples (continued) Example A-28. Example A-29. Example A-30. Example A-31. Example A-32. Example A-33. Example A-34. Example A-35. Example A-36.
Contents nld and noft Manual—520384-003 x
What’s New in This Manual Manual Information nld and noft Manual Abstract This manual explains how to use the following TNS/R native object file utilities: nld (T6017), which links and changes object file attributes; noft (T9626), which displays object files; ar (T8629), which creates and maintains archives of object files; and strip (T8629), which removes unnecessary information from loadable object files (loadfiles) in the HP NonStop™ Kernel Open System Services (OSS) environment.
New and Changed Information What’s New in This Manual New and Changed Information • • • nld Utility on page xii noft Utility on page xii Miscellaneous on page xiii nld Utility New information in: • • • • • • • • • • • • • Native Object Files on page 1-2 nld on page 1-2 Running Windows nld on the PC on page 2-4 C Programs on page 2-9 C++ Programs on page 2-10 Table 2-1, Using the Guardian nld Utility to Link SRLs, on page 2-17 Table 2-2, Using the OSS nld Utility to Link SRLs, on page 2-19 -e on page
Miscellaneous What’s New in This Manual • ° The option XREFPROC or XP on page 5-49 can now identify reference parameters in a non-PIC target file ° The following examples have been changed or added to reflect support for Dynamic-Link Libraries (DLLs): ° ° Example 5-11, LAYOUT Option, on page 5-21 (changed) ° Example 5-13, LISTATTRIBUTE Option for PIC Object File, on page 5-23 (added) ° Example 5-31, Effect of EXCLUDE on LISTUNRESOLVED Option, on page 5-37 (changed) ° Example 5-40, XREFPROC Opt
Miscellaneous What’s New in This Manual nld and noft Manual—520384-003 xiv
About This Manual This manual explains how to use the following TNS/R native object file utilities: • • • • nld, which links and changes object file attributes noft, which displays object files ar, which creates and maintains archives of object files strip, which removes unnecessary information from loadable object files (loadfiles) in the HP NonStop™ Kernel Open System Services (OSS) environment Subsections: • • • • Audience on page xv Related Reading on page xvi Your Comments Invited on page xvi Nota
Related Reading About This Manual Related Reading • • • • • • • • • • • • • • • • • C/C++ Programmer’s Guide COBOL85 for NonStop Systems Manual DLL Programmer’s Guide for TNS/R Systems Guardian Procedure Calls Reference Manual Guardian Procedure Errors and Messages Manual Guardian Programmer’s Guide Guardian User’s Guide Inspect Manual ld and rld Reference Manual Open System Services Programmer’s Guide Open System Services User’s Guide Open System Services Shell and Utilities Reference Manual pTAL Conver
Notation Conventions About This Manual Notation Conventions • • • • Hypertext Links on page xvii General Syntax Notation on page -xvii Example Notation on page xix Change Bar Notation on page xix 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. For example: This requirement is described under Backup DAM Volumes and Physical Disk Drives on page 3-2.
General Syntax Notation About This Manual { } Braces. A group of items enclosed in braces is a list from which you are required to choose one item. The items in the list may be arranged either vertically, with aligned braces on each side of the list, or horizontally, enclosed in a pair of braces and separated by vertical lines. For example: LISTOPENS PROCESS { $appl-mgr-name } { $process-name } ALLOWSU { ON | OFF } | Vertical Line.
Example Notation About This Manual 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. For example: ALTER [ / OUT file-spec / ] CONTROLLER [ , attribute-spec ]...
Change Bar Notation About This Manual nld and noft Manual—520384-003 xx
1 Introduction to the Utilities The utilities operate in the TNS/R native mode development environment on TNS/R native object files. All of the utilities except nld operate on both PIC (positionindependent code) and non-PIC (non-position-independent code) files. Utility Full Name Description nld Native link editor Links one or more non-PIC object files to produce a single non-PIC loadfile or linkfile.
Native Object Files Introduction to the Utilities Native Object Files nld, noft, ar, and strip operate on native object files. Native object files are in Executable and Linking Format (ELF), a standard format used for object files, with HP extensions. For details on the structure of native object files, see Section 8, Native Object File Structure. Native object files are either linkfiles or loadfiles, but not both.
nld Introduction to the Utilities The nld utility has the same capabilities in each environment, but each environment has a slightly different syntax.
noft Introduction to the Utilities noft The noft utility reads and displays information from native object files.
ar Introduction to the Utilities ar The ar utility allows you to: • • Create archives from groups of files Modify archives by: ° ° ° ° Adding files Extracting files Deleting files Replacing files When an archive contains one or more native (TNS/R) files, nld can use that archive as an object file library. If an archive contains both TNS and TNS/R files, nld cannot use that archive.
strip Introduction to the Utilities nld and noft Manual—520384-003 1 -6
2 nld Utility The nld utility, the native link editor, links one or more non-PIC TNS/R native object files to produce a single non-PIC loadfile or linkfile.
Running the nld Utility in the Guardian Environment nld Utility command-Filename is a Guardian filename or a map DEFINE for an nld command file. nld uses command-Filename only if no Filename or option arguments are specified on the command line; otherwise, nld ignores command-Filename. output-listing is a Guardian filename to which nld writes its listing. The file can be type 101 (edit file) or type 129 (spooler file).
Running the nld Utility in the OSS Environment nld Utility Running the nld Utility in the OSS Environment To run the nld utility in the OSS environment, use the following syntax: nld [ option ] ... Filename option is an nld option (a flag and its parameters, if any). A flag begins with a hyphen (-). You must include a space between a flag and its parameters except after the -l and -L flags. Case is not significant when specifying nld options, except for the -l and -L flags.
Running Windows nld on the PC nld Utility Example 2-6 uses the C object files test1.o and test2.o to build a program named prog. Because the program is a C program, the crtlmain.o library object file is required. The obey option directs nld to link all of the required SRLs in the program. Example 2-6. Creating an Executable C Program (OSS) nld /user/lib/crtlmain.o test1.o test2.o \ -obey /usr/lib/libc.obey -o prog Running Windows nld on the PC Using ETK, you can run Windows nld on: • • • Windows NT 4.
Compilers That Can Launch Windows nld nld Utility Note. On the PC, you must use -l or -lib on page 3-7 on the command line to specify the location for nld to look for SRLs and archives; there are no standard library locations. Compilers That Can Launch Windows nld Windows nld is a component of these Windows-based cross-compilers, which can launch it automatically after compilation: Compiler Compiler Driver DLL Native C/C++ c89.dll Native COBOL coboldvr.dll pTAL ptaldvr.
How the ETK Command-Line and GUI Interfaces Differ nld Utility How the ETK Command-Line and GUI Interfaces Differ Software Requirements Command-Line Interface GUI You need only install one of the Compilers That Can Launch Windows nld on page 2-5 You must install all of the following: • • • One of the Compilers That Can Launch Windows nld on page 2-5 Microsoft Visual Studio .
Command-Line Interface Linking Options nld Utility Command-Line Interface Linking Options The command-line interface link options for C/C++ and COBOL are: • • • • • • • • • • • • • • • • • -l=library -L=directory -s -Wansistreams -WBdynamic -WBstatic -Wheap=N[b|w|p] -Whighpin={on|off} -Whighrequesters={on|off} -W[no]inspect -Wnld="arguments" -Wnld_obey file -Wnostdlib -Wr -Wrunnamed -W[no]saveabend -Wx nld and noft Manual—520384-003 2 -7
Changing the Target Environment nld Utility Changing the Target Environment The target environment is the environment in which you intend to run the program file. By default, the Guardian version of nld builds files intended to run in the Guardian environment and the OSS version of nld builds files intended to run in the OSS environment.
Linking Programs nld Utility Linking Programs • • • • • • C Programs on page 2-9 C++ Programs on page 2-10 COBOL Programs on page 2-12 pTAL Programs on page 2-13 Mixed-Language Programs on page 2-13 Programs With Embedded NonStop SQL/MP on page 2-13 Note. You can only link linkfiles into a program. You cannot link loadfiles, or a combination of loadfiles and linkfiles, into a program. C Programs C programs require access to their run-time environments.
C++ Programs nld Utility 5. If you want to overload the new and delete operations, you must link these files to your program: Environment Active Backup Programming Support Object Code File Guardian $SYSTEM.SYSTEM.CPPINIT OSS /usr/lib/cppinit.o For information about active backup programming in C, see the Guardian Programmer’s Guide. Example 2-10 takes a C source program named MYSRC, compiles it into an object file named MYOBJ, and creates a loadfile named MYEXEC.
C++ Programs nld Utility The version, known as the C++ Dialect, is stored in one of the program's internal structures. To see a program’s C++ dialect, use the noft option LISTATTRIBUTE or LA on page 5-22. C++ Input Files C++ Version Recorded in the Loadfile* VERSION1 CPP_V1 (1) VERSION2 CPP_V2 (2) VERSION3 CPP_V3 (3) Mixed versions Lowest version * When none of the input files are C++ files, the value CPP_NEUTRAL is recorded in the loadfile.
COBOL Programs nld Utility 3. Link to the SRLs that your program uses. To link the standard set of C SRLs, use the following options: Environment Option for Linking the Standard Set of C SRLs Guardian -OBEY $SYSTEM.SYSTEM.LIBCOBEY OSS -obey /usr/lib/libc.obey C++ programs require additional SRLs. See Determining Which SRLs Programs Require on page 2-17. 4.
pTAL Programs nld Utility pTAL Programs Because pTAL does not support embedded NonStop SQL/MP or a language-specific run-time library, there are no special requirements for linking pTAL programs. Mixed-Language Programs You can create mixed-language programs containing native C modules, native C++ modules, native COBOL modules, and pTAL modules. The MAIN procedure in a mixed-language program can be written in C/C++ or COBOL but not pTAL.
Linking User Libraries nld Utility If the operating system cannot find a user library or system library procedure to satisfy a run-time external reference, it displays a message as the process starts. When the process calls an unresolved procedure, the process changes the call to the unresolved procedure into a call to the Debug utility or the Inspect symbolic debugger, and the process enters the debug state.
Linking Shared Run-Time Libraries (SRLs) nld Utility A program file can have at most one TNS/R native user library associated with it. The following table shows how to associate a TNS/R native user library with a program file.
Specifying SRLs nld Utility In the Guardian environment, each processor loads public SRLs at startup time from the active SYSnn subvolume. The SYSnn subvolume, located on $SYSTEM, contains a version of the operating system image for a particular node. A node can have more than one SYSnn subvolume, but only one active (running) SYSnn subvolume. D42 and later product versions of nld automatically select the active SYSnn subvolume. Previous versions of nld required you to specify the active SYSnn subvolume.
Determining Which SRLs Programs Require nld Utility Determining Which SRLs Programs Require The SRLs that a program requires depend on: • • The run-time libraries that the program uses The environment in which the program runs The nld options that you must specify to link the SRLs that your program requires depend on: • • The SRLs that the program requires The environment in which you are using the nld utility Environment in Which You Are Using nld See ...
Determining Which SRLs Programs Require nld Utility Table 2-1. Using the Guardian nld Utility to Link SRLs (page 2 of 2) Library That Program Uses C++ run-time library Environment in Which Program Runs nld Options to Specify Guardian -l ZCPLSRL -l ZRWSLSRL -OBEY $SYSTEM.SYSTEM.LIBCOBEY or -l ZRWSLSRL -l ZCPLSRL -l ZCRTLSRL -l ZCRESRL OSS -OBEY $SYSTEM.SYSTEM.
Determining Which SRLs Programs Require nld Utility For example, the following nld command links a Guardian C++ program that uses the Tools h++ class libraries: NLD $SYSTEM.SYSTEM.CRTLMAIN MYOBJ -o MYEXEC & -l ZCRESRL -l ZCRTLSRL -l ZCPLGSRL -l ZTLHGSRL -l ZRWSLSRL CRTLMAIN is the C run-time library initialization object file that contains code required by all C and C++ programs. Table 2-2 identifies the OSS nld options required to link the SRLs necessary to create a program file. Table 2-2.
Determining Which SRLs Programs Require nld Utility Table 2-2. Using the OSS nld Utility to Link SRLs (page 2 of 2) Library That Program Uses VERSION2 Standard C++ library, Tools.h++ library (version 7) Environment in Which Program Runs Guardian nld Options to Specify -obey /usr/lib/libc.obey -l ZTLHSRL -l ZRWSLSRL -l ZCPLSRL or -l ZTLHSRL -l ZRWSLSRL -l ZCPLSRL -l ZCRTLSRL -l ZCRESRL OSS -obey /usr/lib/libc.
Linking Archive Files nld Utility Linking Archive Files The nld utility supports archive files for selecting input object files when building a new object file. An archive file is created by the ar utility and contains a collection of object files. Any type of file can be put into an archive, but nld uses only the relinkable TNS/R native object files in an archive file.
Linking Floating-Point Programs nld Utility Unlike libraries, which must be specified only once in a linking operation, you might need to specify archives more than once in the same linking operation. For example, if the object program obj calls functions fun1 and fun3, and if archive ar1 contains functions fun1 and fun2 in separate archives or object files, and archive ar2 contains function fun3, which calls fun2, then the command: nld obj.o -l ar1.a -l ar2.a links obj, ar1 and ar2.
Link-Time Consistency Checking nld Utility Link-Time Consistency Checking The nld utility checks the consistency of floating-point type combinations when linking object files. The type of checking depends on whether the floattype attribute is specified.
Link-Time Consistency Checking nld Utility floattype Specified When the floattype attribute is explicitly specified with the -set option, any combination of floating types is allowed—nld sets the floattype attribute value for the output object file to the specified value. If nld detects an inconsistency between the specified floattype attribute value and that of any input object file, it issues a warning message. Table 2-4 summarizes this paragraph. Table 2-4.
Run-Time Consistency Checking nld Utility Run-Time Consistency Checking If a program tries to use a processor that does not support IEEE floating-point format, then process creation error code 64 occurs (IEEE floating-point support not available on this processor). To determine whether a processor can run IEEE floating-point instructions, programs can call the PROCESSOR_GETINFOLIST_ procedure. For more information about this procedure, see the Guardian Procedure Calls Reference Manual.
Linking Mixed-Language Programs nld Utility Overruling the Run-Time Consistency Check The run-time consistency check can be overruled by the option -set float_lib_overrule on. If you overrule the consistency check, the operating system allows a floating-point inconsistency between the user library and the program. If you do not set float_lib_overrule, and there is an inconsistency between the program file and user library, the operating system generates an error code and does not run the program.
Searching for Archives and SRLs With Simple Filenames nld Utility Searching for Archives and SRLs With Simple Filenames Note. This subsection does not apply to the PC. On the PC, you must specify the location for nld to look for SRLs and archives; there are no standard library locations. A simple name is a Guardian file identifier or an OSS pathname without any directory components.
Dynamic and Static Linking nld Utility If the -verbose flag is specified, nld writes to its output listing the locations where it found an SRL or archive file. (The Guardian version of nld has -verbose set by default.) For more information, see -verbose on page 3-16. In Example 2-12, the Guardian version of nld performs dynamic linking (the default) and searches for the C run-time library (ZCRTLSRL) and the CRE library (ZCRESRL) SRLs in the subvolume with the current version of the operating system image.
Stripping Symbol Information nld Utility Stripping Symbol Information Native object files contain symbol information to be used when linking or debugging. The amount of symbol information produced by a compilation can be controlled by the SYMBOLS compiler directive or pragma. The nld utility can remove some or all symbol information as it creates an output file. Option Strips symbol information used for ... From ...
Local and Shared Symbols nld Utility Local and Shared Symbols A local symbol is known only within a single compilation unit. A shared symbol is known by all compilation units that are linked together. A local symbol is distinct from any other symbol of the same name that appears in other compilation units. Because a shared symbol is known by all compilation units that are linked together, all compilation units refer to the same symbol at run time. Table 2-6.
Declaration and Definition nld Utility Declaration and Definition For data items shared across compilation units the difference between a declaration and a definition is important. Definition: The compiler allocates space for the data item, possibly giving it an initial value. Declaration: A compilation unit recognizes a data item, so the code can refer to it, but this compilation unit has not allocated space for it. Table 2-7.
Declaration and Definition nld Utility nld and noft Manual—520384-003 2- 32
3 nld Options An option is a flag and its parameters, if any. You use the nld options to specify the input object file, control the nld environment, and control the format of nld output. This section describes the syntax and semantics of nld options and provides examples of each option. Table 3-1. nld Flag Summary (page 1 of 2) Flag Description -allow_duplicate_procs on page 3-2 Directs nld not to report an error if more than one procedure has the given name.
-allow_duplicate_procs nld Options Table 3-1. nld Flag Summary (page 2 of 2) Flag Description -noverbose on page 3-10 Prevents nld from writing warning and informational messages to its output listing. -NS_extent_size on page 3-10 Changes the extent size from the default (32 pages) to the specified size. -NS_max_extents on page 3-10 Changes the maximum number of extents from the default (900) to the specified number. -o on page 3-11 Specifies the name of the output object file.
-allow_missing_libs nld Options -allow_missing_libs Prevents nld from stopping when it cannot find an archive or SRL specified by -l or -lib on page 3-7. Instead of stopping, nld issues a warning and continues to process the input file. -allow_missing_libs -allow_multiple_mains Prevents nld from issuing an error message if more than one procedure has the MAIN attribute.
-bstatic nld Options -bstatic Causes nld to search for archive files when resolving -l or -lib on page 3-7. -bstatic nld searches for an archive file. nld does not search for an SRL. nld issues an error if an archive file cannot be found. -bstatic can be disabled by -bdynamic on page 3-3. Multiple -bdynamic and -bstatic flags can be specified in a single nld invocation, each one taking effect at the point at which it appears on the command line.
-e nld Options -e Note. Use only when linking a program (not a library) that will run without the standard runtime support facilities. Identifies the function at which the program is to begin executing when the program is loaded. Without -e, the program begins executing at the function that has the MAIN attribute. -e function-name function-name is the name of the function at which the program is to begin executing when the program is loaded.
-fl or -obey nld Options -fl or -obey Specifies the name of an nld command file containing nld command tokens. { -fl | -obey } filename filename is an edit file (for the Guardian version of nld) or a C text file (for the OSS version of nld). Tokens can be separated by spaces, tabs, or ends of lines. Within the command file, two hyphens indicate a comment that extends to the end of the current line. Command files can be nested and there is no limit to the depth of nesting.
-l or -lib nld Options -l or -lib Specifies a shared run-time library (SRL) or archive file to use to resolve external references from the loadfile being linked. -l[ib][ ]filename filename specifies an SRL or archive file, either by name or (in the Guardian environment) by map DEFINE. -l must be lowercase. The space after the flag is optional. A simple name is a Guardian file identifier or a OSS pathname without any directory components.
-L or -libvol nld Options -L or -libvol Specifies a location to search for a shared run-time library (SRL) or archive file specified by a simple filename in -l or -lib on page 3-7. A simple filename is a Guardian file identifier or an OSS pathname without any directory components. { -L | -libvol }[ ]location location is the location to search. For the Guardian version of nld, location is a Guardian subvolume. For the OSS version of nld, location is an OSS directory pathname. -L must be uppercase.
-libname nld Options -libname Associates a TNS/R native user library with a native loadfile. -libname filename filename is the Guardian name of the TNS/R native user library to be associated with the native loadfile. It must include volume and subvolume, and its length must not exceed 48 characters. User libraries must have Guardian names. In OSS, filename must be in a form that points to a Guardian file. In the following examples, the two -libname options point to the same user library.
-noverbose nld Options -noverbose Prevents nld from writing warning and informational messages to its output listing. -noverbose -verbose on page 3-16 causes nld to write warning and informational messages to its output listing. The default for the OSS and PC versions of nld is -noverbose. The default for the Guardian version of nld is -verbose. -NS_extent_size Note. Guardian environment only. Changes the extent size from the default (32 pages) to the specified size.
-o nld Options -o Specifies the name of the output object file. -o filename filename is the name of the output file, either by name or (in the Guardian environment) by map DEFINE. This filename can be the same as the input filename. If linking is successful, nld deletes the input file and then writes the output file. An error occurs if you do not have permission to delete the input file. If filename exists and is not in use, nld appends the listing to the file.
-rename nld Options -rename Changes the name of an externally visible procedure or data item. -rename old-name new-name old-name is the name of the procedure or data item to rename. new-name is the new name to give the procedure or data item. Existing references to the current name become unresolved references. Thus, another procedure or data item named old-name can be linked and existing code will use this version instead of the original (now renamed) version. For example, procedure A calls procedure B.
-set nld Options -set The -set option sets a run-time attribute to a specified value when creating a loadfile. (To change a run-time attribute in an existing loadfile, see -change on page 3-4.) -set attribute-name attribute-value attribute-name is a run-time attribute (see Table 3-2). attribute-value is the value to which the specified run-time attribute is to be set (see Table 3-2 for acceptable values and Table 3-3 on page 3-15 for default values). Table 3-2.
-set nld Options Table 3-2. Descriptions of Run-Time Attributes (page 2 of 2) attribute-name attribute-value Description HIGHREQUESTER HIGHREQUESTERS HIGHREQUESTOR HIGHREQUESTORS ON OFF Specifies whether an object file can support high process identification number (PIN) requesters. INSPECT ON OFF Specifies whether the Inspect program is chosen for debugging when you execute the target file. LIBNAME filename Associates a TNS/R native user library with a native program file.
-stdin nld Options Table 3-3. Default Run-Time Attribute Values attribute-name Default attribute-value FLOATTYPE (for ELF files only) If FLOATTYPE is not specified, nld derives the floating-point type of the output object file from the types of the input files. For details, see the C/C++ Programmer’s Guide. HEAP_MAX 0 (The operating system provides the default heap size.) HIGHPIN ON HIGHREQUESTER HIGHREQUESTERS HIGHREQUESTOR HIGHREQUESTORS ON INSPECT ON LIBNAME None.
-strip nld Options -strip Removes symbol information used for linking and symbolic debugging from an existing loadfile. -strip filename filename is the name or (in the Guardian environment) the map DEFINE of the object file to strip. A file stripped of all symbol information cannot be symbolically debugged with Inspect or linked again by nld. You can use -strip only on an existing loadfile. To strip all symbol information when creating a loadfile, use -s on page 3-12.
-x nld Options -x Removes symbol information used for symbolic debugging from the output file. -x This action often decreases the size of an object file. The file cannot be symbolically debugged with Inspect, but enough information remains so the object file can be used as nld input again. This flag is often used with -r on page 3-11.
-y nld Options nld and noft Manual—520384-003 3- 18
4 noft Utility The noft utility, the native object file tool, displays all portions of native object files.
Running the noft Utility in the Guardian Environment noft Utility output-filename specifies a Guardian filename to which noft writes its output. If you specify a disk filename and the file does not exist, noft creates an edit file. If the specified disk file exists, noft appends to the file. If you omit the OUT option, noft writes its output to your current default output file. option is one or more noft flags with their parameters, if any.
Running the noft Utility in the OSS Environment noft Utility Running the noft Utility in the OSS Environment You can use the noft utility as an interactive or batch process, but noft is most often used as an interactive process. To run the noft utility in the OSS environment, use the following syntax: noft [ option ] ... object-filename [ i-o-redirection ] option is a noft flag and its parameters, if any. If you do not specify option, noft runs as an interactive process.
Listing Object Files noft Utility Example 4-2. Interactive noft Session Equivalent to Example 4-1 on page 4-3 noft noft> noft> noft> noft> file sample.o set scopesource sample.c listproc * exit Listing Object Files Table 4-1. noft Listing Options Option Lists ...
Dumping Object Files noft Utility Dumping Object Files The noft dumping options display unformatted views into an object file. Table 4-2. noft Dumping Options Option Displays ... DUMPADDRESS or DA on page 5-6 Code and data from a virtual address inside an object file’s memory space DUMPOFFSET or DO on page 5-8 Code and data from a physical offset within the object file DUMPPROC or DP on page 5-10 Contents of a procedure or part of a procedure Controlling the noft Environment Table 4-3.
Controlling the noft Environment noft Utility Table 4-3.
Debugging With noft noft Utility Debugging With noft The dumping options (listed in Table 4-2 on page 4-5) can be useful when debugging optimized native object code, especially when you must debug code at the RISC instruction-level. Note. You must use Visual Inspect, rather than Inspect, to debug PIC executable files. Example 4-3 is followed by DUMPPROC listings of its compute() function compiled at optimization levels 0, 1, and 2. After the listings is a comparison of optimization levels. Example 4-3.
Debugging With noft noft Utility Example 4-4 shows the noft output for the compute() function in Example 4-3 on page 4-7 compiled at optimize 0. The native compilers perform no optimizations at optimize 0. Example 4-4.
Debugging With noft noft Utility Example 4-5 shows the noft output for the compute() function in Example 4-3 on page 4-7 compiled at optimize 1. The native compilers perform many optimizations at optimize 1. Example 4-5.
Debugging With noft noft Utility Example 4-6 shows the noft output for the compute() function in Example 4-3 on page 4-7 compiled at optimize 2. The native compilers perform all possible optimizations at optimize 2. The “+” and “-” characters in the leftmost column indicate code that has been moved forward or backward in the execution stream. Example 4-6.
Debugging With noft noft Utility At optimization level 1, the native compiler: • • • • • • • • • Optimizes across statement boundaries to remove nop instructions. Uses registers instead of memory. Optimizes by finding common subexpressions. At optimization level 2, the native compiler: Replaced the variable i with a derived pointer expression or an induction variable. Eliminates the parameter load and store operations at the procedure entrance by placing the code inline.
Debugging With noft noft Utility nld and noft Manual—520384-003 4- 12
5 noft Options An option is a flag and its parameters, if any. You use the noft options to specify the input object file, control the noft environment, and control the format of noft output. This section describes the syntax and semantics of noft options and provides examples of each option. Table 5-1 on page 5-1 lists the noft flags in alphabetical order.
noft Options Table 5-1. noft Flag Summary (page 2 of 3) Flag Description LISTCOMPILERS or LC on page 5-23 Lists version information about the native compiler components and nld utility used to create an object file. LISTOPTIMIZE or LO on page 5-26 Lists procedures based on the optimization level. LISTPROC or LP on page 5-27 Lists procedures and subprocedures. LISTSOURCE or LS on page 5-29 Lists the source files in an object file.
Break Key noft Options Table 5-1.
! (Exclamation Point) noft Options ! (Exclamation Point) Note. This option works only in an interactive session. The ! (exclamation point) option executes a previously executed command. ! [ history-number | -history-offset | text ] history-number is the history-buffer number of the command to be re-executed. -history-offset is a negative offset from the command that history-number represents. The immediately preceding command is -1. text is a string of characters.
CD noft Options CD Note. OSS environment only. Similar Guardian commands are SYSTEM or VOLUME on page 5-48. The CD option changes the current working directory, which noft searches for relative pathnames. CD [ pathname ] pathname is the OSS directory pathname of the directory that is to become the current working directory. The maximum size of pathname is 255 characters. The default pathname is the startup directory. Note. The noft utility does not verify the validity of the specified pathname.
DUMPADDRESS or DA noft Options DUMPADDRESS or DA The DUMPADDRESS option displays code and data from a virtual address inside an object file’s memory space. Because all sections in linkfiles start at zero, use DUMPOFFSET or DO on page 5-8 to display any section other than the text section. [ DUMPADDRESS | DA ] start-address [ range-specifier ] [ IN format-specifier ] start-address is the starting virtual address in hexadecimal format.
DUMPADDRESS or DA noft Options { DECIMAL | D } displays portions of the object file in decimal format. { HEX | H } displays portions of the object file in hexadecimal format. { ICODE | IC } displays portions of the object file in disassembled program code. This is the default. { INNERLIST | IN } displays portions of the object file in disassembled program code and displays the source code interspersed with the code. This option can only be used for displaying text.
DUMPOFFSET or DO noft Options DUMPOFFSET or DO The DUMPOFFSET option displays code and data from a physical offset within an object file. { DUMPOFFSET | DO } start-address [range-specifier] [IN format-specifier] start-address is the starting virtual address in hexadecimal format. range-specifier is the amount of information to display: { TO end-address | FOR { number { BYTES | B | WORDS | W } | * }} end-address is an ending virtual address in hexadecimal format.
DUMPOFFSET or DO noft Options { ICODE | IC } displays portions of the object file in disassembled program code. This is the default. { INNERLIST | IN } displays portions of the object file in disassembled program code and displays the source code interspersed with the code. This option can only be used for displaying text. { OCTAL | O } displays portions of the object file in octal format.
DUMPPROC or DP noft Options DUMPPROC or DP The DUMPPROC option displays the contents of a procedure or part of a procedure. { DUMPPROC | DP } { proc-spec | proc-num } [ { offset } [range-specifier]] [IN format-specifier] proc-spec specifies the procedure name. Procedure names are case sensitive in C and C++ but not in other languages. procedure-spec is one of the following: proc-name limits the scope to the specified procedure and subprocedures. proc-name.
DUMPPROC or DP noft Options Considerations: • • The range of offsets must appear entirely within one of the specified procedures. If the offset range is outside the procedure, the output stops at the end of the procedure and noft emits an error message. The address of a code section is rounded up to a whole number of words. format-specifier specifies how the information is to be formatted. format-specifier is one of the following: { ASCII | A } displays portions of the object file in ASCII format.
DUMPPROC or DP noft Options Example 5-4. DUMPPROC Option noft> dumpproc rollem in innerlist ******** Innerlist Dump Of Procedure: rollem ******** Procedure Src Line Address Long Word Instructions ------------------------------------------------------------------------Source File: $GUEST.GAMES.
ENV noft Options ENV The ENV option displays the current settings of noft environment parameters. SHOW on page 5-47 also displays these parameters and additional parameters. ENV Example 5-5. Displaying Current noft Environment Settings noft> env Object File Environment Out File Log File Obey File Current Path : : : : : : \mysys.$qtal.jasonoft.testo Guardian noft_output (none) (none) \mysys.$qtal.jasonoft EXIT or E The EXIT option stops the noft process.
FC noft Options FC Note. This option works only in an interactive session. The FC (Fix Command) allows you to edit or repeat a previously executed command. When you enter FC, the last command line you typed appears followed by the FC prompt, a period (.), on the next line. At the prompt, you can enter the subcommands R, I, and D to replace, insert, and delete characters in the command line. See the Guardian User’s Guide for more information.
FILE or F noft Options FILE or F Note. When you run noft from the command line, you must include this option. The FILE option specifies the name of the target object file you want to use with noft. A subsequent FILE option closes the current object file and opens the specified object file. { FILE | F } { filename | ? } filename specifies the name of the target object file. filename is a Guardian filename when noft is running in the Guardian environment.
FILE or F noft Options • • • The FILE option sets the case target file parameter depending on the source files inside the object file. noft resolves Guardian filenames using the default volume and subvolume established with the option SYSTEM or VOLUME on page 5-48. noft resolves OSS filenames using the default directory established with CD on page 5-5. Example 5-6. FILE Option noft> file obj Object File File Format Scope Case : : : : $WORK.JASON.
HELP or ? noft Options HELP or ? The HELP option displays descriptions and syntax for noft options. It also displays information on topics related to using noft. { HELP | ? } [ ALL | option | help-topic ] ALL displays a single line description of each noft option (see Example 5-7 on page 5-18). option displays information about the specified option, including syntax (see Example 5-8 on page 5-19). help-topic gives detailed information on specific noft topics.
HELP or ? noft Options Example 5-7. HELP ALL Option noft> help all NOFT Help...
HELP or ? noft Options Example 5-8. HELP SET HISTORYBUFFER noft> help set historybuffer SET HISTORYBUFFER This option changes the amount of commands held in memory and available for the user to access via a FC or HISTORY command. The default buffer size is 50 commands. Syntax: { SET HISTORYBUFFER | SHB } [ number | ? ] HISTORYBUFFER number changes the NOFT command buffer to hold the specified number of commands.
HISTORY or H noft Options HISTORY or H Note. This parameter is useful only in an interactive session, because options given in the command line are not stored in the history buffer. The HISTORY option displays previously entered noft command lines. { HISTORY | H } [ number ] number specifies the number of command lines to be displayed. The default is 10 lines. Example 5-10. HISTORY Option noft> HISTORY 7 8> 9> 10> 11> 12> 13> 14> file /G/qtal/jasonoft/testo set historywindow 7 listproc * sss $qtal.
LAYOUT noft Options LAYOUT The LAYOUT option lists the parts of an object file in order by file offset. LAYOUT Example 5-11.
LISTATTRIBUTE or LA noft Options LISTATTRIBUTE or LA The LISTATTRIBUTE option lists process-specific information associated with an object file.
LISTCOMPILERS or LC noft Options Example 5-13.
LISTCOMPILERS or LC noft Options BRIEF B provides minimal information about each source file. This is the default. DETAIL D provides detailed information about each object file. The version information includes the product T-number, the product version, the platform on which the product was run. Example 5-14.
LISTCOMPILERS or LC noft Options Example 5-15. LISTCOMPILERS Option (DETAIL) (page 2 of 2) Filename File Number R_REFSHFT Compiler Front End Back End Optimizer Back End Code Generator Back End Assembler : : : : : : \CYCLONE.$PTAL.KMZMAIN.REBNDBSR 5 (not available) (not available) (not available) (not available) Filename File Number R_REFSHFT Compiler Front End Back End Optimizer Back End Code Generator Back End Assembler : : : : : : \CYCLONE.$PTAL.KMZMAIN.
LISTOPTIMIZE or LO noft Options LISTOPTIMIZE or LO The LISTOPTIMIZE option lists procedures based on their optimization level. { LISTOPTIMIZE | LO } { 0 | 1 | 2 | * } 0 lists procedures with an optimization level of 0. 1 lists procedures with an optimization level of 1. 2 lists procedures with an optimization level of 2. * list all procedures in the object file, sorted by optimization level. Example 5-16.
LISTPROC or LP noft Options LISTPROC or LP The LISTPROC option lists procedures and their subprocedures. { LISTPROC | LP } { proc-spec | proc-num | * } [ SUBPROC | SP | NOSUBPROC | NSP ] [ BRIEF | B | DETAIL | D] proc-spec specifies the procedure name. Procedure names are case sensitive in C and C++ but not in pTAL. proc-spec is one of the following: proc-name limits the scope to the specified procedure and subprocedures.
LISTPROC or LP noft Options BRIEF B provides minimal information about procedures and subprocedures. This is the default. DETAIL D provides detailed information about procedures and subprocedures. For C++ functions, DETAIL provides the “demangled” (original) names as well as the “mangled” internal equivalents. The scope settings apply only to the list of procedures. Example 5-17.
LISTSOURCE or LS noft Options LISTSOURCE or LS The LISTSOURCE option lists the source files in an object file. { LISTSOURCE | LS } source-spec [ BRIEF | B | DETAIL | D ] source-spec { source-name | source-number | * } source-name is the name of a source file to be listed. source-number is the number of a source file to be listed. * lists every source file in the object file. BRIEF B displays minimal information about source files. This is the default.
LISTSRLEXPORTS or LLE noft Options Example 5-20. LISTSOURCE Option (DETAIL) noft> listsource * detail ******** List of Source Files Number Name Size Address of First Procedure Language Optimization Level Default Symbols Compilation Timestamp Modification Timestamp ******** : : : : : : : : : 0 \CYCLONE.$PTAL.KMZRLD.DLL1C 432 bytes 0x76100390 C++ 0 Yes 2000 June 27, 17:32:06 2000 June 27, 17:32:00 noft> LISTSRLEXPORTS or LLE The LISTSRLEXPORTS or LLE option lists all the symbols exported by an SRL.
LISTSRLINFO or LLI noft Options LISTSRLINFO or LLI The LISTSRLINFO option lists the shared run-time libraries (SRLs) linked into an object file. { LISTSRLINFO | LLI } [ BRIEF | B | DETAIL | D] BRIEF displays minimal information about SRLs. This is the default. DETAIL displays detailed information about the SRLs. Example 5-21. LISTSRLINFO Option (BRIEF) noft> listsrlinfo SRL Name : ZCRESRL : ZCRTLSRL : # 0 1 Example 5-22.
LISTUNREFERENCED or LUR noft Options LISTUNREFERENCED or LUR The LISTUNREFERENCED or LUR option lists the undefined and unreferenced symbols in a pTAL object file. These symbols must be linked before the object file can be executed. (Compare this option with the option LISTUNRESOLVED or LU on page 5-35.) To find the functions in an object file that are never referenced, use the option XREFPROC or XP on page 5-49.
LISTUNREFERENCED or LUR noft Options The pTAL program in Example 5-23 explicitly declares two external functions, unresolved and unreferenced. The program also refers implicitly to the function stop. The program uses the function unresolved, but does not use the function unreferenced. Example 5-23.
LISTUNREFERENCED or LUR noft Options The C program in Example 5-25 is equivalent to the pTAL program in Example 5-23 on page 5-33. Example 5-25.
LISTUNRESOLVED or LU noft Options LISTUNRESOLVED or LU The LISTUNRESOLVED option lists the unresolved symbols in an object file. These references must be resolved before the file can be executed. (Compare this option with the option LISTUNREFERENCED or LUR on page 5-32.) { LISTUNRESOLVED | LU } { PROC | P | DATA | D | * } [ BRIEF | B | DETAIL | D | EXCLUDE | E ] PROC P displays any unresolved procedures. DATA D displays any unresolved data items. * displays all unresolved items.
LISTUNRESOLVED or LU noft Options Example 5-27. LISTUNRESOLVED Option (BRIEF) noft> # 4 5 10 11 listunresolved * brief Unresolved Name proc4__Fv proc3__Fv __nw__FUi __dl__FPv noft> Example 5-28.
LISTUNRESOLVED or LU noft Options If the program in Example 5-23 on page 5-33 is compiled and made executable, and the program file is designated to noft with the option FILE or F on page 5-15, then Example 5-29 shows the result of the LISTUNRESOLVED option. Compare Example 5-29 to Example 5-26 on page 5-34, which shows the result of the LISTUNREFERENCED option. Example 5-29.
LOG noft Options LOG The LOG option writes a copy of the current noft session’s input and output to a file (called the log file). [ SET ] LOG { filename [B] | OFF | ? } filename specifies the name of the log file. If the file exists, noft appends the log output to it. If the file does not exist, noft creates it. filename is a Guardian filename when noft is running in the Guardian environment. filename is an OSS pathname when noft is running in the OSS environment.
OBEY noft Options OBEY The OBEY option directs noft to read command lines from a specified command file. OBEY filename filename is the name of the OBEY command file. filename is a Guardian filename when noft is running in the Guardian environment. filename is an OSS pathname when noft is running in the OSS environment. The maximum size of the OSS pathname is 255 characters.
QUIT or Q noft Options OFF redirects output to the standard output file. ? displays the name of the current output file. Because the name of the file is written to the file itself, you will see the name only if the output file is the standard output file. See Example 5-34 on page 5-40. Consideration: • When sending large amounts of output to a log file in the Guardian environment, you might exceed the default file-size limits.
RESET noft Options RESET The RESET option resets one or more noft target object file parameters previously specified with SET on page 5-42 to their default values. RESET { set-param | *} set-param is one of the following target object file parameters: CASE FORMAT HISTORYBUFFER HISTORYWINDOW LINES LOG OUT SCOPEPROC SCOPESOURCE SORT * specifies that all target object file parameters are reset to their default values. The target object file parameters are defined in SET on page 5-42. Example 5-35.
SET noft Options SET The SET option sets one or more noft target object file parameters to the specified values.
SET noft Options OFF turns off case sensitivity in the noft environment. If turned off, some files and procedures written in C or C++ are unavailable. ? returns the current case-sensitivity setting. FORMAT { ASCII | A |DECIMAL | D | HEX | H | ICODE | IC | INNERLIST | IN | OCTAL | O | ? } specifies the format to use to display the object file. ASCII A displays portions of the object file in ASCII format. DECIMAL D displays portions of the object file in decimal format.
SET noft Options HISTORYBUFFER [ history-buffer-number | ? ] Note. This parameter is useful only in an interactive session, because options given in the command line are not stored in the history buffer. specifies the number of command lines in memory available to ! (Exclamation Point) on page 5-4, FC on page 5-14, and HISTORY or H on page 5-20. history-buffer-number is an integer in the range 0 through 65,535 that specifies the number of command lines in the history buffer. The default is 50.
SET noft Options LOG { filename [B] | OFF | ? } is described in LOG on page 5-38 (note that the keyword SET is optional with LOG). OUT { filename [B] | OFF | ? } is described in OUT on page 5-39 (note that the keyword SET is optional with OUT). SCOPEPROC { proc-spec | proc-num | * | ? } narrows the scope of noft options to a single procedure or subprocedure. This is helpful when trying to find unique items within a procedure or subprocedure and to limit output to a range within a single scope.
SET noft Options SCOPESOURCE { filename | file-number | * | ? } narrows the scope of noft options to a single source file. This is helpful when trying to find unique items within a source file and to limit the output to a range within the designated source file. filename is a Guardian filename when noft is running in the Guardian environment. filename is an OSS pathname when noft is running in the OSS environment. The maximum size of the OSS pathname is 255 characters.
SHOW noft Options SHOW The SHOW option displays the current values of the noft program environment parameters and the target object file parameters. It is a superset of ENV on page 5-13. SHOW [ * ] Example 5-36.
SYSTEM or VOLUME noft Options SYSTEM or VOLUME Note. Guardian environment only. A similar OSS command is CD on page 5-5. The SYSTEM or VOLUME option specifies the default node, volume, and subvolume names that noft uses to resolve partially-qualified Guardian filenames. { SYSTEM } [ \node-name ] { VOLUME } [ $volume-name ] [ subvolume-name ] [ $volume-name.subvolume-name ] [ \node-name.$volume-name ] [ \node-name.$volume-name.subvolume-name ] node-name is a node name.
XREFPROC or XP noft Options XREFPROC or XP The XREFPROC option displays an alphabetical cross-reference listing of procedures. These procedures are those shown by both the option LISTPROC or LP on page 5-27 and the option LISTUNRESOLVED or LU on page 5-35. { XREFPROC | XP } { proc-spec | proc-num | * } [ CALLEDBY | CALLS | BOTH ] [ BRIEF | B | DETAIL | D] proc-spec specifies the procedure name. Procedure names are case sensitive in C and C++ but not in COBOL or pTAL.
XREFPROC or XP noft Options CALLS lists each procedure and the procedures it calls. A scope setting restricts the procedures who are the parents of the given procedure. BOTH list the information for both CALLEDBY and CALLS. BRIEF B lists the called or calling procedures referenced by the indicated procedures. This is the default. DETAIL D lists the called or calling procedures referenced by the indicated procedures and the addresses where the calls are made.
XREFPROC or XP noft Options Example 5-37.
XREFPROC or XP noft Options If the program in Example 5-25 on page 5-34 is compiled and made executable, and the program file is designated to noft with the option FILE or F on page 5-15, then Example 5-39 on page 5-52 shows the result of the XREFPROC option. Example 5-39.
6 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.
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.
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 -a Function (page 1 of 2) 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.
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.
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. 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.
ar Utility ar accepts many kinds of files as archive members. ar recognizes two kinds of HP object files: TNS and TNS/R. All other files, including text files, are considered targetindependent files. Only archives composed entirely of the same kind of HP object file and target-independent files contain an archive symbol table and are suitable for use by Binder or nld.
7 strip Utility The strip utility removes unnecessary information from existing loadfiles in the Open System Services (OSS) environment. Unnecessary information is that which is not required for proper execution of the files, including the information in Table 7-1. Table 7-1.
strip Utility nld and noft Manual—520384-003 7 -2
8 Native Object File Structure nld and noft operate on native object files.
MDEBUG Section Native Object File Structure Shared run-time libraries (SRLs) and programs with callable procedures contain additional sections and segments. Each code and initialized data segment in a linkfile has a corresponding relocation table section. This section identifies the places within the code or data segment that contain linkable references. nld updates these references when it builds a new object file.
9 Converting From Binder to nld and noft The nld and noft utilities replace the Binder product to support the object files created by the native C, C++, COBOL, and pTAL compilers. nld and noft are used in the same part of the development process as Binder. You can perform most, but not all, tasks previously performed by Binder with nld and noft. Table 9-1.
Converting From Binder to nld and noft Linking Unit Differences Linking Unit Differences An important difference between nld and Binder is the unit of linking. In Binder, the smallest unit of linking is a code or data block. In nld, the smallest unit of linking is an entire object file.
Comparing Binder Commands to nld Options Converting From Binder to nld and noft Comparing Binder Commands to nld Options For descriptions of individual nld options, see Section 3, nld Options. Table 9-2. Comparing Binder Commands to nld Options (page 1 of 2) Binder Command nld Option Notes ADD nld treats relinkable object files as ADD *. You cannot specify unique code and data blocks because the smallest unit of linking is an object file.
Comparing Binder Commands to nld Options Converting From Binder to nld and noft Table 9-2. Comparing Binder Commands to nld Options (page 2 of 2) Binder Command nld Option OBEY obey OUT RENAME Notes You can redirect output listings with the Guardian RUN command /OUT/ option or the OSS | or > operator. rename The option -rename on page 3-12 can be used in some cases. REPLACE Link the object files again. RESELECT nld does not support SELECT parameters.
Comparing Binder Commands to nld Options Converting From Binder to nld and noft In Example 9-2, object files obja and objb are linked. Binder produces a target object file named OBJECT and nld produces a target object file named AOUT. The C runtime library is linked to the target object file and the heap is set to 10 pages. For details on how the C run-time library is linked, see C++ Programs on page 2-10. Example 9-2.
Converting From Binder to nld and noft Comparing Binder Commands to noft Options Comparing Binder Commands to noft Options For descriptions of individual noft options, see Section 5, noft Options. Table 9-3. Comparing Binder with noft (page 1 of 2) Binder Command noft Option CD CD COMMENT COMMENT DUMP DUMPADDRESS DUMPOFFSET DUMPPROC Notes In Binder, a code or data block name is specified by an offset from base of block and optional number of words.
Converting From Binder to nld and noft Comparing Binder Commands to noft Options Table 9-3. Comparing Binder with noft (page 2 of 2) Binder Command noft Option Notes LIST DATA LISTPROC noft performs this function on a procedure level instead of on a code or data block level. LIST XREF XREFPROC noft performs this function on a procedure level instead of on a code or data block level.
Converting From Binder to nld and noft Comparing Binder Commands to noft Options nld and noft Manual—520384-003 9 -8
10 • • • • • • nld Diagnostic Messages General Information on page 10-1 Terms That Appear in nld Diagnostic Messages on page 10-2 Fatal Errors on page 10-12 Nonfatal Errors on page 10-61 Warnings on page 10-69 Informational Messages on page 10-77 General Information The nld utility writes diagnostic messages to the standard output file. Table 10-1.
Terms That Appear in nld Diagnostic Messages nld Diagnostic Messages When nld encounters a Guardian file system error, the resulting error message includes the following string: errno = number string number is the file system error number and string explains the file system error number. The rest of the message provides more information about the file that encountered the problem and the nature of the problem. Terms That Appear in nld Diagnostic Messages archive.
Terms That Appear in nld Diagnostic Messages nld Diagnostic Messages COFF (common object file format). This is the name for an older object file format that the typical user should no longer be using. The newer object file format is called ELF (executable and linkable format). cold load subvolume. In Guardian, this is a location where the standard SRLs are kept. data.
nld Diagnostic Messages Terms That Appear in nld Diagnostic Messages define/definition. A symbol is said to be defined in an object file when it physically exists there. That is, space is allocated for it in one of the text or data sections within the object file. In the case of data, the symbol might also have an initial value, whereas a procedure contains executable code.
Terms That Appear in nld Diagnostic Messages nld Diagnostic Messages file code. In the Guardian environment, files have “file codes;” in particular, an object file is supposed to have file code 700. You can change the file code of a Guardian file by using the FUP ALTER command. file descriptor table. This is part of the symbol information in an object file. fixup list. This is the name for some of the information that is found within the TANDEM_GINFO section of a loadfile.
nld Diagnostic Messages Terms That Appear in nld Diagnostic Messages hexadecimal number. When a hexadecimal number is to be specified on the nld command line, it should begin with 0x or 0X, followed by a string of hexadecimal digits, which include the decimal digits 0–9 and the letters A–F (or a–f), which represent the values 10–15. When nld expects a hexadecimal number for an address, the 0x or 0X can be omitted. In other situations, however, nld assumes the number is decimal if the 0x or 0X is omitted.
Terms That Appear in nld Diagnostic Messages nld Diagnostic Messages obey file. This is a file that is specified on the nld command line with -fl or -obey on page 3-6. The contents of the file are used by nld as additional input, just as if those contents had been written directly on the nld command line. object file. An object file contains some or all of the code, data, symbol information, and so on, for a program.
nld Diagnostic Messages Terms That Appear in nld Diagnostic Messages program header. This is something found in object files built by nld. If nld has a complaint about program headers, it probably needs to be given to HP personnel for further analysis. rdata section. The rdata section is one of the five possible “data sections.” It contains readonly data. read-only data. Data is “read-only” if it is not intended to be modified at run time.
nld Diagnostic Messages Terms That Appear in nld Diagnostic Messages segment. A segment is a portion of an object file that can be considered as a single entity for purposes of loading the program into memory, even though the segment itself can contain multiple sections. The data segment contains all the data sections, except for read-only data. In a relinkable file, the text segment contains all the text as well as the read-only data.
Terms That Appear in nld Diagnostic Messages nld Diagnostic Messages SRL name. Every SRL contains an SRL name listed within the SRL. The SRL name should uniquely identify the SRL. An nld error occurs if you specify the same SRL multiple times on the nld command line when building a client, but you spell the SRL filename differently each time, making nld think it has found different SRLs with the same SRL name. standard archives/standard SRLs.
Terms That Appear in nld Diagnostic Messages nld Diagnostic Messages TANDEM_INFO. This is the name for one of the sections of an object file, and it should always be present. text. The words “code” and “text” are used interchangeably to describe the contents of procedures as opposed to data. The compiler places text into the text section of the object file. nld, when building a loadfile, can split apart the text into an (ordinary) text section and a resident text section. text section.
Fatal Errors nld Diagnostic Messages Fatal Errors Characteristics of errors: • • • Prevent nld from doing the task that it was asked to do Cause nld to stop immediately without creating an object file Cannot be suppressed Note.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1004]: The unknown flag 'flag-name' was encountered on line line-number in the -hot_proc_list file 'filename'. This is an internal error. Please contact your service provider. **** ERROR **** [1005]: A syntax error (two periods within a procedure name?) was encountered on line line-number in the -hot_proc_list file 'filename'. This is an internal error. Please contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1010]: An unknown attribute name was encountered in a -set or -change flag. See: • • -change on page 3-4. -set on page 3-13 **** ERROR **** [1011]: The value 'attribute-value' was specified for the attribute named 'attribute-name' in a -set or -change flag, but this attribute requires a value of either 'ON' or 'OFF'. See: • • -change on page 3-4.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1015]: An -obey flag was the last item found in the command stream, but a filename must be specified for the -obey flag. See -fl or -obey on page 3-6. **** ERROR **** [1016]: A -change flag was the last item found in the command stream, but an attribute, a value, and a filename must be specified for the -change flag. See -change on page 3-4.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1021]: A -d_max_size flag was the last item found in the command stream, but a numerical value must be specified for the -d_max_size flag. This is an internal error. Please contact your service provider. **** ERROR **** [1022]: A -d_max_size flag was found in the command stream, but a numerical value must be specified for the -d_max_size flag, and the next item in the command stream was 'item'. This is an internal error.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1027]: A -e flag was the last item found in the command stream, but a procedure name must be specified for the -e flag. This is an internal error. Please contact your service provider. **** ERROR **** [1028]: A -e flag was found in the command stream, but a procedure name must be specified for the -e flag, and the next item in the command stream begins instead with a hyphen. This is an internal error. Please contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1033]: An -ev_slack flag was found in the command stream, but a numerical value must be specified for the -ev_slack flag, and the next item in the command stream was 'item'. This is an internal error. Please contact your service provider. **** ERROR **** [1034]: An -ev_slack_percent flag was the last item found in the command stream, but a numerical value must be specified for the -ev_slack_percent flag. This is an internal error.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1039]: A -hot_proc_list flag was found in the command stream, but a filename must be specified for the -hot_proc_list flag, and the next item in the command stream begins instead with a hyphen. This is an internal error. Please contact your service provider. **** ERROR **** [1040]: An -import flag was found at the end of the command stream, but a symbol name and an SRL name must be specified for the -import flag. See -import on page 3-6.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1045]: A -l or -lib flag was found at the end of the command stream, but a filename must be specified for the -lib flag. See -l or -lib on page 3-7. **** ERROR **** [1046]: A -l or -lib flag was found in the command stream, but a filename must be specified for the -lib flag, and the next item in the command stream begins instead with a hyphen. See -l or -lib on page 3-7.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1051]: A filename longer than 128 characters was encountered in a -libname flag. See -libname on page 3-9. **** ERROR **** [1052]: A -o flag was found at the end of the command stream, but a filename must be specified for the -o flag. See -o on page 3-11. **** ERROR **** [1053]: A -o flag was found in the command stream, but a filename must be specified for the -o flag, and the next item in the command stream begins instead with a hyphen.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1057]: A -rename flag was found in the command stream, but two symbol names must be specified for the -rename flag, and the next item in the command stream begins instead with a hyphen. See -rename on page 3-12. **** ERROR **** [1058]: A -rename flag with a symbol name was found at the end of the command stream, but a second symbol name must also be specified for the -rename flag. See -rename on page 3-12.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1063]: An -srl_name flag was found in the command stream, but an SRL name must be specified for the -srl_name flag, and the next item in the command stream begins instead with a hyphen. This is an internal error. Please contact your service provider. **** ERROR **** [1064]: An -srl_fixup flag was found at the end of the command stream, but a filename must be specified for the -srl_fixup flag. This is an internal error.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1069]: A -t_max_size flag was the last item found in the command stream, but a numerical value must be specified for the -t_max_size flag. This is an internal error. Please contact your service provider. **** ERROR **** [1070]: A -t_max_size flag was found in the command stream, but a numerical value must be specified for the -t_max_size flag, and the next item in the command stream was 'item'. This is an internal error.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1075]: A -y flag was the last item found in the command stream, but a symbol name must be specified for the -y flag. See -y on page 3-17. **** ERROR **** [1076]: A -y flag was found in the command stream, but a symbol name must be specified for the -y flag, and the next item in the command stream begins instead with a hyphen. See -y on page 3-17. **** ERROR **** [1077]: Unrecognized flag: 'item'. See Table 3-1, nld Flag Summary, on page 3-1.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1081]: When specifying -srl_fixup flags, the only other things you are allowed to have on the command line are SRL names, -l or -lib flags, -L or -libvol flags, -libname, -verbose, and -noverbose flags. This is an internal error. Please contact your service provider. **** ERROR **** [1082]: It is incorrect to attempt cache optimization when you also specify either the -ul or -srl flags. This is an internal error. Please contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1087]: It is incorrect to specify both the -r flag and the -ul flag; use -srl when building non-executable files with -r, and then use -ul without -r when building the final user library file. This is an internal error. Please contact your service provider. **** ERROR **** [1088]: It is incorrect to specify both the -prev flag and the -ul flag; the -prev flag may only be used with the -srl flag. This is an internal error.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1093]: You specified the -srl_name flag in the wrong circumstances; -srl_name may only be specified when you specify -srl without -r, or when you specify -keep_srl_options. This is an internal error. Please contact your service provider. **** ERROR **** [1094]: You specified the -prev flag in the wrong circumstances; -prev may only be specified when you specify -srl without -r. This is an internal error. Please contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1099]: You specified -prev without also specifying -t, but the previous version of the SRL had no text section in it, so in this case you must also specify the -t flag. This is an internal error. Please contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1105]: You specified both the -prev and the -d_max_size flags, but the value that you specified in the -d_max_size flag is different from that found in the previous version of the SRL. This is an internal error. Please contact your service provider. **** ERROR **** [1106]: You specified both the -prev and the -t_max_size flags, but the value that you specified in the -t_max_size flag is different from that found in the previous version of the SRL.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1111]: Two -import flags for the symbol named 'name' specified different SRL names. See -import on page 3-6. **** ERROR **** [1112]: You are trying to build a new version of an SRL with the -prev flag, and there is now a procedure named %n. A symbol of this name was also exported in the previous version of the SRL, but in the previous version this was not the name of a procedure. This incompatibility is considered an error. This is an internal error.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1116]: You are building an SRL, and that imposes certain rules on the input object files so that NLD can have more freedom in laying out data. The input object files given to NLD have not abided by these rules. You can run NLD with the additional flags -show_internal_reloc and -verbose to get a list of which object files have broken the rules. This is an internal error. Please contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1121]: The starting address that you specified for the resident text segment in the -hot_proc_list file was too small. The starting address for non-resident text is address-1, and the size required by the non-resident text is address-2, so the smallest value that you could specify for the start of resident text is address-3, but the value specified for the -res_start flag within the -hot_proc_list file was only address-4. This is an internal error.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1126]: The total size of the data, number-1 bytes, exceeds the maximum of number-2 bytes specified in the previous version of the SRL. **** ERROR **** [1127]: The total size of the entry vector segment, number-1 bytes, exceeds the maximum of number-2 bytes specified in the previous version of the SRL. **** ERROR **** [1128]: More than one procedure has the MAIN attribute. **** ERROR **** [1129]: The text and data segments overlap.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1133]: The Guardian file system error number number occurred while trying to read one of the input object files. **** ERROR **** [1134]: The Guardian file system error number number occurred while trying to read the file named 'filename'. **** ERROR **** [1135]: An error occurred while trying to read the file named 'filename'.
Fatal Errors nld Diagnostic Messages See -bstatic on page 3-4. **** ERROR **** [1141]: The file named 'filename' is neither an SRL nor an archive, but it is required to be either an SRL or an archive because it was encountered while processing a -l, -lib, or -import flag. See: • • -import on page 3-6 -l or -lib on page 3-7 **** ERROR **** [1142]: The file named 'filename' is not an SRL, but it is required to be an SRL because its suffix is '.srl'. This is an internal error.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1146]: During the search being executed for a -l, -lib, or -import flag, the file named 'filename' was encountered, and it does not have file code 700. However, in the Guardian file system, object files are required to have file code 700. See: • • -l or -lib on page 3-7 -import on page 3-6 **** ERROR **** [1147]: The search to find an SRL did not succeed. The SRL filename that initiated the search was 'filename'.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1151]: The file named 'filename' is not an archive, but it is required to be an archive because it was found by searching for the filename specified in a -l or -lib flag and the -bstatic flag is currently in effect.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1157]: You specified the -srl or -ul flag, but the input object file named 'filename' is COFF rather than ELF. SRL's and UL's are not allowed with COFF input files, unless you also specify the -no_data_rearrange flag. This is an internal error. Please contact your service provider. **** ERROR **** [1158]: An error occurred trying to read the 'name' in the object file named 'filename'.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1163]: You specified the symbol named 'string' in a -rename flag. However, it is only possible to rename symbols that exist in code or data sections, and that is not the case for this symbol. This symbol was found in the object file named 'filename', and its 'storage class' is 'number', which is something other than code or data. See -rename on page 3-12.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1169]: The input object file named 'filename' appears to be corrupted because the header for the 8-byte literal pool section does not indicate a size that is a multiple of 8 bytes. **** ERROR **** [1170]: The input object file named 'filename' appears to be corrupted because the header for the 4-byte literal pool section does not indicate a size that is a multiple of 4 bytes.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1176]: NLD found an out of range value 'value' for the field named 'r_vaddr' for entry number 'number' in the relocation table for the name section while processing the input object file named 'filename'. This input object file may be corrupted.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1182]: The object file named 'filename' appears to be corrupted because there is a relocation table entry with relocation type 'R_MIPS_HI16' that is not immediately followed by an entry with relocation type 'R_MIPS_LO16' referring to the same symbol. This occurs at entry number number in the relocation table for the name section.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1188]: The input object file named 'filename' appears to be corrupted because there is a bad value for the 'csym' field in file descriptor table entry number number. **** ERROR **** [1189]: The input object file named 'filename' appears to be corrupted because there is a bad value for the 'ipdFirst' field in file descriptor table entry number number.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1196]: The input object file named 'filename' appears to be corrupted because there is a bad value for the 'caux' field in file descriptor table entry number number. **** ERROR **** [1197]: The input object file named 'filename' appears to be corrupted because there is a bad value for the 'issBase' field in file descriptor table entry number number.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1203]: The input object file named 'filename' appears to be corrupted because the first (0) gp tables G_VALUE entry in section 'name' does not have a G_VALUE of '0'. Instead, the G_VALUE field is number. **** ERROR **** [1204]: The input object file named 'filename' appears to be corrupted because the gp tables G_VALUE field in section 'name' at index number-1 is not in increasing order. Current G_VALUE value is number-2.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1209]: The input object file named 'filename' appears to be corrupted because there is a bad value in word number number of the auxiliary symbol table. This word was expected to be a pointer to the 'stEnd' entry in the local symbol table for the procedure named name. **** ERROR **** [1210]: The parameters given for doing the cache optimization with downward layout did not give enough space for the 'name' section.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1214]: The object file named 'filename' contains a form of code generation that NLD cannot handle. There is a pair of instructions at virtual addresses address-1 and address-2 which put together the address of another code location within the same object file.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1219]: The Guardian file system error number number occurred while trying to create a temporary output file named 'filename'. **** ERROR **** [1220]: The Guardian file system error number number occurred while trying to create a temporary output file named 'filename'.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1227]: Cannot open the file named 'filename' specified in a -strip flag. See -strip on page 3-16. **** ERROR **** [1228]: The file named 'filename' was specified for a -strip flag, but this file is an archive. Only individual, executable object files can be stripped with the -strip flag. See -strip on page 3-16. **** ERROR **** [1229]: The file named 'filename' was specified for a -strip flag, but this file is not executable.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1233]: The file named 'filename' was specified for a -change flag, but this file is an archive. Only individual, executable object files can be stripped with the -change flag. See -change on page 3-4. **** ERROR **** [1234]: The file named 'filename' was specified for a -change flag, but this is not an ELF file. The -change flag can only be used on executable ELF files. See -change on page 3-4.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1239]: Fixup list entry number number for either the code or data segment specified that the target of a jump instruction at virtual address address-1 was a procedure whose virtual address was address-2. However, a jump cannot change the first four bits of the virtual address.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1245]: An error occurred trying to read the 'name' in the object file named 'filename'. This might indicate that the object file is corrupted or otherwise unavailable. error-number. **** ERROR **** [1246]: More than one -srl_fixup flag was specified. This is an internal error. Please contact your service provider. **** ERROR **** [1247]: Cannot open the file named 'filename' specified in the -srl_fixup flag. This is an internal error.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1252]: The file named 'filename' was specified for the -srl_fixup flag, but this file appears to be corrupted because it does not have a 'section header' for the 'TANDEM_GINFO section'. This is an internal error. Please contact your service provider. **** ERROR **** [1253]: While processing SRL's for the -srl_fixup flag, the SRL name 'name' was encountered more than once. This is an internal error. Please contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1258]: The file specified for the -srl_fixup flag has 'program headers' for both non-resident and resident text, but they do not specify consecutive pieces of the object file. This is an internal error. Please contact your service provider. **** ERROR **** [1259]: The input object file named 'filename' appears to be corrupted because there is a bad value for the 'asym.sc' field in the external symbol table entry for the symbol named name.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1264]: A -use_srl_options flag was found at the end of the command stream, but a filename must be specified for the -use_srl_options flag. This is an internal error. Please contact your service provider. **** ERROR **** [1265]: A -use_srl_options flag was found in the command stream, but a filename must be specified for the -use_srl_options flag, and the next item in the command stream begins instead with a hyphen. This is an internal error.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1270]: The file name supplied with the -use_srl_options flag, 'filename', was not created with the -keep_srl_options flag. This is an internal error. Please contact your service provider. **** ERROR **** [1271]: A -cache_size flag was the last item found in the command stream, but a numerical value must be specified for the -cache_size flag. This is an internal error. Please contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1276]: It is incorrect to specify other flags along with -elf_check flags. See -elf_check on page 3-5. **** ERROR **** [1277]: Cannot open the file named 'filename' specified in the -elf_check flag. See -elf_check on page 3-5. **** ERROR **** [1278]: The file named 'filename' was specified for the -elf_check flag, but this file is an archive. The -elf_check flag only applies to individual, executable object files. See -elf_check on page 3-5.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1283]: The file named 'filename' appears to be corrupted because the TANDEM_GINFO program header and section header have different string. **** ERROR **** [1284]: The file named 'filename' appears to be corrupted because the TANDEM_GINFO.field-name field has a negative value. **** ERROR **** [1285]: The file named 'filename' appears to be corrupted because the TANDEM_GINFO field-names fields have inconsistent values.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1291]: The file named 'filename' has been corrupted from a bad string; location=address, contents=byte-1 byte-2. Strongly recommend rebuilding the file. **** ERROR **** [1292]: The symbol named 'name' was defined as storage class 'storage-class-1' in one module and as storage class 'storage-class-2' in another module. Rerun NLD using the -y option specifying this symbol name to determine which files have this storage class conflict.
Nonfatal Errors nld Diagnostic Messages Nonfatal Errors Characteristics of nonfatal errors: • • • Prevent nld from doing the task that it was asked to do Do not cause nld to stop immediately, but prevent it from creating a complete object file Cannot be suppressed Note.
Nonfatal Errors nld Diagnostic Messages **** ERROR **** [2003]: The data item named name was declared but never defined, and NLD was not told that this data item should come from an SRL, and there is a reference to it in 'filename'. This is an error, either because it is 'small' data, or because you are building an SRL, a UL, or system library. In pTAL, the EXPORT_GLOBALS directive must be 'on' to make a data item 'defined'.
Nonfatal Errors nld Diagnostic Messages **** ERROR **** [2008]: You specified the '-syslib' flag, but the input object file named 'filename' contains literal pools. This is an error because system library is not allowed to contain literal pools. You may have literal pools in your object file because you used IEEE floating point and you have not told the compiler to generate code for system library. This is an internal error. Please contact your service provider.
Nonfatal Errors nld Diagnostic Messages **** ERROR **** [2014]: Cannot relocate a jump instruction that would have to go from address-1 to address-2, in order to call the procedure named name, because a jump instruction cannot alter the high order hexadecimal digit of the address.
Nonfatal Errors nld Diagnostic Messages **** ERROR **** [2018]: Cannot relocate a gp-relative reference to a section that is not one of the 'small' data sections, because the target address is too far away from the value of the gp register. The target address is address. This occurred for entry number number-1 in the relocation table for the section-name section of the input object file named 'filename', and the reference is at byte offset number-2 within that section.
Nonfatal Errors nld Diagnostic Messages **** ERROR **** [2023]: There appears to be an inconsistency in NLD's input. NLD has not created a 'gateway' for the procedure named name. However, the input object file named 'filename' has a call to a procedure of this same name plus a period at the front. In this case there is supposed to be a gateway for this procedure. **** ERROR **** [2024]: The data item named name is defined inconsistently.
Nonfatal Errors nld Diagnostic Messages **** ERROR **** [2027]: The symbol named name is declared as an 'absolute' symbol in the object file named 'filename', and it has the value 'number-1'. However, in a different object file it had the value 'number-2'. **** ERROR **** [2028]: The symbol named name has been defined more than once, and this is not allowed for this type of symbol.
Nonfatal Errors nld Diagnostic Messages **** ERROR **** [2032]: Attempted to link together object files with inconsistent FLOATTYPE attributes (both IEEE_FLOAT and TANDEM_FLOAT). **** ERROR **** [2033]: Object file 'filename' has an invalid FLOATTYPE attribute UNUSED_FLOAT. **** ERROR **** [2034]: Storage class Common and SCommon not suported for variable 'name' from object file 'filename'.
Warnings nld Diagnostic Messages **** ERROR **** [2039]: A -NS_max_extents flag was found in the command stream, but a numerical value must be specified for the -NS_max_extents flag, and the next item in the command stream was 'name'. See -NS_max_extents on page 3-10. **** ERROR **** [2040]: The numeric value for -NS_max_extents must be between 16 and 900. See -NS_max_extents on page 3-10. **** ERROR **** [2041]: The SRL name 'srl-name' cannot be longer than number characters.
Warnings nld Diagnostic Messages **** WARNING **** [10000]: The value specified in the -d flag was rounded up to number. This is an internal warning. Please contact your service provider. **** WARNING **** [10001]: The value specified in the -t flag was rounded up to number. This is an internal warning. Please contact your service provider. **** WARNING **** [10002]: The value specified in the -kseg0 flag was rounded up to number. This is an internal warning. Please contact your service provider.
Warnings nld Diagnostic Messages **** WARNING **** [10007]: It is incorrect to specify both the -r flag and the -s flag. The -r flag tells NLD to build a non-executable file. The -s flag tells NLD to completely strip symbols information from its output file, which is only possible when building an executable file. The -s flag has been ignored. See: • • -r on page 3-11 -s on page 3-12 **** WARNING **** [10008]: The 'common' data item named name has size 0.
Warnings nld Diagnostic Messages **** WARNING **** [10013]: The symbol named name is supposed to come from the SRL named 'filename', but no filename was specified for this SRL, so SRL fixups have not been performed. The SRL filename should be specified later when you repeat the SRL fixup process or run the program. **** WARNING **** [10014]: The symbol named name is supposed to come from the SRL named 'filename', but this SRL does not export a symbol of this name, so SRL fixups have not been performed.
Warnings nld Diagnostic Messages **** WARNING **** [10020]: The symbol named name was defined as 'common data' in the object file named 'filename', but in another object file it was defined as a procedure. For a list of all the object files that declared this symbol, run NLD again with the additional flags '-y symbol' and -verbose.
Warnings nld Diagnostic Messages **** WARNING **** [10025]: NLD was unable to determine the name of the cold load subvolume SYSTEM.SYS via the NODE_GETCOLDLOADINFO_ system call. NLD is continuing, but NLD will not be able to search through the cold load subvolume for the standard archives or SRL's. **** WARNING **** [10026]: The search to find an SRL or an archive for a -l or -lib flag did not succeed, but NLD is continuing because the -allow_missing_libs flag was specified.
Warnings nld Diagnostic Messages **** WARNING **** [10031]: One or more input object files have FLOATTYPE attribute IEEE_FLOAT but the -set FLOATTYPE flag specifies 'attribute-value'. This may result in incorrect behavior. See -set on page 3-13. **** WARNING **** [10032]: One or more input object files have FLOATTYPE attribute TANDEM_FLOAT but the -set FLOATTYPE flag specifies 'attribute-value'. This may result in incorrect behavior. See -set on page 3-13.
Warnings nld Diagnostic Messages **** WARNING **** [10039]: The file named 'filename' may have been corrupted from a bad string; location=address, contents=byte-1 byte-2. **** WARNING **** [10040]: Existing file had name of desired output file and file was in use. Existing file named 'filename-1' was renamed to 'filename-2'. **** WARNING **** [10041]: Could not name output file to name requested. Output file name 'filename-1' was changed to 'filename-2'.
Informational Messages nld Diagnostic Messages Informational Messages Characteristics of informational messages: • • • • Provide information that might help you Allow nld to complete normally Are issued if the flag -verbose on page 3-16 is specified Are suppressed if the flag -noverbose on page 3-10 is specified For -verbose and -noverbose defaults, see Table 10-2 on page 10-1. Note.
Informational Messages nld Diagnostic Messages **** INFORMATIONAL MESSAGE **** [20004]: The '-yflag' symbol named 'name' is defined in the input object file named 'filename'. **** INFORMATIONAL MESSAGE **** [20005]: The input object file named 'filename' does not have all the expected gp tables. **** INFORMATIONAL MESSAGE **** [20006]: There was a problem with GP-relative addressing, but some of the input object files lack gp tables, so the calculation of the best -G value will be unreliable.
Informational Messages nld Diagnostic Messages **** INFORMATIONAL MESSAGE **** [20012]: The -G value recommended above may be unreliable if some object files were compiled with a -G value less than 8, due to complexities related to literal pools. **** INFORMATIONAL MESSAGE **** [20013]: The new version of the SRL is equivalent to the previous version, which means that there were no new exports, nor did any old exports go away or change their addresses.
Informational Messages nld Diagnostic Messages **** INFORMATIONAL MESSAGE **** [20020]: NLD is doing the cache optimization with these parameters: list **** INFORMATIONAL MESSAGE **** [20021]: The '-yflag' symbol named 'name' is defined as a static data item in the input object file named 'filename'. **** INFORMATIONAL MESSAGE **** [20022]: The SRL name or archive name specified as 'filename' in a -l, -lib, or -import flag was resolved to the item named 'name'. See -import on page 3-6.
Informational Messages nld Diagnostic Messages **** INFORMATIONAL MESSAGE **** [20028]: Attempts to rename existing output file filename were not successful. The last file system error was error-number. The next message will indicate the file name that will be used for the new output file. **** INFORMATIONAL MESSAGE **** [20029]: Attempts to rename existing output file filename were not successful. The last file system error was error-number.
Informational Messages nld Diagnostic Messages nld and noft Manual—520384-003 10 -82
11 • • • • noft Diagnostic Messages Fatal Errors on page 11-1 Data Errors on page 11-4 Warnings on page 11-18 Syntax Errors on page 11-22 The messages are listed in numeric order and grouped by type. Missing numbers in message sequences are reserved for future development. Fatal Errors *** FATAL ERROR *** [1]: Cannot begin to allocate memory for cross reference data. Cause. noft cannot allocate memory, probably because noft has an internal problem. Recovery.
Fatal Errors noft Diagnostic Messages *** FATAL ERROR *** [6]: Integrity problem detected in function name. Cause. An integrity check failed in the function name. This probably means that there is an internal error. Recovery. Give the object file being examined and the series of commands that you used to your service provider for analysis. *** FATAL ERROR *** [7]: Some problem initializing options. Cause. An internal table is corrupt. Recovery. Restart noft and then the commands in question.
Fatal Errors noft Diagnostic Messages *** FATAL ERROR *** [11]: Unable to add text for token text. Cause. noft cannot allocate memory, probably because noft has an internal problem. Recovery. Give the object file being examined and the series of commands that you used to your service provider for analysis. *** FATAL ERROR *** [12]: Unable to add to history line: previous-line. Cause. noft cannot allocate memory, probably because noft has an internal problem. Recovery.
Data Errors noft Diagnostic Messages *** FATAL ERROR *** [16]: Unable to continue getting cross reference data. Cause. noft cannot allocate memory, probably because noft has an internal problem. Recovery. Give the object file being examined and the series of commands that you used to your service provider for analysis. *** FATAL ERROR *** [17]: Unable to read table-name into memory. Cause. The object file is corrupt. Recovery. Rebuild the object file with symbols information.
Data Errors noft Diagnostic Messages *** DATA ERROR *** [1001]: Cannot find end of file. Cause. The object file was stripped of its symbol table. Recovery. Rebuild the object file with symbols information. *** DATA ERROR *** [1002]: Cannot find parent proc for procedure-name. Cause. The specified procedure was not a subprocedure. Recovery. Use LISTPROC BRIEF and LISTPROC SUBPROC DETAIL to determine if there is a relationship between the two procedures (see LISTPROC or LP on page 5-27).
Data Errors noft Diagnostic Messages *** DATA ERROR *** [1006]: This duplicate function has been eliminated by the linker. Cause. You used LISTPROC proc-num, and proc-num refers to a procedure that the linker removed (because it was a duplicate). When two different compilation units include the same procedure, the linker keeps one copy and removes the duplicate when it builds the new object file. Recovery.
Data Errors noft Diagnostic Messages *** DATA ERROR *** [1010]: Did not find any external symbols belonging to name, check options and full external table. Cause. Stated in message. Recovery. Stated in message. *** DATA ERROR *** [1011]: Did not find any external symbols defined in object file, check options and full external table. Cause. Stated in message. Recovery. Stated in message.
Data Errors noft Diagnostic Messages *** DATA ERROR *** [1015]: Did not find any undefined symbols matching scope. Cause. No undefined symbols exist in the current scope. Recovery. Examine the entire object file (instead of a procedure or source file) for unresolved symbols information. *** DATA ERROR *** [1016]: ELF and external symbol tables not consistent. Cause. There is an internal problem with noft. Recovery.
Data Errors noft Diagnostic Messages *** DATA ERROR *** [1021]: No optional header, not a valid COFF file. Cause. Stated in message. Recovery. Rebuild the object file. *** DATA ERROR *** [1022]: No procedures at specified optimization level. Cause. No procedures exist at the specified optimization level. Recovery.
Data Errors noft Diagnostic Messages *** DATA ERROR *** [1028]: Object file has been at least partially stripped, unable to continue. Cause. The object file is partially stripped of its symbols information. Recovery. Rebuild the object file with complete symbols information. *** DATA ERROR *** [1029]: PROC command only works on object files with symbols. Cause. DUMPPROC or DP on page 5-10, LISTPROC or LP on page 5-27, or XREFPROC or XP on page 5-49 did not work because the object file has no symbols.
Data Errors noft Diagnostic Messages *** DATA ERROR *** [1034]: Some problem printing text. Cause. An internal table is corrupt. Recovery. Restart noft and reissue the commands in question. *** DATA ERROR *** [1035]: Some sort of problem reading runtime procedure table for names. Cause. noft cannot allocate memory for the run-time procedure table, probably because noft has an internal problem. Recovery.
Data Errors noft Diagnostic Messages *** DATA ERROR *** [1038]: This command only works on ELF files. Cause. A COFF file was specified for a command that works only on ELF files. Recovery. Specify an ELF file instead of the COFF file. *** DATA ERROR *** [1039]: Unable to allocate memory. Cause. noft cannot allocate memory, probably because noft has an internal problem. Recovery. Give the object file being examined and the series of commands that you used to your service provider for analysis.
Data Errors noft Diagnostic Messages *** DATA ERROR *** [1043]: Unable to dump some unresolved items. Cause. An internal table is corrupt. Recovery. Restart noft and reenter the command. *** DATA ERROR *** [1044]: Unable to locate current [directory|subvolume]. Cause. Either the directory (pathname) specified in CD on page 5-5 is not present or the subvolume-name specified in the SYSTEM or VOLUME on page 5-48 is not present. Recovery. Ensure that the specified directory or subvolume exists.
Data Errors noft Diagnostic Messages *** DATA ERROR *** [1048]: Unable to reset option, please reset manually. Cause. FILE or F on page 5-15 encountered a problem when trying to SET SCOPEPROC, SET SCOPESOURCE, and SET CASE to their defaults. Recovery. Use RESET on page 5-41 to reset SCOPEPROC, SCOPESOURCE, and CASE (or all of the SET parameters) to their defaults and then enter the desired new option value. *** DATA ERROR *** [1049]: Unable to retrieve [first|second] timestamp. Cause.
Data Errors noft Diagnostic Messages *** DATA ERROR *** [1052]: Unable to allocate memory for obey file: filename. Cause. noft cannot allocate memory, probably because noft has an internal problem. Recovery. Give the object file being examined and the series of commands that you used to your service provider for analysis. *** DATA ERROR *** [1053]: Cannot dump this ELF file because it has no section headers. Cause. Stated in message. Recovery. Rebuild the object file.
Data Errors noft Diagnostic Messages *** DATA ERROR *** [1057]: Unable to dump srl fixup item. Cause. LISTSRLFIXUPS or LLF on page 5-30 was limited by either SET SCOPEPROC or SET SCOPESOURCE. An error occurred while attempting to display the information. Recovery. Use RESET on page 5-41 to reset the scope to its default. *** DATA ERROR *** [1058]: Did not find any procedures matching scope. Cause. LISTPROC or LP on page 5-27 was limited by either SET SCOPEPROC or SET SCOPESOURCE.
Data Errors noft Diagnostic Messages *** DATA ERROR *** [1062]: Source file is not a text file. with this file. Innerlist can not be done Cause. noft found a file that has the specified name, but that file is not a text file. Recovery. Use ENV on page 5-13 to find the filename. Check the file content to be sure it is a text file. If the file does not exist, check the original compilation location and verify the file.
Warnings noft Diagnostic Messages Warnings Warnings do not stop noft; therefore, the information under Recovery is merely a correction you can make to eliminate the problem that causes each warning. *** WARNING *** [2000]: End of offset outside of procedure, dumping to end of procedure. Cause. The specified range of addresses or offsets goes outside the scope of the procedure. Recovery. Remove the scoping of the procedure with SET SCOPEPROC * (see SET on page 5-42). Limit the range within the procedure.
Warnings noft Diagnostic Messages *** WARNING *** [2004]: Specified range jumps section boundaries, dumping to end of section. Cause. The range of addresses or offsets goes past a section boundary in the object file; therefore, it is not safe to contiguously dump or list. Recovery. Respecify the desired addresses or offsets in two parts around the section boundary. *** WARNING *** [2005]: This command only works on COFF files, using TANDEMINFO instead ... Cause.
Warnings noft Diagnostic Messages *** WARNING *** [2009]: Cannot convert line number to Tandem edit line number. Cause. In the Guardian environment, you used the INNERLIST option of DUMPADDRESS or DA on page 5-6, DUMPOFFSET or DO on page 5-8, or DUMPPROC or DP on page 5-10. Recovery. Use LISTPROC or LP on page 5-27 with the DETAIL option to see the name of the source file. Verify that the source file is the same edit file that was used when the module was compiled.
Warnings noft Diagnostic Messages *** WARNING *** [2013]: LISTUNRESOLVED Exclude option not supported on PIC objects, option ignored... Cause. The current object file is a PIC object file, and you specified the EXCLUDE option in the LISTUNRESOLVED or LU on page 5-35. Recovery. Reissue the LISTUNRESOLVED or LU on page 5-35 without the EXCLUDE option. *** WARNING *** [2014]: LISTUNRESOLVED Detail option not supported on PIC objects, option ignored... Cause.
Syntax Errors noft Diagnostic Messages Syntax Errors *** SYNTAX ERROR *** [3000]: command requires a decimal number. Cause. You can only specify a decimal number for a procedure or source file. Recovery. Recompute the number in decimal format. *** SYNTAX ERROR *** [3001]: command number Event not found. Cause. Either the specified command number is higher than the current command number or the command number specified is out of the history buffer. Recovery.
Syntax Errors noft Diagnostic Messages *** SYNTAX ERROR *** [3005]: Address specification not properly formed. Cause. Part of the syntax of an address range is missing. Recovery. Correct the syntax of DUMPADDRESS or DA on page 5-6. *** SYNTAX ERROR *** [3006]: Addresses are in the form 0xXXXXXXXX text. Cause. Addresses are only 8-digit hexadecimal numbers starting with “0x”. No other format is supported. Recovery. Recompute the addresses to hexadecimal in this format.
Syntax Errors noft Diagnostic Messages *** SYNTAX ERROR *** [3010]: Command COMMENT: end of file reached. Cause. COMMENT on page 5-5 has reached the end of the file. Recovery. Retype the comment text. *** SYNTAX ERROR *** [3011]: Command specific option did not change settings, command aborted. Cause. noft cannot tell if the option is the one intended; therefore, noft does not stream large amounts of output. Recovery. Do not respecify any options or settings that have already been set with DUMP or LIST.
Syntax Errors noft Diagnostic Messages *** SYNTAX ERROR *** [3015]: Incorrect path specification syntax. Cause. Two or more subvolumes are specified. Recovery. Specify only one subvolume. *** SYNTAX ERROR *** [3016]: Invalid formatting parameter, command ignored. Cause. SET FORMAT has an invalid option. Recovery. Reissue SET FORMAT, using a valid option (see SET on page 5-42). *** SYNTAX ERROR *** [3017]: Invalid optimization level specified. Cause. LISTOPTIMIZE or LO on page 5-26 has an invalid level.
Syntax Errors noft Diagnostic Messages *** SYNTAX ERROR *** [3021]: No SRL references in procedure, command ignored. Cause. This error occurs for the undocumented SRLINFO command. It indicates that no information was returned for the range restricted by either SET SCOPESOURCE or SET SCOPEPROC. Recovery. Either use RESET on page 5-41 to reset the scope to its default or use SET on page 5-42 to change the scope. To see the current scope, use SHOW on page 5-47.
Syntax Errors noft Diagnostic Messages *** SYNTAX ERROR *** [3025]: No symbol table available, command ignored. Cause. This error occurs for various undocumented commands. It indicates that either a SET SCOPESOURCE command or SET SCOPEPROC command was given, but there was no symbol table. Recovery. Either use RESET on page 5-41 to reset the scope to its default, use SET on page 5-42 to change the scope, or recompile the program with symbol information. To see the current scope, use SHOW on page 5-47.
Syntax Errors noft Diagnostic Messages *** SYNTAX ERROR *** [3029]: Unable to find procedure in object file. Cause. noft cannot find the specified procedure name. Recovery. Ensure that the specified procedure exists in the object file and that its name is spelled correctly. Use LISTPROC * SET SCOPESOURCE source-file, where source-file is the name of the source file that contains the procedure or the number of the source file. (See LISTPROC or LP on page 5-27 and SET on page 5-42.
Syntax Errors noft Diagnostic Messages *** SYNTAX ERROR *** [3034]: Some problem dumping name. Cause. This error occurs for several undocumented commands. It indicates that no information was found in the scope. Recovery. Either use RESET on page 5-41 to reset the scope to its default or use SET on page 5-42 to change the scope. To see the current scope, use SHOW on page 5-47. *** SYNTAX ERROR *** [3035]: Source file filename not in correct position. Cause.
Syntax Errors noft Diagnostic Messages *** SYNTAX ERROR *** [3038]: Specified range not within a text section. Cause. noft cannot find the specified addresses in the object file. Recovery. Ensure that the addresses exist in the object file. Rebuild the object file with complete symbols information. *** SYNTAX ERROR *** [3039]: The CD command is not for the Guardian OS, try the SYSTEM and VOLUME commands. Cause. The CD command works only in the OSS environment. Recovery.
Syntax Errors noft Diagnostic Messages *** SYNTAX ERROR *** [3043]: Unable to find ELF symbol to correspond with correct procedure. Cause. This error occurs for the undocumented RELOC command. It indicates that a SET SCOPEPROC command was given but no symbol table was found. Recovery. Either use RESET on page 5-41 to reset the scope to its default, use SET on page 5-42 to change the scope, or recompile the module with symbols. To see the current scope, use SHOW on page 5-47.
Syntax Errors noft Diagnostic Messages *** SYNTAX ERROR *** [3048]: Unable to find line number in history. Cause. The number is out of the history buffer range. Recovery. Use the SET HISTORYBUFFER command to set the size of the history buffer (see SET on page 5-42). *** SYNTAX ERROR *** [3049]: Unable to find string string in history. Cause. The string was not found at the beginning of any lines in the current history buffer. Recovery. Ensure that the command is still in the current history buffer.
Syntax Errors noft Diagnostic Messages *** SYNTAX ERROR *** [3053]: Unable to open object file filename, command ignored. Cause. One of the following: • • • The object file cannot be found. The object file cannot be opened because it is corrupted. The object file is already open for writing. Recovery. Ensure that the object file name is spelled correctly and is in the current directory. Ensure that the object file is not in use. Rebuild the object file.
Syntax Errors noft Diagnostic Messages *** SYNTAX ERROR *** [3059]: In range option, option-name. Cause. A syntax error was encountered while parsing range information. Additional text is provided with the error. Recovery. Re-enter the command with the correct range clause. *** SYNTAX ERROR *** [3060]: Extraneous characters at end of range option. Cause. A syntax error was encountered while parsing range information. Recovery. Re-enter the command with the correct range clause.
Syntax Errors noft Diagnostic Messages *** SYNTAX ERROR *** [3064]: Only subvolume level and above allowed. Cause. In SYSTEM or VOLUME on page 5-48, the combination of node, volume, and subvolume was invalid (for example, VOLUME $VOL1.SUBVOL2.FILE3). Recovery. Give the SYSTEM or VOLUME option a valid combination of node, volume, and subvolume.
Syntax Errors noft Diagnostic Messages nld and noft Manual—520384-003 11 -36
12 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. Recovery. If archive refers to a file that is not currently in archive format, delete that file and reenter the ar command. If archive refers to an archive that was built by the ar utility in another environment, check the file code of that file using the FUP utility; if the file code is not 700, change it using FUP.
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 nld and noft Manual—520384-003 12- 8
A Sample nld and noft Session This appendix demonstrates basic nld and noft commands. The examples are shown in the Guardian environment, but results would be virtually identical in the Open Systems Services (OSS) environment. The example source code is compiled with TNS/R native C compiler.
Header Files Sample nld and noft Session Subsections: • • • • • Header Files on page A-2 Source Module MAINC on page A-3 Source Module MODULE1C on page A-3 Source Module MODULE2C on page A-5 User Library UTILC on page A-6 Header Files The source modules and the user library module use the following header files: Header File Module GLOBALSH MODULE1H MAINC X X MODULE1C X X MODULE2C X MODULE2H X UTILC 0 .001 #define BUS_STOP_CAPACITY 50 .002 #define BUS_CAPACITY 44 .003 #define MAXSTOPS 5 .
Source Module MAINC Sample nld and noft Session Example A-4. Header File UTILH With Edit Line Number 1 void seed_random_number(void); Source Module MAINC Source module MAINC has the main function. The main function calls the initialize function to allocate the bus stop array and to set a random number of passengers in each cell of the array. The main function then loops, incrementing a counter until the counter is greater then the number of bus stops.
Source Module MODULE1C Sample nld and noft Session The wrap-up function displays the number of passengers on the bus at the last stop and goes through the bus stop array, printing the number of people left at each stop. The bus stop array is then freed. Example A-6. Source Module MODULE1C With Edit Line Numbers .1 1 1.001 1.01 1.011 1.1 1.2 2 3 4 4.01 4.02 4.1 5 5.1 6 6.01 6.02 6.03 6.04 6.05 6.1 7 8 9 17 18 19 19.01 19.1 19.11 19.2 19.3 20 20.1 20.2 20.3 20.
Source Module MODULE2C Sample nld and noft Session Source Module MODULE2C Source module MODULE2C contains the add_passengers and delete_passengers functions. The add_passengers function checks to see if the current number of passengers on the bus plus the number of passengers at the bus stop exceeds the capacity of the bus.
User Library UTILC Sample nld and noft Session User Library UTILC The user library UTILC contains the seed_random_number function. This function gets the current time, converts it to a time structure, and multiplies the minutes by the seconds to seed the random number generator. Example A-8. User Library UTILC With Edit Line Numbers 1 1.1 2 3 3.1 4 5 5.001 5.01 5.02 5.1 6 7 9 10 11 12 13 18 #pragma nolist #include #include #pragma list #include "util.
nld Command Examples Sample nld and noft Session nld Command Examples Example A-9 is a multiline TACL command that runs nld with the options used to make an executable user library called UTILLIB. Example A-9. Linking an Executable User Library nld utilo & &-l zcresrl -l zcrtlsrl & &-o utillib -set inspect on -ul The program UTILLIB is executable, but it does not have a main function. The SRL libraries ZCRESRL and ZCRTLSRL allow nld to link functions to the correct addresses in the SRLs.
Program Output Sample nld and noft Session Program Output Run the program with this command: run example1 Example A-11. Sample Program Output 1> run example1 Number of people on bus at last stop = 31. Passengers remaining at each bus stop. Bus Stop Passenger Count 1 0 2 0 3 2 4 0 5 0 2> run example1 Number of people on bus at last stop = 38. Passengers remaining at each bus stop. Bus Stop Passenger Count 1 1 2 19 3 23 4 21 5 0 3> run example1 Number of people on bus at last stop = 35.
noft Command Examples on a Linkfile Sample nld and noft Session noft Command Examples on a Linkfile These examples use noft to examine information in some of the compiled modules. These examples use full flag names (instead of abbreviated ones) and for options that offer the choice of BRIEF or DETAIL, these examples use DETAIL.
LISTCOMPILERS Sample nld and noft Session LISTCOMPILERS Example A-14 uses the LISTCOMPILERS option with the DETAIL parameter to list the compiler components used for each source file containing executable code statements. Header files and other files containing data declarations, DEFINE definitions, and function prototypes are not included. Example A-14.
LISTPROC Sample nld and noft Session Label Description (page 2 of 2) Callable Whether the function was marked “callable” at compilation time. Procedures are marked “callable” at compilation time as part of the mechanism used by HP for writing operating system code. It is not expected that the typical user will do this. The syntax for specifying a callable procedure depends on the language; it is beyond the scope of this manual to explain the syntax of specific languages.
LISTSOURCE Sample nld and noft Session LISTSOURCE You can use the LISTSOURCE option to see the source files that were used to build the object file. The DETAIL parameter displays the information shown in Example A-16. The address of the first procedure is more meaningful for a loadfile. Example A-16.
LISTSRLINFO Sample nld and noft Session LISTSRLINFO The function main in the object file MAINO calls a function in an SRL, but the SRL information has not been linked into the compiled linkfile. The SRL information is in the GINFO table that is only in the loadfile. The LISTSRLINFO option cannot find the table with the SRL information, so it issues the message shown in Example A-17. Example A-17.
LISTUNRESOLVED Sample nld and noft Session LISTUNRESOLVED The object file MAINO has not been linked with the other object file into a loadfile, so function calls are unresolved. The LISTUNRESOLVED option displays the names of functions and data that still need to be linked. The DETAIL parameter provides expanded information, including the type (Proc[edure] or Data) and the address where the name is used.
noft Command Examples on a Loadfile Sample nld and noft Session noft Command Examples on a Loadfile This subsection repeats the commands in noft Command Examples on a Linkfile on page A-9 on the program file EXAMPLE1, except that for options that offer the choice of BRIEF or DETAIL, these examples use BRIEF.
LISTATTRIBUTE Sample nld and noft Session LISTATTRIBUTE The LISTATTRIBUTE option shows more information for a loadfile than for a linkfile. The attributes Process Subtype, Highrequesters, Runnamed, Highpin, Saveabend, DEBUG/INSPECT, Maximum Heap Size, Main Stack Size, Space Guarantee, and PFS Size can be set or changed with nld. The attribute Directly Needed Public SRL Bitmap shows where the Directly Needed Public SRLs are placed in all the possible 128 SRLs.
LISTCOMPILERS Sample nld and noft Session LISTCOMPILERS The BRIEF parameter on the LISTCOMPILERS option shows a summary of the compilers used to produce the object file. The object file in Example A-21 was created from the three modules for the example program, which used one version of the C compiler, and the two modules that were used to build $SYSTEM.SYSTEM.CRTLMAIN, which used a different version of the C compiler. Example A-21.
LISTSOURCE Sample nld and noft Session LISTSOURCE The LISTSOURCE option shows all source files used to make the loadfile. The address does not change for sources that did not contribute code to the file. The ordinal number can be used for options that accept either the name or the number. Example A-23.
SET SORT Sample nld and noft Session SET SORT Example A-24 changes the setting of SORT and repeats the options in Example A-22 on page A-17 and Example A-23 on page A-18. Example A-24.
LISTUNRESOLVED Sample nld and noft Session LISTUNRESOLVED The list of unresolved functions and data is different for the loadfile EXAMPLE1 than the linkfile MAINO. The output of the LISTUNRESOLVED option in Example A-26 is affected by the SET SORT ALPHA option done in Example A-24 on page A-19. Example A-26.
LISTOPTIMIZE Sample nld and noft Session LISTOPTIMIZE The LISTOPTIMIZE option in Example A-27 shows that the functions linked in from CRTLMAIN have optimization level 2 and the functions from the example program have optimization level 0. The output of the LISTOPTIMIZE option in Example A-27 is affected by the SET SORT ALPHA option done in Example A-24 on page A-19. Example A-27.
XREFPROC Sample nld and noft Session Example A-30 uses the RESET SCOPESOURCE option to remove the scoping limits and then repeats the XREFPROC option. Example A-30.
XREFPROC Sample nld and noft Session Example A-31 on page A-23 uses the XREFPROC option to get DETAIL information about the unresolved external procedure rand. The output shows that rand is called from the delete_passengers function and the initialize function and the addresses where the calls occur. Example A-31.
DUMPPROC Sample nld and noft Session DUMPPROC You can use the DUMPPROC option to see the code in the function delete_passengers. Example A-32.
DUMPPROC Sample nld and noft Session It is often easier to figure out what the executable code is doing when you can see its source code. If the source file is available, changing the setting of FORMAT to INNERLIST can change the output display of DUMPPROC, DUMPADDRESS, and DUMPOFFSET options. Example A-33 shows how the SET FORMAT INNERLIST option affects the DUMPPROC option used in Example A-32 on page A-24, which Example A-33 re-executes by means of the FC option. Example A-33.
LISTSRLFIXUPS Sample nld and noft Session Example A-33. Effect of SET FORMAT INNERLIST on DUMPPROC Option (page 2 of 2) [delete_passengers 16100] 0x70000694 0000000000 nop 16.
LISTSRLEXPORTS Sample nld and noft Session LISTSRLEXPORTS Example A-35 uses the FILE option to tell noft to examine the executable user library, UTILLIB. Then Example A-35 uses the LISTSRLEXPORTS option to show the functions the user library is exporting. Example A-35. LISTSRLEXPORTS Option noft> FILE UTILLIB Object File File Format Scope Case : : : : \DLLQA.$D0117.CRGMAN.
LISTSRLFIXUPS Sample nld and noft Session nld and noft Manual—520384-003 A -28
Glossary absolute pathname. A pathname that begins with a slash (/) character and is resolved beginning with the root directory. Compare to relative pathname. ANSI. American National Standards Institute, ar utility. A utility that creates and maintains archives of files for use by nld. archive file. A file that contains a collection of object files. The ar utility creates archive files. binding.
filename Glossary filename. In the OSS environment, a component of a pathname containing any valid characters other than a slash (/) or a null. In the Guardian environment, a filename is the set of node name, volume name, subvolume name, and file identifier characters that uniquely identifies a file. In a command stream, either a token that is not part of an option, such as an input file for nld to read, or a parameter for an option, as in -o filename. flag.
map DEFINE Glossary map DEFINE. A map DEFINE redirects or substitutes files in the Guardian environment. You can enter the logical name of a map DEFINE in place of a physical file name in contexts that allow it. native-compiled RISC instructions. See RISC instructions. native C compiler. See TNS/R native C compiler. native mode. See TNS/R native mode. native object code. See TNS/R native object code. native object file. See TNS/R native object file. native object file tool. See noft utility.
option Glossary option. Either a flag and its parameters or a flag that has no parameters; for example: • • • • -o filename -rename oldname newname -set SYSTYPE OSS -verbose OSS. See Open System Services (OSS). OSS environment. The OSS API, tools, and utilities. PIC (position-independent code). Executable code that need not be modified to run at different virtual addresses. External reference addresses appear only in a data area that can be modified by the loader; they do not appear in PIC code.
RISC instructions Glossary RISC instructions. Register-oriented 32-bit machine instructions that are directly executed on TNS/R processors. RISC instructions execute only on TNS/R systems, not on TNS systems. Accelerator-generated RISC instructions are produced by accelerating TNS object code. Native-compiled RISC instructions are produced by compiling source code with a TNS/R native compiler. RISC word. An instruction-set-defined unit of memory.
TNS/R native object code. Glossary TNS/R native object code. The RISC instructions that result from processing program source code with a TNS/R native compiler. TNS/R native object code is optimized to fully exploit the performance of the RISC architecture. TNS/R native object code executes only on TNS/R systems, not on TNS systems. TNS/R native object file.
Index A allow_duplicate_procs flag (nld) 3-2 allow_missing_libs flag (nld) 3-3 allow_multiple_mains flag (nld) 3-3 ansistreams flag (nld) 3-3 ar utility details of 6-1/6-6 diagnostic messages of 12-1/12-7 overview of 1-5 Archive files bdynamic flag and 3-3 bstatic flag and 3-4 creating 2-21 linking 2-21/2-22 missing 3-3 searching for 2-27/2-28 Archive tool See ar utility Attributes of files changing 3-4 listing 5-22/5-23 setting 3-13/3-15 B bdynamic flag (nld) 3-3 Binder compared to nld utility 9-3/9-5 com
D Index C++ run-time library Guardian nld utility and 2-18 OSS nld utility and 2-19 D Data declaration and definition 2-31 Data errors (noft) 11-4/11-16 Data segments 8-1/8-2 Debugging 4-7/4-11 Diagnostic messages ar 12-1/12-7 nld errors fatal 10-12/10-60 Guardian file system 10-2 nonfatal 10-61/10-69 in general 10-1/10-2 informational 10-77/10-81 terms that appear in 10-2/10-11 warnings 10-69/10-76 noft errors data 11-4/11-16 fatal 11-1/11-4 syntax 11-22/11-35 warnings 11-18/11-21 Dialects of C++ 2-10/2
G Index File code 700 1-2 FILE flag (noft) description of 5-15/5-16 in sample session A-9, A-15 File naming conventions 2-27 Filenames, simple, searching for 2-27 Flags editing 5-14 repeating 5-14 Floating-point programs, linking 2-22/2-26 Floating-point type checking consistency of at link time 2-23/2-24 at run time 2-25/2-26 mixed-language programs and 2-26 specifying 2-22 FLOATTYPE attribute default value of 3-15 description of 3-13 FLOAT_LIB_OVERRULE attribute 3-13 G Guardian environment for nld 2-1/
L Index LIBCOBEY file C programs and 2-9 C++ programs and 2-12 libc.
M Index LISTSOURCE or LS flag (noft) description of 5-29/5-30 in sample session applied to linkfile A-12 applied to loadfile A-18 SET SORT’s effect on A-19 LISTSRLEXPORTS or LLE flag (noft) description of 5-30 in sample session A-27 LISTSRLFIXUPS or LLF flag (noft) description of 5-30 in sample session A-27 LISTSRLINFO or LLI flag (noft) description of 5-31 in sample session applied to linkfile A-13 applied to loadfile A-19 LISTUNREFERENCED or LUR flag (noft) 5-32/5-34 LISTUNRESOLVED or LU flag (noft) des
N Index Native object file tool See noft utility Native object files overview of 1-2 structure of 8-1/8-2 NEUTRAL_FLOAT attribute value 3-13 nld utility case sensitivity in Guardian 2-2 OSS 2-3 command files for 3-6 compared to Binder 9-3/9-5 compilation rules for 2-29/2-31 flags of 3-1/3-2 in the Guardian environment 2-1/2-2 in the OSS environment 2-3/2-4 on the PC 2-4/2-7 options of 3-1/3-17 output file of 3-11 overview of 1-2 preventing messages from 3-10 renaming procedures with 3-12 sample session fo
O Index O o flag (nld) 3-11 obey flag (nld) 3-6 OBEY flag (noft) 5-39 Object files changing attributes of 3-4 creating 2-8 differences between 9-1 dumping 4-5 file code 700 1-2 linkfiles 1-2 listing 4-4 listing attributes of 5-22/5-23 loadfiles 1-2 native overview of 1-2 structure of 8-1/8-2 relinkable 3-11 setting attributes of 3-13/3-15 specifying to noft 5-15/5-16 Optimization levels, listing 5-26 OSS nlist() function Guardian nld utility and 2-18 OSS nld utility and 2-20 OSS process, specifying 3-14 O
T Index Save files, specifying 3-14 SAVEABEND attribute default value of 3-15 description of 3-14 Scope of procedures 5-45 of source files 5-46 Sections loadfile 8-1 MDEBUG 8-2 Segments code and data 8-1/8-2 process file 3-14 set flag (nld) 3-13/3-15 SET flag (noft) description of 5-42/5-46 in sample session A-19, A-21 Shared run-time libraries See SRLs SHOW flag (noft) 5-47 Simple filenames, searching for 2-27 Socket library, TCP/IP 2-18, 2-20 Source files, listing 5-29/5-30 SPACE_GUARANTEE attribute def
U Index Tools.h++ library Guardian nld utility and 2-18, 2-20 Special Characters ! flag (noft) 5-4 U ul flag (nld) 3-16 ULs See User libraries Units of linking 9-2 User libraries associating with loadfiles 3-9 associating with program files 3-14 creating 3-16 linking 2-13/2-15 V verbose flag (nld) 3-16 Versions of C++ 2-10/2-11 Visual Inspect 4-7 Visual Studio .
Special Characters Index nld and noft Manual—520384-003 Index -10