nld Manual Abstract This publication explains how to use the TNS/R native link editor nld (T6017), which links and changes object file attributes. Product Version nld D44 Supported Release Updates (RVUs) This publication supports G06.26 and all subsequent D-series and G-series RVUs until otherwise indicated by its replacement publication.
Document History Part Number Product Version 528272-001 nld D44 Published April 2005
nld Manual Glossary Index Examples What’s New in This Manual vii Manual Information vii New and Changed Information About This Manual ix Audience ix Related Reading ix Notation Conventions Tables vii x 1. Introduction Native Object Files nld 1-2 1-2 2.
2. nld Utility (continued) Contents 2.
3. nld Options (continued) Contents 3. nld Options (continued) -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. nld Diagnostic Messages General Information 4-1 Terms That Appear in nld Diagnostic Messages Fatal Errors 4-11 Nonfatal Errors 4-60 Warnings 4-68 Informational Messages 4-76 4-2 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-20 LISTUNRESOLVED A-20 LISTOPTIMIZE A-21 XREFPROC A-22 DUMPPROC A-24 LISTSRLFIXUPS A-26 LISTSRLEXPORTS A-27 LISTSRLFIXUPS A-27 A-15 B. Converting From Binder to nld Object File Differences B-1 Linking Unit Differences B-2 Comparing Binder With nld B-3 C.
Examples (continued) Contents Examples (continued) Example 2-10. Example 2-11. Example 2-12. Example 2-13. Example 2-14. 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. Example A-25. Example A-26. Example A-27. Example A-28.
Examples (continued) Contents Examples (continued) Example A-33. Example A-34. Example A-35. Example A-36. Example B-1. Example B-2. Example B-3. Effect of SET FORMAT INNERLIST on DUMPPROC Option A-25 LISTSRLFIXUP Option A-26 LISTSRLEXPORTS Option A-27 LISTSRLFIXUP (LLF) Option A-27 Linking Two Object Files in Binder and nld (Simple Case) B-4 Linking Two Object Files in Binder and nld (Less Simple Case) B-5 Setting the INSPECT Attribute in Binder and nld B-5 Tables Table 2-1. Table 2-2. Table 2-3.
What’s New in This Manual Manual Information nld Manual Abstract This publication explains how to use the TNS/R native link editor nld (T6017), which links and changes object file attributes. Product Version nld D44 Supported Release Updates (RVUs) This publication supports G06.26 and all subsequent D-series and G-series RVUs until otherwise indicated by its replacement publication.
New and Changed Information What’s New in This Manual nld Manual— 528272-001 viii
About This Manual This manual explains how to use the TNS/R native object file utility nld, which which links and changes object file attributes.
Notation Conventions About This Manual Notation Conventions • • • • Hypertext Links on page x General Syntax Notation on page -x Example Notation on page xii Change Bar Notation on page xii 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 ]...
1 Introduction The nld utility (or native link editor) links one or more non-PIC object files to produce a single non-PIC loadfile or linkfile. (To produce a PIC object file—such as a dynamic-link library (DLL)—use the ld utility, which is explained in the ld Manual.) The nld utility operates in the TNS/R native mode development environment on TNS/R native object files—both PIC (position-independent code) and non-PIC (nonposition-independent code) files.
Native Object Files Introduction Native Object Files nld operates 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 Appendix C, Native Object File Structure. Native object files are either linkfiles or loadfiles, but not both.
nld Introduction The nld utility has the same capabilities in each environment, but each environment has a slightly different syntax.
nld Introduction nld Manual— 528272-001 1 -4
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 file name 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 file name 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 this 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.
Directory Structure of Windows nld nld Utility Directory Structure of Windows nld The directory structure of Windows nld is: Directory Files bin nld.exe cmplr nld.dll lib SRLs for linking 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.
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: • • • 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 Changing the Target Environment The target environment is the environment in which you intend to run
Creating Loadfiles and Linkfiles nld Utility Creating Loadfiles and Linkfiles A loadfile cannot be linked to a new object file. It can be used only as input to nld with options that modify an existing loadfile. A linkfile can be used as nld input again. nld creates a loadfile if you do not specify the -r flag. If you do specify the -r flag, nld creates a linkfile.
C++ Programs nld Utility 4. If your program uses active backup programming functions, such as __ns_start_backup(), link to the active backup programming support object code file: Environment Active Backup Programming Support Object Code File Guardian $SYSTEM.SYSTEM.CRTLNS OSS /usr/lib/crtlns.o 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.
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 (see the noft Manual). 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 these 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-16. 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 SRLs nld Utility A program file can have at most one TNS/R native user library associated with it. This 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 Guardian Table 2-1 on page 2-16 OSS Table 2
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 Guardian nld Options to Specify -l ZCPLSRL -l ZRWSLSRL -OBEY $SYSTEM.SYSTEM.LIBCOBEY or -l ZRWSLSRL -l ZCPLSRL -l ZCRTLSRL -l ZCRESRL OSS -OBEY $SYSTEM.SYSTEM.LIBCOBEY -l ZOSSHSRL -l ZSTFNSRL -l ZCPLSRL -l ZRWSLSRL or -l -l -l -l -l VERSION2 Standard C++ library, Tools.
Determining Which SRLs Programs Require nld Utility For example, this 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. To create an archive file, use the ar utility in either the Guardian environment, the OSS environment, or on platforms running Windows.
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, 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, as summarized in Table 2-4. 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, 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 if you use the -set float_lib_overrule on option. 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 and does not run the program.
Searching for Archives and SRLs With Simple File Names nld Utility Searching for Archives and SRLs With Simple File Names Note. This topic 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 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, as summarized in Table 2-6 on page 2-29. 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.
3 nld Options An option is a flag and its parameters, if any. You use 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 listed in Table 3-1 on page 3-1. 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.
-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 an 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 directory components. If filename is not a simple name, nld searches the specified location.
-L or -libvol nld Options -L or -libvol Specifies a location to search for an SRL or archive file specified by a simple filename in -l or -lib on page 3-7. A simple file name is a Guardian file identifier or an OSS pathname without 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 these 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 file name. 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; therefore, 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.
-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 Manual— 528272-001 3- 18
4 nld Diagnostic Messages The messages in this section are in numeric order and grouped by type. • • • • • • General Information on page 4-1 Terms That Appear in nld Diagnostic Messages on page 4-2 Fatal Errors on page 4-11 Nonfatal Errors on page 4-60 Warnings on page 4-68 Informational Messages on page 4-76 General Information The nld utility writes diagnostic messages to the standard output file, as summarized in Table 4-1 on page 4-1. Table 4-1.
nld Diagnostic Messages Terms That Appear in nld Diagnostic Messages When nld encounters a Guardian file system error, the resulting error message includes this 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 is no longer 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. Part of the symbol information in an object file. fixup list. The name for some of the information that is found within the TANDEM_GINFO section of a loadfile.
Terms That Appear in nld Diagnostic Messages nld Diagnostic Messages hexadecimal number. When a hexadecimal number is to be specified on the nld command line, it must begin with 0x or 0X, followed by a string of hexadecimal digits, which include the decimal digits 0 through 9 and the letters A through F (or a through f), which represent the values 10–15. When nld expects a hexadecimal number for an address, the 0x or 0X can be omitted.
Terms That Appear in nld Diagnostic Messages nld Diagnostic Messages OBEY command file. 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. Contains some or all the code, data, symbol information, and so on, for a program. The result of a compilation (without yet invoking nld) is the creation of a relinkable object file.
Terms That Appear in nld Diagnostic Messages 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 your service provider for further analysis. rdata section. One of the five possible data sections, rdata contains read-only 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 standard archives/standard SRLs. Archives or SRLs that are provided by HP and expected to be in a standard place, the location of which depends on the environment. nld does not have a built-in list of archives or SRLs that you might need. They all must be specified with -l or -lib on page 3-7 on the nld command line (or in an OBEY command file).
Fatal Errors nld Diagnostic Messages text section. One of the sections of an object file, containing text (code). In a loadfile, however, the text section contains only code that is not resident, as the resident code is placed into the resident text section. undefined. See define/definition on page 4-4. uninitialized data. Data is uninitialized if the compiler has not explicitly given it an initial value. At run time, however, uninitialized data is guaranteed to have zero as its starting value.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1000]: Cannot open the file named 'filename' specified in -hot_proc_list. This is an internal error. Contact your service provider. **** ERROR **** [1001]: Reached end of -hot_proc_list file 'filename', but NLD was expecting to see a numerical value at that point in the file. This is an internal error. Contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1007]: There was no -pre_cache_size flag within the -hot_proc_list file 'filename', but the -pri_cache_size flag is required because some procedure names were specified with cache offsets. This is an internal error. Contact your service provider. **** ERROR **** [1008]: There was no -res_start flag within the -hot_proc_list file 'filename', but the -res_start flag is always required. This is an internal error. Contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1012]: The value 'attribute-value' was specified for the attribute named 'attribute-name' in a -set or -change flag, but this attribute requires a numerical value. See: • • -change on page 3-4 -set on page 3-13 **** ERROR **** [1013]: The value 'attribute-value' was specified for the SYSTYPE attribute in a -set or -change flag, but this attribute requires a value of either 'OSS' or 'GUARDIAN'.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1017]: A -change flag with an attribute name was found at the end of the command stream, but a value and a filename must also be specified for the -change flag. See -change on page 3-4. **** ERROR **** [1018]: A -change flag with an attribute name and value was found at the end of the command stream, but a filename must also be specified for the -change flag. See -change on page 3-4.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1023]: A -d_slack flag was the last item found in the command stream, but a numerical value must be specified for the -d_slack flag. This is an internal error. Contact your service provider. **** ERROR **** [1024]: A -d_slack flag was found in the command stream, but a numerical value must be specified for the -d_slack flag, and the next item in the command stream was 'item'. This is an internal error. Contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1029]: An -ev flag was the last item found in the command stream, but a hexadecimal value must be specified for the -ev flag. This is an internal error. Contact your service provider. **** ERROR **** [1030]: An -ev_max_size flag was the last item found in the command stream, but a numerical value must be specified for the -ev_max_size flag. This is an internal error. Contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1035]: An -ev_slack_percent flag was found in the command stream, but a numerical value must be specified for the -ev_slack_percent flag, and the next item in the command stream was 'item'. This is an internal error. Contact your service provider. **** ERROR **** [1036]: An -export flag was the last item found in the command stream, but a symbol name must be specified for the -export flag. See -export on page 3-5.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1041]: An -import flag was found in the command stream, but a symbol name and an SRL name must be specified for the -import flag, and the next item in the command stream begins instead with a hyphen. See -import on page 3-6. **** ERROR **** [1042]: An -import flag with a symbol name was found at the end of the command stream, but an SRL name must also be specified for the -import flag. See -import on page 3-6.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1047]: A -L or -libvol flag was found at the end of the command stream, but a directory or subvolume name must be specified for the -libvol flag. See -l or -lib on page 3-7. **** ERROR **** [1048]: A -L or -libvol flag was found in the command stream, but a directory or subvolume name must be specified for the -libvol flag, and the next item in the command stream begins instead with a hyphen. See -L or -libvol on page 3-8.
Fatal Errors nld Diagnostic Messages **** 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. See -o on page 3-11. **** ERROR **** [1054]: A -prev flag was found at the end of the command stream, but a filename must be specified for the -prev flag. This is an internal error. Contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1059]: A -rename flag with a symbol name was found in the command stream, but a second symbol name must also 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 **** [1060]: A -strip flag was found at the end of the command stream, but a filename must be specified for the -strip flag. See -strip on page 3-16.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1065]: An -srl_fixup flag was found in the command stream, but a filename must be specified for the -srl_fixup flag, and the next item in the command stream begins instead with a hyphen. This is an internal error. Contact your service provider. **** ERROR **** [1066]: A -set flag was the last item found in the command stream, but an attribute and a value must be specified for the -set flag. See -set on page 3-13.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1071]: A -t_slack flag was the last item found in the command stream, but a numerical value must be specified for the -t_slack flag. This is an internal error. Contact your service provider. **** ERROR **** [1072]: A -t_slack flag was found in the command stream, but a numerical value must be specified for the -t_slack flag, and the next item in the command stream was 'item'. This is an internal error. Contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1077]: Unrecognized flag: 'item'. See Table 3-1 on page 3-1. **** ERROR **** [1078]: Only 100 -y flags are permitted. See -y on page 3-17. **** ERROR **** [1079]: It is incorrect to specify other flags along with -strip flags. See -strip on page 3-16. **** ERROR **** [1080]: It is incorrect to specify other flags along with -change flags. See -change on page 3-4.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1084]: It is incorrect to specify both the -srl and the -syslib flags. This is an internal error. Contact your service provider. **** ERROR **** [1085]: It is incorrect to specify both the -srl and the -coff flags; SRL's are only supported with ELF files. This is an internal error. Contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1090]: It is incorrect to specify both the -srl_name flag and the -ul flag; the -srl_name flag may only be used with the -srl flag. This is an internal error. Contact your service provider. **** ERROR **** [1091]: You are trying to build a new version of an SRL with the -prev flag, and there is now a readonly data item named name.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1096]: When you specify -srl, you must also specify -srl_name, unless the SRL name will be obtained from the file specified in a -prev flag or in a -use_srl_options flag. This is an internal error. Contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1102]: You specified both the -prev and the -d flags, but the value that you specified in the -d flag is different from that found in the previous version of the SRL. This is an internal error. Contact your service provider. **** ERROR **** [1103]: You specified -prev without also specifying -ev, but the previous version of the SRL had no entry vector section in it, so in this case you must also specify the -ev flag. This is an internal error.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1108]: No input object file names were specified in the command stream; if you just give the command 'nld', with no flags, you will get a summary of the valid command syntax. See: • • Running the nld Utility in the Guardian Environment on page 2-1 Running the nld Utility in the OSS Environment on page 2-3 **** ERROR **** [1109]: Incorrect format for a hexadecimal number; saw the string 'string' string.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1114]: You are trying to build an SRL, and the actual size of the segment-ID segment is number-1 bytes, which is larger than the specified maximum size of number-2 bytes. **** ERROR **** [1115]: A -srl_ref flag was the last item found in the command stream or is followed by a '-'. A attribute must be specified for the -srl_ref flag. This is an internal error. Contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1120]: You specified the -srl flag to build an SRL, and there are callable procedures in the SRL being constructed. You did not specify the -t flag, but when you build an SRL with callable procedures it is necessary to specify -t. This is an internal error. Contact your service provider. **** ERROR **** [1121]: The starting address that you specified for the resident text segment in the -hot_proc_list file was too small.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1125]: The total size of the text, number-1 bytes, exceeds the maximum of number-2 bytes specified in the previous version of the SRL. **** 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.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1132]: The object file named 'filename' is a COFF object file with an unexpected 'magic number' in its 'optional header'. This is an internal error. Contact your service provider. **** 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'.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1139]: The file named 'filename' is not an SRL, but it was specified in a context where an SRL was required. For instance, this may have been the filename specified for a -prev or -import flag. See -import on page 3-6. **** ERROR **** [1140]: The file named 'filename' is an SRL, but an archive is required because the -bstatic flag is currently in effect. See -bstatic on page 3-4.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1145]: During the search being executed for a -l, -lib, or -import flag, the Guardian file system error number number occurred while trying to open the file named 'filename'. See: • • -import on page 3-6 -l or -lib on page 3-7 **** 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.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1150]: The file named 'filename' is not an SRL, but it is required to be an SRL because it was found by searching for the filename either in an -import flag or else in a -l or -lib flag that was specified together with an -srl_fixup flag. This is an internal error. Contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1156]: The object file named 'filename' appears to be corrupted because the first four bytes do not contain the proper 'magic number'. **** 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. Contact your service provider.
Fatal Errors nld Diagnostic Messages **** ERROR **** [1162]: The input object file named 'filename' has a bad value for the 'st_size' field in entry number of the ELF symbol table. **** 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.
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. 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. 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. 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. 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. 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. 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. 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 • • • Prevent nld from performing user requests Do not cause nld to stop immediately, but prevent it from creating a complete object file Cannot be suppressed Note. This topic shows error messages as they appear on Guardian and OSS platforms.
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. 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. Contact your service provider. **** WARNING **** [10001]: The value specified in the -t flag was rounded up to number. This is an internal warning. Contact your service provider. **** WARNING **** [10002]: The value specified in the -kseg0 flag was rounded up to number. This is an internal warning. 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 • • • • 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 4-2 on page 4-1. Note. This topic shows informational messages as they appear on Guardian and OSS platforms.
Informational Messages nld Diagnostic Messages **** 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 **** [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 MESSAGE **** [20014]: The new version of the SRL is upward linkage equivalent with the previous version, which means that all the previous exports are still present and at the same addresses as before.
Informational Messages nld Diagnostic Messages **** 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 **** [20029]: 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 **** [30000]: The following program limits would have been created: list **** INFORMATIONAL MESSAGE **** [30001]: No text for message number number. Internal Error.
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 Topics: • • • • • 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 these 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 .004 .01 .
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. For more information on noft commands, see the noft Manual.
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 topic 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. For more information on noft commands, see the noft Manual.
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 in Example A-23 on page A-18 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.
LISTSRLINFO Sample nld and noft Session LISTSRLINFO The loadfile EXAMPLE1 in Example A-25 on page A-20 uses two SRLs (see Example A-20 on page A-16). To see the names of these SRLs, use the LISTSRLINFO option. Example A-25. LISTSRLINFO Option (Loadfile) noft> LISTSRLINFO BRIEF SRL Name : ZCRESRL : ZCRTLSRL : # 0 1 LISTUNRESOLVED The list of unresolved functions and data is different for the loadfile EXAMPLE1 than the linkfile MAINO.
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 XREFPROC The XREFPROC option in Example A-29 is under the influence of the SET SCOPESOURCE option in Example A-28. Example A-29. Effect of SET SCOPESOURCE on XREFPROC Option noft> XREFPROC * BRIEF Called Procedure Calling Procedures ----------------------------------------------------------------------------*** WARNING *** [2008]: No cross reference information available in this category for procedure *.
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 shows the addresses where the calls occur. Example A-31.
DUMPPROC Sample nld and noft Session DUMPPROC Example A-32 on page A-24 uses the DUMPPROC option to display 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, change the setting of FORMAT to INNERLIST to 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 reexecutes 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 direct 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 Manual— 528272-001 A -28
B Converting From Binder to nld The nld and noft utilities listed in Table B-1 on page B-1 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 B-1.
Linking Unit Differences Converting From Binder to nld 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 With nld Converting From Binder to nld Comparing Binder With nld For descriptions of individual nld options, see Section 3, nld Options. Table B-2. Comparing Binder With nld (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. Adding multiple code segments to an object file with an ADD SPACE command is not necessary for native programs.
Comparing Binder With nld Converting From Binder to nld Table B-2. Comparing Binder With nld (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 Use the option -rename on page 3-12 in some cases. REPLACE Link the object files again. RESELECT nld does not support SELECT parameters. RESET Not necessary because each invocation on nld resets SET parameters.
Comparing Binder With nld Converting From Binder to nld In Example B-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-9. Example B-2.
Comparing Binder With nld Converting From Binder to nld nld Manual— 528272-001 B- 6
C Native Object File Structure The nld utility operates on native object files, which have four main components: • • • • Headers of these types, which contain information about the structure and components of the object file: ° ° ° File Program Section Code and Data Segments on page C-1 MDEBUG Section on page C-2 TANDEM_GINFO section, which contains information used by the operating system to load loadfiles (for example, a lists of unresolved references and procedure information for creating run-tim
MDEBUG Section Native Object File Structure 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. When nld builds a loadfile: • • All references within the object file are resolved, their addresses are finalized, and the relocation tables no longer exist.
Glossary absolute pathname. An HP NonStop™ Open System Services (OSS) 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.
dynamic-link library (DLL) Glossary dynamic-link library (DLL). A collection of procedures whose code and data can be loaded and executed at any virtual memory address, with run-time resolution of links to and from the main program and other independent libraries. The same DLL can be used by more than one process. Each process gets its own copy of DLL static data. Compare to shared run-time library (SRL). EDIT file. In the Guardian file system, an unstructured file with file code 101.
header Glossary header. An object that, when specified for inclusion in a program’s source code, causes the program to behave, as if the statement including the header were actually a specific set of other programming statements. A header contains coded information that provides details (such as data item length) about the data that the header precedes. In an OSS program, a header is the name of a file known to the run-time library used by a process.
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. MIPS RISC instructions. Register-oriented 32-bit machine instructions in the MIPS-1 RISC instruction set that are native to and directly executed on TNS/R systems. MIPS RISC instructions do not execute on TNS systems. Compare to TNS instructions.
OSS environment Glossary OSS environment. The OSS API, tools, and utilities. pathname. In the HP NonStop™ Open System Services (OSS) file system and Network File System (NFS), the string of characters that uniquely identifies a file within its file system. A pathname can be either relative or absolute. See also ISO/IEC IS 9945-1:1990 (ANSI/IEEE Std. 1003.1-1990 or POSIX.1), Clause 2.2.2.57. PIC (position-independent code). Executable code that need not be modified to run at different virtual addresses.
release version update (RVU) Glossary release version update (RVU). A collection of compatible revisions of HP NonStop operating system software products, identified by an RVU ID, and shipped and supported as a unit. An RVU consists of object modules, supporting files, and documentation for product revisions. An RVU also includes a set of documentation for the overall RVU. RISC. See reduced instruction-set computing (RISC). RISC instructions. See MIPS RISC instructions. RVU.
TNS instructions Glossary TNS instructions. Stack-oriented, 16-bit machine instructions that are directly executed on TNS systems by hardware and microcode. TNS instructions can be emulated on TNS/R systems by using millicode, an interpreter, and either translation or acceleration. Compare to MIPS RISC instructions. TNS interpreted mode.
TNS/R native object file Glossary TNS/R native object file. An object file created by a TNS/R native compiler that contains MIPS RISC instructions and other information needed to construct the code spaces and the initial data for a TNS/R native process. TNS/R native process. A process initiated by executing a TNS/R native object file. Compare to TNS process. TNS/R native shared run-time library (TNS/R native SRL).
Index A Case-sensitivity in native languages 2-28 in nld options Guardian 2-2 OSS 2-3 change flag 3-4 COBOL programs linking 2-11 nld compilation rules for 2-28/2-30 NonStop SQL/MP in 2-12 Windows nld and 2-5 COBOL run-time libraries Guardian nld utility and 2-17 OSS nld utility and 2-19 Code segments C-1/C-2 Command files 3-6 Corruption, checking files for 3-5 C++ programs dialects or versions of 2-9/2-10 linking 2-9/2-11 nld compilation rules for 2-28/2-30 Windows nld and 2-5 C++ run-time library Guardia
E Index Diagnostic messages (continued) terms that appear in 4-2/4-11 warnings 4-68/4-75 Dialects of C++ 2-9/2-10 DLLs (dynamic-link libraries) 1-1 DUMPPROC flag (noft) A-24 Dynamic linking 2-27 Dynamic-link libraries (DLLs) 1-1 Floating-point type checking consistency of at link time 2-22/2-23 at run time 2-24/2-25 mixed-language programs and 2-25 specifying 2-21 FLOATTYPE attribute default value of 3-15 description of 3-13 FLOAT_LIB_OVERRULE attribute 3-13 E e flag 3-5 ELF format 1-2 elf_check flag 3-
I Index I IEEE_FLOAT attribute value 3-13 import flag 3-6 Importing symbols 3-6 Informational messages 4-76/4-80 INSPECT attribute default value of 3-15 description of 3-14 Inspect symbolic debugger 3-14 Instance data 2-14 L l or lib flag 3-7 L or libvol flag 3-8 LA or LISTATTRIBUTE flag (noft) applied to linkfile A-9 applied to loadfile A-16 LC or LISTCOMPILERS flag (noft) applied to linkfile A-10 applied to loadfile A-17 lib or l flag 3-7 LIBCOBEY file C programs and 2-8 C++ programs and 2-11 libc.
M Index LISTUNRESOLVED or LU flag (noft) applied to linkfile A-14 applied to loadfile A-20 LLE or LISTSRLEXPORTS flag (noft) A-27 LLF or LISTSRLFIXUPS flag (noft) A-27 LLI or LISTSRLINFO flag (noft) applied to linkfile A-13 applied to loadfile A-20 LO or LISTOPTIMIZE flag (noft) A-21 Loadfiles characteristics of 1-2 creating 2-8 segments and sections of C-1 LP or LISTPROC flag (noft) applied to linkfile A-10 applied to loadfile A-17 SET SORT’s effect on A-19 LS or LISTSOURCE flag (noft) applied to linkfil
O Index NS_max_extents flag description of 3-10 Windows nld and 2-5 PROCESS_SUBTYPE attribute default value of 3-15 description of 3-14 pTAL programs linking 2-12 nld compilation rules for 2-28/2-30 Windows nld and 2-5 O o flag 3-11 obey flag 3-6 Object files changing attributes of 3-4 creating 2-8 differences between B-1 file code 700 1-2 linkfiles 1-2 loadfiles 1-2 native overview of 1-2 structure of C-1/C-2 relinkable 3-11 setting attributes of 3-13/3-15 OSS nlist() function Guardian nld utility and
T Index Socket library, NonStop TCP/IP 2-17, 2-19 SPACE_GUARANTEE attribute default value of 3-15 description of 3-14 SQLCOMP 2-12 SRLs determining those required 2-16/2-19 linking generally 2-14, 2-19 standard C to C program 2-8 to C++ program 2-11 missing 3-3 naming conventions for 2-26 searching for 2-26/2-27 specifying 2-15 specifying locations of 3-8 Stack, specifying size of 3-14 Standard C++ library 2-17, 2-19 Standard input file 3-15 Standard library locations 2-26 Static linking 2-27 stdin flag 3