Table of Contents

Advertisement

Quick Links

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.
Product Version
nld D44
noft D45
ar D43
strip D43
Supported Release Updates (RVUs)
This manual supports D45 and G06 and all subsequent RVUs until otherwise indicated
in a new edition.
Part Number
520384-003
Published
May 2003

Advertisement

Table of Contents
loading

Summary of Contents for HP nld

  • Page 1 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™...
  • Page 2 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...
  • Page 3: Table Of Contents

    1. Introduction to the Utilities Native Object Files noft strip 2. nld Utility Running the nld Utility in the Guardian Environment Running the nld Utility in the OSS Environment Running Windows nld on the PC Components of Windows nld Directory Structure of Windows nld...
  • Page 4 Contents 2. nld Utility (continued) 2. nld Utility (continued) Linking Programs C Programs C++ Programs 2-10 COBOL Programs 2-12 pTAL Programs 2-13 Mixed-Language Programs 2-13 Programs With Embedded NonStop SQL/MP 2-13 Linking User Libraries 2-13 Linking Shared Run-Time Libraries (SRLs)
  • Page 5 Contents 3. nld Options (continued) 3. nld Options (continued) -L or -libvol -libname -nostdfiles -nostdlib -noverbose 3-10 -NS_extent_size 3-10 -NS_max_extents 3-10 3-11 3-11 -rename 3-12 3-12 -set 3-13 -stdin 3-15 -strip 3-16 3-16 -verbose 3-16 3-17 3-17 4. noft Utility...
  • Page 6 7. strip Utility 8. Native Object File Structure Code and Data Segments MDEBUG Section 9. Converting From Binder to nld and noft Object File Differences Linking Unit Differences Comparing Binder Commands to nld Options Comparing Binder Commands to noft Options...
  • Page 7 Contents 10. nld Diagnostic Messages 10. nld Diagnostic Messages General Information 10-1 Terms That Appear in nld Diagnostic Messages 10-2 Fatal Errors 10-12 Nonfatal Errors 10-61 Warnings 10-69 Informational Messages 10-77 11. noft Diagnostic Messages Fatal Errors 11-1 Data Errors...
  • Page 8 Contents A. Sample nld and noft Session (continued) A. Sample nld and noft Session (continued) noft Command Examples on a Loadfile A-15 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...
  • Page 9 LISTUNRESOLVED Option for Example 5-25 C Program 5-37 Example 5-31. Effect of EXCLUDE on LISTUNRESOLVED Option 5-37 Example 5-32. LOG Option 5-38 Example 5-33. OBEY Option 5-39 Example 5-34. OUT Option When “?” is Specified 5-40 nld and noft Manual—520384-003...
  • Page 10 5-52 Example 9-1. Linking Two Object Files in Binder and nld (Simple Case) Example 9-2. Linking Two Object Files in Binder and nld (Less Simple Case) Example 9-3. Setting the INSPECT Attribute in Binder and nld Example A-1. Header File GLOBALSH With Edit Line Numbers Example A-2.
  • Page 11 Example A-35. LISTSRLEXPORTS Option A-27 Example A-36. LISTSRLFIXUP (LLF) Option A-27 Tables Table 2-1. Using the Guardian nld Utility to Link SRLs 2-17 Table 2-2. Using the OSS nld Utility to Link SRLs 2-19 Table 2-3. Floating-Point Consistency Check by nld Utility...
  • Page 12 Contents nld and noft Manual—520384-003...
  • Page 13: Manual Information

    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™...
  • Page 14: Native Object Files

    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 on page 3-5...
  • Page 15 1007 1065 Changed data error 1007 New warnings: 2013 2014 2015 2016 Appendix A, Sample nld and noft Session, the examples have been rerun on the newest software Miscellaneous New glossary items: dynamic-link library (DLL) PIC (position-independent code) shared code...
  • Page 16: Noft

    What’s New in This Manual Miscellaneous nld and noft Manual—520384-003...
  • Page 17: Strip

    (loadfiles) in the HP NonStop™ Kernel Open System Services (OSS) environment Subsections: Audience on page xv...
  • Page 18: Related Reading

    Many of the improvements you see in manuals are a result of suggestions from our customers. Please take this opportunity to help us improve future manuals. nld and noft Manual—520384-003...
  • Page 19: Notation Conventions

    For example: LIGHTS [ ON [ OFF [ SMOOTH [ num ] ] K [ X | D ] address-1 nld and noft Manual—520384-003 xvii...
  • Page 20 CALL STEPMOM ( process-id ) ; If there is no space between two items, spaces are not permitted. In the following example, there are no spaces permitted between the period and any other items: $process-name.#su-name nld and noft Manual—520384-003 xviii...
  • Page 21: Change Bar Notation

    123.00. Change Bar Notation A change bar (as shown to the right of this paragraph) indicates a substantive difference between this edition of the manual and the preceding edition. Change bars highlight new or revised information. nld and noft Manual—520384-003...
  • Page 22 About This Manual Change Bar Notation nld and noft Manual—520384-003...
  • Page 23 For general information about PIC, see the DLL Programmer’s Guide for TNS/R Systems. In the TNS/R native development environment, the functions that nld and noft provide are similar but not identical to the functions that the Binder product provides in the TNS development environment.
  • Page 24: Native Object Files

    Native Object Files 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...
  • Page 25 Windows XP* * By means of ETK As a batch process by issuing nld commands from a terminal or a command file You cannot run nld interactively. This manual explains only how to run nld directly. For information on running nld from compilers, see the following manuals: C/C++ Programmer’s Guide...
  • Page 26 Interactively from the TACL prompt or OSS shell prompt As a batch process by issuing commands from a terminal or a command file For more information, see: Section 4, noft Utility Section 5, noft Options Section 11, noft Diagnostic Messages nld and noft Manual—520384-003 1 -4...
  • Page 27 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. If a mixed file is created on a Windows platform, it is not flagged as erroneous, but only because Windows does not recognize TNS files as object files.
  • Page 28 Introduction to the Utilities strip nld and noft Manual—520384-003 1 -6...
  • Page 29: Running The Nld Utility In The Guardian Environment

    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. Subsections: Running the nld Utility in the Guardian Environment on page 2-1 Running the nld Utility in the OSS Environment...
  • Page 30: Example

    Guardian filename to which nld writes its listing. The file can be type 101 (edit file) or type 129 (spooler file). If output-listing is a disk filename and the file does not exist, nld creates a type 101 edit file.
  • Page 31: Running The Nld Utility In The Oss Environment

    ] ... 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.
  • Page 32: Running Windows Nld On The Pc

    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 \...
  • Page 33: Ns_Extent_Size

    -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...
  • Page 34: How The Etk Command-Line And Gui Interfaces Differ

    (as in Example 2-8 on page 2-6) Example 2-8. Running nld from the Command Prompt nld test1.o test2.o "c:\Program Files\Compaq ETK-NSE\g06.15\lib\crtlmain.o" -set systype oss -set highpin on -set highrequester on -set inspect on -set runnamed on -verbose -L "c:\Program Files\Compaq ETK-NSE\g06.15\lib" -obey "Program Files\Compaq ETK-NSE\g06.15\lib\libc.obey"...
  • Page 35: Command-Line Interface Linking Options

    Utility Command-Line Interface Linking Options Command-Line Interface Linking Options The command-line interface link options for C/C++ and COBOL are: -l=library -L=directory -Wansistreams -WBdynamic -WBstatic -Wheap=N[b|w|p] -Whighpin={on|off} -Whighrequesters={on|off} -W[no]inspect -Wnld="arguments" -Wnld_obey file -Wnostdlib -Wrunnamed -W[no]saveabend nld and noft Manual—520384-003 2 -7...
  • Page 36: Changing The Target Environment

    -o prog -set systype guardian 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.
  • Page 37: Linking Programs

    (SRLs) your program uses. The NMC and c89 compilers automatically link to the required items. If you use nld directly to link a C program, you must specify these items in nld options.
  • Page 38: C++ Programs

    Guardian Environment NLD $SYSTEM.SYSTEM.CRTLMAIN MYOBJ -o MYEXEC & -l ZCRESRL -l ZCRTLSRL OSS Environment nld /usr/lib/crtlmain.o myobj -o myexec -l zcresrl -l zcrtlsrl C++ Programs There are three versions of C++: Conforms to ANSI and Version ISO Standards for C++...
  • Page 39 (SRLs) your program uses. The NMC and c89 compilers automatically link to the required items. If you use nld directly to link a C++ program, you must specify these items in nld options. For details, see the C/C++ Programmer’s Guide.
  • Page 40: Cobol Programs

    The name of the COBOL run-time library, ZCOBSRL The name of the common run-time environment library, ZCRESRL Any files located by the SEARCH directive If you use nld directly to link a COBOL program, you must supply the libraries ZCOBSRL and ZCRESRL. nld and noft Manual—520384-003...
  • Page 41: Ptal Programs

    Programs With Embedded NonStop SQL/MP Native C and native COBOL programs can contain embedded NonStop™ SQL/MP statements. You can use nld to create a single loadfile from multiple C or COBOL object files that contain embedded NonStop™ SQL/MP statements. After creating a loadfile with nld, use the NonStop™...
  • Page 42: Example

    With the SRL pragma 2. Use nld to link the resulting object files into a single executable user library. Note. You can only link linkfiles into a user library. You cannot link loadfiles, or a combination of loadfiles and linkfiles, into a user library.
  • Page 43: Linking Shared Run-Time Libraries (Srls)

    SRL automatically gets its own run-time copy of the data, called instance data. A process can use several SRLs. Note. nld supports TNS/R native SRLs. It does not support the TNS SRL available to TNS and accelerated programs in the OSS environment. See the Binder Manual for details.
  • Page 44: Specifying Srls

    SYSnn subvolume active on a particular node, use the Guardian command STATUS 0,0.) When you use nld to build a program file, nld fixes up references to the SRLs that you have specified. You can also use nld to repeat the fix-up process on an existing program to use a new version of an SRL or let the operating system update the references when you execute the program.
  • Page 45: 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...
  • Page 46 Utility Determining Which SRLs Programs Require Table 2-1. Using the Guardian nld Utility to Link SRLs (page 2 of 2) Environment in Which Library That Program Program Uses Runs nld Options to Specify C++ run-time Guardian -l ZCPLSRL -l ZRWSLSRL library -OBEY $SYSTEM.SYSTEM.LIBCOBEY...
  • Page 47: Table 2-2. Using The Oss Nld Utility To Link Srls

    Utility Determining Which SRLs Programs Require 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.
  • Page 48 The OSS nld utility processes the simple names in the -l options as files within the Guardian file system. For example, the following nld command links an OSS C++ program that uses the Tools h++ class libraries: /usr/lib/crtlmain.o...
  • Page 49: Linking Archive Files

    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.
  • Page 50: Linking Floating-Point Programs

    FLOATTYPE. The floating-point type can be any of the following: TANDEM_FLOAT IEEE_FLOAT NEUTRAL_FLOAT If you do not specify the floating-point type of the output object file, nld derives it from the types of the input files (see Link-Time Consistency Checking on page 2-23).
  • Page 51: Table 2-3. Floating-Point Consistency Check By Nld Utility (Floattype Not Specified)

    2-24 floattype Not Specified When the floattype attribute is not explicitly set with the -set option, nld uses the floattype attribute values of all the input object files to determine the floattype attribute value of the output object file. If the consistency checks of the input object files result in an invalid floating-point type or an inconsistent value, nld issues an error message and does not create an output object file.
  • Page 52: Table 2-4. Floating-Point Type Consistency Check By Nld (Floattype Specified)

    If nld detects an inconsistency between the specified floattype attribute value and that of any input object file, it issues a warning message.
  • Page 53: Run-Time Consistency Checking

    NEUTRAL_FLOAT using the -set floattype or -change floattype option. Then the user library can be used by any kind of program. nld and noft Manual—520384-003 2- 25...
  • Page 54: Linking Mixed-Language Programs

    The native C object file named COBJ uses IEEE floating-point format and the pTAL object file uses Tandem floating-point format. (pTAL supports only Tandem floating- point format.) If this nld command did not include the option -set floattype IEEE_FLOAT, nld would issue error messages because of the mismatch between Tandem and IEEE floating-point formats.
  • Page 55: Searching For Archives And Srls With Simple Filenames

    A simple name is a Guardian file identifier or an OSS pathname without any directory components. By default, nld searches a standard set of library locations for archive files and SRLs specified with simple names in the option -l or -lib on page 3-7.
  • Page 56: Dynamic And Static Linking

    If the -bdynamic flag is specified, nld first searches for a shared run-time library (SRL). If an SRL cannot be found, nld searches for an archive file. If neither file is found, nld issues an error message. nld follows this process in each location (a subvolume or directory) it is searching before moving on to the next location.
  • Page 57: Stripping Symbol Information

    The -x option is similar to the Binder command STRIP SYMBOLS. You can partially strip an existing object file by giving nld only one input filename and giving it the same input filename for the output filename. If the symbol information is partially stripped with -x and you specify on page 3-11, you can use the output file again as nld input.
  • Page 58: Local And Shared Symbols

    Names of data block members* * For example, if a data block is named B and it contains an integer named I, then B is the only name that nld considers for separate compilation rules. It is possible that B will be confused with a data item named B in C compilation units.
  • Page 59: Declaration And Definition

    Except for data that is exported from a user library, every data item must be defined at least once when nld is building a loadfile. (If a data item is supposed to come from an SRL, then it must not be defined within the program using the SRL.) If a data item is never defined, you will get a run-time error when you execute your program.
  • Page 60 Utility Declaration and Definition nld and noft Manual—520384-003 2- 32...
  • Page 61: Table 3-1. Nld Flag Summary

    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.
  • Page 62: Allow_Duplicate_Procs

    3-17 Identifies which object files define and use a symbol. -allow_duplicate_procs Causes nld to unconditionally accept multiple copies of procedures, rather than to accept multiple copies of procedures only if the procedures are marked as duplicatable by C++.
  • Page 63: Allow_Missing_Libs

    3-7. This is the default. -bdynamic nld first searches for an SRL. If an SRL cannot be found, nld searches for an archive file. nld follows this process in each location (a subvolume or directory) it is searching before moving on to the next location.
  • Page 64: 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.
  • Page 65: Elf_Check

    -elf_check Causes nld to check a loadfile for corruptions that were caused by older versions of nld and Guardian. These corruptions might have occurred in the following situations: Unresolved references in the data portion of the file that were not aligned on 4-byte boundaries were later resolved.
  • Page 66: Fl Or -Obey

    { -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.
  • Page 67 If filename is not a simple name, nld searches the specified location. If filename is a simple name, the OSS workstation versions of nld adds the string lib to the beginning of the name. These versions also add either .a or .srl to the end of the name, depending on whether dynamic or static linking is being performed.
  • Page 68 -L options. If you specify -verbose on page 3-16, 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. nld and noft Manual—520384-003 3 -8...
  • Page 69: Nostdlib

    Specifies that C run-time library functions do not open the standard input and standard output files automatically. -nostdfiles -nostdlib Prevents nld from searching the standard library locations for shared run-time libraries (SRLs) and archive files. -nostdlib Searching for Archives and SRLs With Simple Filenames on page 2-27 for a list of the standard library locations.
  • Page 70: Noverbose

    -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.
  • Page 71 If filename exists and is not in use, nld appends the listing to the file. If filename exists and is in use, nld makes up to 10 attempts to change the name of filename to ZZNDnnnn. If these 10 attempts fail, nld makes up to 10 attempts to create a new file named ZZNDnnnn.
  • Page 72: Rename

    Removes symbol information used for linking and symbolic debugging from the loadfile. A file stripped of all symbol information cannot be symbolically debugged with the Inspect symbolic debugger or linked again by nld. You can use -s only when creating a loadfile. If you specify both on page 3-11 and -s, -s is ignored.
  • Page 73: Set

    1. The fact that nld allows you to use these numbers to build a program does not mean that the program will run. System memory configuration sizes and setting might prevent the program from running if very large values have been set.
  • Page 74 -change option is used. 1. The fact that nld allows you to use these numbers to build a program does not mean that the program will run. System memory configuration sizes and setting might prevent the program from running if very large values have been set.
  • Page 75: Stdin

    PROCESS_SUBTYPE SUBTYPE SAVEABEND SPACE_GUARANTEE OSS when using the OSS version of nld. GUARDIAN when using SYSTYPE the Guardian or PC version of nld. -stdin Reads the contents of the standard input file at the specified place the flag is specified on the command line.
  • Page 76: Strip

    -noverbose on page 3-10 prevents nld from writing 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 -noverbose. nld and noft Manual—520384-003...
  • Page 77 3-11, you can partially strip a file in place. The resulting file has a new nld timestamp. The resulting object file is not necessarily smaller than the original file. Identifies the object files that define and use a specified symbol.
  • Page 78 Options nld and noft Manual—520384-003 3- 18...
  • Page 79: Noft Utility

    If the file contains more than one option, options must be separated by semicolons (;). If both a command-file and options are given, noft ignores the command-file. nld and noft Manual—520384-003 4 -1...
  • Page 80 The HISTORYBUFFER or HISTORYWINDOW parameter of the option on page 5-42 (Options given in the command line are not stored in the history buffer.) This section summarizes the noft flags. For further information, see Section 5, noft Options. nld and noft Manual—520384-003 4 -2...
  • Page 81: Running The Noft Utility In The Oss Environment

    5-42 (Options given in the command line are not stored in the history buffer.) object-filename specifies the target object file. Example 4-1. noft Command Line noft -file sample.o -set scopesource sample.c "-listproc *" nld and noft Manual—520384-003 4 -3...
  • Page 82: Listing Object Files

    5-22 file LISTCOMPILERS or LC Version information about the native compiler page 5-23 components and nld utility used to create an object file LISTOPTIMIZE or LO Procedures in an object file based on optimization level page 5-26 LISTPROC or LP...
  • Page 83: Dumping Object Files

    Writes the input and output listings to a specified file. QUIT or Q on page 5-40 Stops the noft process. noft RESET on page 5-41 Resets one or more target object file parameters previously specified with a SET option to their default values. nld and noft Manual—520384-003 4 -5...
  • Page 84 Scope of noft options to a single source file Sorting order of the output SYSTEM or VOLUME Specifies the default node, volume, and subvolume names page 5-48 used to resolve partially-qualified Guardian filenames. (Use only in the Guardian environment.) nld and noft Manual—520384-003 4 -6...
  • Page 85: Debugging With Noft

    Example 4-3. C Program long compute(long a[]); int main (void) long z[10]; long x; x=compute(z); return 0; long compute(long a[]) long b; int c,i; b=0; for (i=0; i<20; i++) b += a[i]; return b; nld and noft Manual—520384-003 4 -7...
  • Page 86: Optimize 0 Listing

    20000] 0x700004ac 0x1420fff3 at,zero,0x7000047c [compute 20000] 0x700004b0 0000000000 return b; [compute 21000] 0x700004b4 0x8fa20004 v0,0x4(sp) [compute 21000] 0x700004b8 0x10000001 0x700004c0 [compute 21000] 0x700004bc 0000000000 [compute 22000] 0x700004c0 0x03e00008 [compute 22000] 0x700004c4 0x27bd0008 addiu sp,sp,0x8 nld and noft Manual—520384-003 4 -8...
  • Page 87: Optimize 1 Listing

    0x7000048c 0xafa90004 t1,0x4(sp) [compute 20000] 0x70000490 0x1420fff6 at,zero,0x7000046c [compute 20000] 0x70000494 0xafaa0000 t2,0(sp) return b; [compute 21000] 0x70000498 0x8fa20004 v0,0x4(sp) [compute 21000] 0x7000049c 0000000000 [compute 22000] 0x700004a0 0x03e00008 [compute 22000] 0x700004a4 0x27bd0008 addiu sp,sp,0x8 nld and noft Manual—520384-003 4 -9...
  • Page 88: Optimize 2 Listing

    4-7 at each optimization level: Optimization Level Number of Instructions At optimization level 0, the native compiler performs no optimizations. Notice that the code contains nop (no operation) instructions and uses few registers. nld and noft Manual—520384-003 4- 10...
  • Page 89 The program at optimize 2 steps though the loop five times instead of 20 times. The value of b is also quite different in each loop. nld and noft Manual—520384-003 4- 11...
  • Page 90 Utility Debugging With noft nld and noft Manual—520384-003 4- 12...
  • Page 91: Noft Options

    Displays previously entered command lines. (Use only in an interactive session.) LAYOUT on page 5-21 Lists the parts of an object file in order by file offset. LISTATTRIBUTE or LA Lists process-specific information associated with an page 5-22 object file. nld and noft Manual—520384-003 5 -1...
  • Page 92 Flag Description LISTCOMPILERS or LC Lists version information about the native compiler page 5-23 components and nld utility used to create an object file. LISTOPTIMIZE or LO Lists procedures based on the optimization level. page 5-26 LISTPROC or LP on page 5-27 Lists procedures and subprocedures.
  • Page 93: Break Key

    5-49 Displays a cross reference listing of procedures. Break Key The break key Terminates the output of the current option and, if noft is running from the command line, terminates the noft program itself. nld and noft Manual—520384-003 5 -3...
  • Page 94: (Exclamation Point)

    5-42, particularly Example 5-8 on page 5-19). The default size of the history buffer is 50 commands. If you do not specify history-number, -history-offset, or text, the ! option executes the previous command. nld and noft Manual—520384-003 5 -4...
  • Page 95: Comment

    If you use the COMMENT option in a line containing other options, COMMENT must be the last option on the line. To continue COMMENT text over more than one line, start each successive line with the COMMENT option. nld and noft Manual—520384-003 5 -5...
  • Page 96: Dumpaddress Or Da

    { ASCII | A } displays portions of the object file in ASCII format. nld and noft Manual—520384-003 5 -6...
  • Page 97: Example

    [rollem 87000] 0x700005bc 0x0201001b divu s0,at [rollem 87000] 0x700005c0 0x00007010 mfhi [rollem 87000] 0x700005c4 0x25cf0001 addiu t7,t6,0x1 [rollem 88000] 0x700005c8 0x0d81015c 0x76040570 -[rollem 87000] 0x700005cc 0xafaf002c t7,0x2c(sp) [rollem 88000] 0x700005d0 0x00408825 move s1,v0 nld and noft Manual—520384-003 5 -7...
  • Page 98: Dumpoffset Or Do

    ASCII format. { DECIMAL | D } displays portions of the object file in decimal format. { HEX | H } displays portions of the object file in hexadecimal format. nld and noft Manual—520384-003 5 -8...
  • Page 99: Example

    Example 5-3. DUMPOFFSET Option noft> dumpoffset 0x00000390 for 20 bytes ***** Readable Dump Of Offset 0x00000390 To 0x000003a4 ***** 0x00000390 0x27bdffe0 addiu sp,sp,0xffffffe0 0x00000394 0xafbf001c ra,0x1c(sp) 0x00000398 0x3c0e0800 t6,0x800 0x0000039c 0x3c0f5800 t7,0x5800 0x000003a0 0x25ef0048 addiu t7,t7,0x48 nld and noft Manual—520384-003 5 -9...
  • Page 100: Dumpproc Or Dp

    { TO end-address | FOR { number { BYTES | B | WORDS | W } | * }} end-address is an ending virtual address in hexadecimal format. number is the number of bytes or words to display. displays information to the end of the code or data section. nld and noft Manual—520384-003 5- 10...
  • Page 101 { OCTAL | O } displays portions of the object file in octal format. If you do not specify the format with the DUMPPROC option, the formatting is controlled by the SET FORMAT option (see on page 5-42). nld and noft Manual—520384-003 5- 11...
  • Page 102: Example

    92 } [rollem 92000] 0x7000060c 0x8fb00014 s0,0x14(sp) [rollem 92000] 0x70000610 0x8fb10018 s1,0x18(sp) [rollem 92000] 0x70000614 0x8fbf001c ra,0x1c(sp) -[rollem 91000] 0x70000618 0x012a1021 addu v0,t1,t2 [rollem 92000] 0x7000061c 0x03e00008 [rollem 92000] 0x70000620 0x27bd0030 addiu sp,sp,0x30 nld and noft Manual—520384-003 5- 12...
  • Page 103: Env

    OBEY command file (see OBEY page 5-39) or a TACL RUN command IN parameter input file. nld and noft Manual—520384-003 5- 13...
  • Page 104: Example

    5-42, particularly Example 5-8 on page 5-19). The default size of the history buffer is 50 commands. If you do not specify history-number, -history-offset, or text, the FC option uses the previous command. nld and noft Manual—520384-003 5- 14...
  • Page 105: File Or F

    5-31 LISTUNREFERENCED or LUR on page 5-32 LISTUNRESOLVED or LU on page 5-35 Any FILE option clears the current scope and case target file parameters. (Target file parameters are described in on page 5-42.) nld and noft Manual—520384-003 5- 15...
  • Page 106: Example

    OSS filenames using the default directory established with page 5-5. Example 5-6. FILE Option noft> file obj Object File : $WORK.JASON.obj File Format : ELF Scope : (none) Case : Not Sensitive nld and noft Manual—520384-003 5- 16...
  • Page 107: Help Or

    (see Example 5-8 on page 5-19). help-topic gives detailed information on specific noft topics. HELP without any options displays a list of options and help topics (see Example 5-9 on page 5-19). nld and noft Manual—520384-003 5- 17...
  • Page 108: Example

    NOFT to looking at individual source files SET SORT set sort for NOFT LIST outputs SHOW shows variables in current NOFT session SYSTEM changes default system VOLUME changes default (sub)volume XREFPROC dumps cross reference of procedures noft> nld and noft Manual—520384-003 5- 18...
  • Page 109: Example

    LISTSRLFIXUPS LISTUNRESOLVED LISTUNREFERENCED OBEY RESET SET CASE SET FORMAT SET HISTORYBUFFER SET HISTORYWINDOW SET LINES SET LOG SET OUT SET SCOPEPROC SET SCOPESOURCE SET SORT SHOW XREFPROC commands command_line object_files procedures shortcuts source_files noft> nld and noft Manual—520384-003 5- 19...
  • Page 110: History Or H

    Example 5-10. HISTORY Option noft> HISTORY 7 8> file /G/qtal/jasonoft/testo 9> set historywindow 7 10> listproc * sss $qtal.jasonoft.samplet 11> dumpproc 3 in hex 12> innerlist on 13> out proc3 14> dumpproc 3 in hex nld and noft Manual—520384-003 5- 20...
  • Page 111: Layout

    > External Symbols SYMBOL_TABLE 0x000cd070 0x0001c870 ELF Symbol String STRTAB 0x000e98e0 0x00015ecd ELF Symbols SYMTAB 0x000ff7b0 0x0001c880 Tandem GINFO GINFO 0x0011c030 0x00009ef4 Section Strings STRTAB 0x00125f30 0x00000070 Section Headers no ELF type 0x00125fa0 0x00000230 nld and noft Manual—520384-003 5- 21...
  • Page 112: Listattribute Or La

    Directly Needed Public SRL Bitmap : 0x00c0 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 Userlibrary Name : (none) Userlibrary Timestamp : 0 SRL Client : Yes Floating-Point Type : TANDEM_FLOAT Float-lib-overrule : No MCB address : 0x08004d80 nld and noft Manual—520384-003 5- 22...
  • Page 113: Listcompilers Or Lc

    LISTCOMPILERS or LC The LISTCOMPILERS option lists version information about the native compiler components and nld utility used to create an object file. { LISTCOMPILERS | LC } [ BRIEF | B | DETAIL | D] nld and noft Manual—520384-003...
  • Page 114: Example

    Back End Assembler : (not available) Filename : \CYCLONE.$PTAL.KMZMAIN.PROGHDRQ File Number : 4 R_REFSHFT Compiler Front End : (not available) Back End Optimizer : (not available) Back End Code Generator : (not available) Back End Assembler : (not available) nld and noft Manual—520384-003 5- 24...
  • Page 115: Example

    Back End Assembler : T8304DX1_01NOV96_06JAN97_SUN Filename : /tmp_mnt/designs/runtime/natived40/ T8432,D44AAD/T8432/./rtversn.c File Number : 62 C Compiler Front End : T9577D43_T9225D43_30AUG97_CFE_20MAR97_ Back End Optimizer : T8304DX1_01NOV96_06JAN97_SUN Back End Code Generator : T8304DX1_01NOV96_06JAN97_SUN Back End Assembler : T8304DX1_01NOV96_06JAN97_SUN noft> nld and noft Manual—520384-003 5- 25...
  • Page 116: Listoptimize Or Lo

    Example 5-16. LISTOPTIMIZE Option noft> listoptimize * ******** Optimization of Procedures ******** Procedure Name : _MAIN : T8432D40_01NOV95_CRTLMAIN : __INIT__1_C : housekeeping : main : menu : nld and noft Manual—520384-003 5- 26...
  • Page 117: Listproc Or Lp

    P. This is the default. NOSUBPROC does not list subprocedures along with procedures. If procedure P contains subprocedure S, a LISTPROC P NOSUBPROC command line lists only P and not S even though S is within P. nld and noft Manual—520384-003 5- 27...
  • Page 118: Example

    Source File : \CYCLONE.$NATIV1.CRGCPP.SPOINT Note. Visibility has two values, External and Static. Static is given for pTAL subprocedures or if local symbols exist and the function symbol type is static; otherwise, External is given. nld and noft Manual—520384-003 5- 28...
  • Page 119: Listsource Or Ls

    5-42), the LISTSOURCE option lists only the source file containing the procedure definition. Example 5-19. LISTSOURCE Option (BRIEF) noft> listsource * brief ******** List of Source Files ******** Address Source File 0x76100390 \CYCLONE.$PTAL.KMZRLD.DLL1C noft> nld and noft Manual—520384-003 5- 29...
  • Page 120: Listsrlexports Or Lle

    { LISTSRLFIXUPS | LLF } [ BRIEF | B | DETAIL | D] BRIEF lists only the unresolved symbols and SRL names. This is the default. DETAIL provides more information, such as number and fixup address. nld and noft Manual—520384-003 5- 30...
  • Page 121: Listsrlinfo Or Lli

    Number : 0 Name : ZCRESRL Fixed Up : Yes Generation Number : 2 Digest : 33829b9d9ba4a01fd7c55b9b980b4e05 Number : 1 Name : ZCRTLSRL Fixed Up : Yes Generation Number : 16 Digest : 64ab17a34c5f499ef96f874edbf0258f nld and noft Manual—520384-003 5- 31...
  • Page 122: Listunreferenced Or Lur

    This is the default. DETAIL provides more information, such as the type of each symbol. For C++ functions, DETAIL provides the “demangled” (original) names as well as the “mangled” internal equivalents. nld and noft Manual—520384-003 5- 32...
  • Page 123: Example

    LISTUNREFERENCED option. Compare Example 5-24 Example 5-29 on page 5-37, which shows the result of the LISTUNRESOLVED option. Example 5-24. LISTUNREFERENCED Option for Example 5-23 pTAL Program noft> listunreferenced * Unreferenced Name UNREFERENCED nld and noft Manual—520384-003 5- 33...
  • Page 124: Example

    37, which shows the result of the LISTUNRESOLVED option. Example 5-26. LISTREFERENCED Option for Example 5-25 C Program noft> listunreferenced * *** DATA ERROR *** [1055]: Did not find any unreferenced symbols matching scope. nld and noft Manual—520384-003 5- 34...
  • Page 125: Listunresolved Or Lu

    System Library calls (as documented in the Guardian Procedure Calls Reference Manual), and calls to functions in SRLs. See Example 5-31 on page 5-37. Note. Not available for PIC object files. nld and noft Manual—520384-003 5- 35...
  • Page 126 Demangled Name operator new(unsigned int) Type : Proc Addresses Used At : 0x761004a4 0x76100438 Number : 11 Name __dl__FPv Demangled Name operator delete(void *) Type : Proc Addresses Used At : 0x761004f4 0x76100514 noft> nld and noft Manual—520384-003 5- 36...
  • Page 127 Example 5-31. Effect of EXCLUDE on LISTUNRESOLVED Option Without EXCLUDE noft> lu * Unresolved Name unresolved errno C_INT_INIT_START_ environ C_INT_INIT_COMPLETE_ exit With EXCLUDE noft> lu * e Unresolved Name Location reference --------------------------------------- unresolved 0x700003c8 nld and noft Manual—520384-003 5- 37...
  • Page 128: Log

    To use the file that you created with the previous command, enter either of the following commands: LOG $VOL.SUBVOL.LOG1 B SET LOG $VOL.SUBVOL.LOG1 B Example 5-32. LOG Option noft> log testfile Log File : $SPOOL.KEVIND.testfile nld and noft Manual—520384-003 5- 38...
  • Page 129: Obey

    The maximum size of the OSS pathname is 255 characters. sets the file type of the output file to binary if the file does not already exist. The default is text. If the file already exists, B has no effect. nld and noft Manual—520384-003 5- 39...
  • Page 130: Quit Or Q

    OBEY command file (see OBEY page 5-39) or a TACL RUN command IN parameter input file. nld and noft Manual—520384-003 5- 40...
  • Page 131: Reset

    Log File : (none) Obey File : (none) Current Path : /lt1/jasonu/tests/show/ Sorting : (none) Formatting : Icode Scope : (none) Case : Sensitive History Size : 50 History Window : 10 Lines per page : 0 nld and noft Manual—520384-003 5- 41...
  • Page 132: Set

    C or C++, the default is case sensitivity ON; otherwise, the default is case sensitivity OFF. turns on case sensitivity in the noft environment. nld and noft Manual—520384-003 5- 42...
  • Page 133 This option can only be used for text dumps. OCTAL displays portions of the object file in octal format. returns the current format setting. nld and noft Manual—520384-003 5- 43...
  • Page 134 The value used when you specify number is an approximation; a single line of noft output can result in multiple lines of output on a screen, so more lines than specified might be displayed. nld and noft Manual—520384-003 5- 44...
  • Page 135 Use LISTPROC or LP on page 5-27 to list each procedure number. eliminates any scope limitations and allows you to view the entire object file. returns the current procedure in scope. nld and noft Manual—520384-003 5- 45...
  • Page 136 NONE sorts noft output in numerical order determined in the relevant table. This is the default. returns the current sorting order. nld and noft Manual—520384-003 5- 46...
  • Page 137: Show

    Log File : (none) Obey File : (none) Current Path : /lt1/jasonu/tests/show/ Sorting : Alpha Formatting : Icode Scope : (none) Case : Sensitive History Size : 50 History Window : 10 Lines Per Page : 0 nld and noft Manual—520384-003 5- 47...
  • Page 138: System Or Volume

    5-47 list the noft current settings of the volume and subvolume. The noft utility does not verify the validity of the specified node, volume, or subvolume name. noft provides verification only when trying to open an object or source file. nld and noft Manual—520384-003 5- 48...
  • Page 139: Xrefproc Or Xp

    CALLEDBY lists each procedure and the procedures which call it. A scope setting restricts the procedures who are the children of the given procedure. This is the default. nld and noft Manual—520384-003 5- 49...
  • Page 140 “reference” (see address_order_sort at the end of Example 5-40 page 5-52). Considerations: The virtual addresses of the call sites are shown with the DETAIL option specified. A sort setting affects both lists and sublists of procedures. nld and noft Manual—520384-003 5- 50...
  • Page 141: Example 5-37. Xrefproc Option (Brief)

    __apl__6stringFR6string calls detail Calling Procedure (Demangled Name) Called Procedures (Demangled Name) Addresses ---------------------------------------------------------------- __apl__6stringFR6string (string::operator +=(string &)) __dl__FPv (operator delete(void *)) 0x70000e54 __nw__FUi (operator new(unsigned int)) 0x70000e00 0x70000e70 strcat 0x70000ea8 strcpy 0x70000e90 nld and noft Manual—520384-003 5- 51...
  • Page 142: Example 5-40. Xrefproc Option For Non-Pic Object File With "Reference Indicators (Calls And Detail)

    Example 5-40. XREFPROC Option for Non-PIC Object File With “Reference” Indicators (CALLS and DETAIL) noft> xrefproc build_address_order_procs calls detail Calling Procedure (Demangled Name) Called Procedures (Demangled Name) Addresses ---------------------------------------------------------------------------- build_address_order_procs address_order_sort 0x700311dc reference data_error 0x70030e3c my_malloc 0x70030e1c qsort 0x700311e0 nld and noft Manual—520384-003 5- 52...
  • Page 143: Ar Utility

    Windows 98 Windows NT Windows 2000 Windows XP 1. HP Tandem Development Suite 2. HP Enterprise Toolkit—NonStop Edition To run the ar utility, use the following syntax. The syntax is the same in every environment in which ar runs: ar action-option [modifier-option ...] [position_name] archive [file ...]...
  • Page 144 If the name of a file to be extracted is not valid on the platform where ar is running, ar does not extract the file but issues a diagnostic instead. nld and noft Manual—520384-003 6 -2...
  • Page 145 Update older files. When used with the -r option, this option causes ar to replace a file within the archive only if the corresponding file has a modification time that is at least as new as the modification time of the file within the archive. nld and noft Manual—520384-003 6 -3...
  • Page 146 When modifier options are used in combination, the preceding hyphen can be omitted for all but the first option specified. position-name is the name of a file in the archive that is used for relative positioning. See the descriptions of the -m and -r options. nld and noft Manual—520384-003 6 -4...
  • Page 147 -p [-v] [-s] ...] archive file ar -q [-clv] ...] position-name archive file ar -r [-cuv] [-abil] [ ...] archive file ar -t [-v] [-s] [-Wfiletype] ...] archive file ar -x [-v] [-sCT] ...] nld and noft Manual—520384-003 6 -5...
  • Page 148 Binder or nld. If ar detects mixing of the two kinds of HP object files, it generates the archive but does not generate a symbol table, issuing an appropriate warning message instead.
  • Page 149: Strip Utility

    TNS and accelerated programs stripped of the Binder region cannot be relinked by the Binder. TNS/R native programs stripped of the symbols region cannot be relinked by the nld utility. nld and noft Manual—520384-003 7 -1...
  • Page 150 Utility nld and noft Manual—520384-003 7 -2...
  • Page 151: Native Object File Structure

    Native Object File Structure nld and noft operate on native object files. A native object file has four main components: Headers of the following types, which contain information about the structure and components of the object file: File Program Section...
  • Page 152: Mdebug Section

    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.
  • Page 153: 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.
  • Page 154: 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. With nld, you cannot replace pieces of an object file, such as individual procedures or data blocks, or pull them out and link them to create a new object file;...
  • Page 155: Comparing Binder Commands To Nld Options

    Comparing Binder Commands to nld Options 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 Option Notes 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.
  • Page 156: Example 9-1. Linking Two Object Files In Binder And Nld (Simple Case)

    Converting From Binder to nld and noft Comparing Binder Commands to nld Options Table 9-2. Comparing Binder Commands to nld Options (page 2 of 2) Binder Command Option Notes OBEY obey You can redirect output listings with the Guardian RUN command /OUT/ option or the OSS | or >...
  • Page 157: Example 9-2. Linking Two Object Files In Binder And Nld (Less Simple Case)

    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 run- time library is linked to the target object file and the heap is set to 10 pages. For details...
  • Page 158: Comparing Binder Commands To Noft Options

    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)
  • Page 159 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.
  • Page 160 Converting From Binder to nld and noft Comparing Binder Commands to noft Options nld and noft Manual—520384-003 9 -8...
  • Page 161: General Information

    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. Comparison of nld Diagnostic Types nld Stops nld Creates a Message Type Description...
  • Page 162 Archives can only be built by the ar utility, but can be named on the command line to be read by nld. It is important to use a version of ar supplied by HP, rather than some other ar tool. On platforms other than Guardian, archives typically are given the .a filename suffix.
  • Page 163 In Guardian, this is a location where the standard SRLs are kept. data. Whenever nld refers to “data,” it is always referring to data that exists outside of any procedure, as opposed to data that resides on the stack and comes and goes when procedures are called and return.
  • Page 164 -strip on page 3-16. An SRL is also specified on the nld command line when nld is building a client of that SRL. It is an error to give a loadfile to nld in any other circumstances. When you run nld, it creates a loadfile by default. If you want to create a linkfile instead, you must specify on page 3-11.
  • Page 165 A token introduced by a hyphen (-); for example: -o, -rename, or -verbose. If nld reports a problem with a flag, and you did not specify that flag yourself, it means that you called nld indirectly through some other tool and that other tool must have supplied the flag.
  • Page 166 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.
  • Page 167 HP personnel for further analysis. open. If nld indicates that it cannot open a file, that means nld tried to start reading a file, but the operating system would not allow nld to do so. There can be various reasons for this, depending on the platform under which nld is being run.
  • Page 168 The relocation table is part of an object file. If nld indicates a bad value in a relocation table, it is probably the kind of problem that is not your fault but is an error in the compiler or linker, or an inconsistency between them, and should be referred to HP support for further analysis.
  • Page 169 It is possible to build a client while some of the needed SRLs are missing or out of date, which could lead to nld warnings about not being able to “fix up” the client to its SRLs, but this should not happen often to typical users. If it is only a warning message, rather than an error, running the program should still be possible.
  • Page 170 HP support for further analysis. SYSGEN. This is the name of the activity that is used to build a new version of the HP operating system. During SYSGEN, there are various calls on nld.
  • Page 171 10-4. user library (UL). A user library is a type of SRL as far as nld is concerned; however, unlike other SRLs, it is expected that typical users will build their own user libraries. To build a user library, use on page 3-16.
  • Page 172: Fatal Errors

    Fatal Errors 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. This subsection shows error messages in the format that they appear on Guardian and OSS platforms;...
  • Page 173 This is an internal error. Please contact your service provider. **** ERROR **** [1009]: The unknown attribute name 'attribute-name' was encountered in a -set or -change flag. See: -change on page 3-4. -set on page 3-13 nld and noft Manual—520384-003 10 -13...
  • Page 174 'OSS' or 'GUARDIAN'. See: -change on page 3-4. -set on page 3-13 **** ERROR **** [1014]: Cannot open file 'filename' specified in -obey flag. -fl or -obey on page 3-6. nld and noft Manual—520384-003 10 -14...
  • Page 175 **** ERROR **** [1020]: A -d flag was the last item found in the command stream, but a hexadecimal value must be specified for the -d flag. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -15...
  • Page 176 A -d_slack_percent flag was found in the command stream, but a numerical value must be specified for the -d_slack_percent flag, and the next item in the command stream was 'item'. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -16...
  • Page 177 **** ERROR **** [1032]: An -ev_slack flag was the last item found in the command stream, but a numerical value must be specified for the -ev_slack flag. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -17...
  • Page 178 **** ERROR **** [1038]: A -hot_proc_list flag was found at the end of the command stream, but a filename must be specified for the -hot_proc_list flag. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -18...
  • Page 179 **** ERROR **** [1044]: A -kseg0 flag was the last item found in the command stream, but a hexadecimal value must be specified for the -kseg0 flag. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -19...
  • Page 180 A -libname flag was found in the command stream, but a filename must be specified for the -libname flag, and the next item in the command stream begins instead with a hyphen. -libname on page 3-9. nld and noft Manual—520384-003 10 -20...
  • Page 181 This is an internal error. Please contact your service provider. **** ERROR **** [1056]: A -rename flag was found at the end of the command stream, but two symbol names must be specified for the -rename flag. -rename on page 3-12. nld and noft Manual—520384-003 10 -21...
  • Page 182 **** ERROR **** [1062]: An -srl_name flag was found at the end of the command stream, but an SRL name must be specified for the -srl_name flag. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -22...
  • Page 183 **** ERROR **** [1068]: A -t flag was the last item found in the command stream, but a hexadecimal value must be specified for the -ul flag. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -23...
  • Page 184 A -t_slack_percent flag was found in the command stream, but a numerical value must be specified for the -t_slack_percent flag, and the next item in the command stream was 'item'. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -24...
  • Page 185 -y flag, and the next item in the command stream begins instead with a hyphen. on page 3-17. **** ERROR **** [1077]: Unrecognized flag: 'item'. Table 3-1, nld Flag Summary, on page 3-1. **** ERROR **** [1078]: Only 100 -y flags are permitted. on page 3-17.
  • Page 186 **** ERROR **** [1086]: It is incorrect to specify both the -r flag and -import flags; imports may only be specified when building an executable file. See: -import on page 3-6 on page 3-11 nld and noft Manual—520384-003 10 -26...
  • Page 187 You specified -export flags in the wrong circumstances; exports 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. nld and noft Manual—520384-003 10 -27...
  • Page 188 -prev flag, the maximum sizes of the text and data segments are inherited from the previous version of the SRL. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -28...
  • Page 189 This is an internal error. Please contact your service provider. **** ERROR **** [1100]: The SRL name that was given to NLD this time, either on the command line with the -srl_name flag, or found in the file specified with the -use_srl_options flag, does not match the SRL name found in the previous version of the SRL specified with the -prev flag.
  • Page 190 This is an internal error. Please contact your service provider. **** 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:...
  • Page 191 A -srl_ref flag was the last item found in the command stream or is followed by a '-'. A <name> attribute must be specified for the -srl_ref flag. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -31...
  • Page 192 Fatal Errors **** 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.
  • Page 193 This is an internal error. Please contact your service provider. **** 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. nld and noft Manual—520384-003 10 -33...
  • Page 194 **** 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. Please contact your service provider. nld and noft Manual—520384-003 10 -34...
  • Page 195 'filename'. **** ERROR **** [1136]: The object file named 'filename' cannot be accepted because it has a larger version number than that of NLD itself. This version of NLD supports version numbers up to number-1, but this object file contains version number number-2.
  • Page 196 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 nld and noft Manual—520384-003 10 -36...
  • Page 197 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. Please contact your service provider. nld and noft Manual—520384-003 10 -37...
  • Page 198 'GINFO header' says that there are no export digests in the SRL. **** ERROR **** [1156]: The object file named 'filename' appears to be corrupted because the first four bytes do not contain the proper 'magic number'. nld and noft Manual—520384-003 10 -38...
  • Page 199 This is an internal error. Please contact your service provider. **** ERROR **** [1160]: Object files are either 'executable' or 'non-executable'. Only non-executable object files can be used as NLD input files. However, 'filename' is executable. **** ERROR **** [1161]:...
  • Page 200 3-12. **** ERROR **** [1164]: You specified the -srl or -ul flag, but the input object file named 'filename' was previously build by NLD without the -srl flag. This is not allowed, unless you also specify the -no_data_rearrange flag.
  • Page 201 **** ERROR **** [1174]: The Guardian file system error number number occurred while trying to re-open the file named 'filename' for NLD's second pass. **** ERROR **** [1175]: The object file named 'filename' could not be re-opened for NLD's second pass.
  • Page 202 Diagnostic Messages Fatal Errors **** 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'.
  • Page 203 **** ERROR **** [1187]: The input object file named 'filename' appears to be corrupted because there is a bad value for the 'isymBase' field in file descriptor table entry number number. nld and noft Manual—520384-003 10 -43...
  • Page 204 **** ERROR **** [1195]: The input object file named 'filename' appears to be corrupted because there is a bad value for the 'iauxBase' field in file descriptor table entry number number. nld and noft Manual—520384-003 10 -44...
  • Page 205 **** ERROR **** [1202]: The input object file named 'filename' appears to be corrupted because the gp tables length for section 'name' contains number and should be >= '2' (minimally a header and a first entry). nld and noft Manual—520384-003 10 -45...
  • Page 206 Manual—520384-003 10 -46...
  • Page 207 Layout started at address-1 and needed to go down as far as address-2, but the section starts at address-3. **** ERROR **** [1211]: There appears to be an inconsistency in NLD's input. NLD has not created a 'farjump gateway' for the procedure named...
  • Page 208 Also, this target address is not an address listed in the 'procedure descriptor table', nor is it a location within the same procedure. NLD cannot relocate this type of code. **** ERROR **** [1215]: The input object file named 'filename' appears to be...
  • Page 209 **** ERROR **** [1221]: The Guardian file system error number number occurred while trying to purge the existing file named 'filename', which has the same name as that of the output file that NLD wants to create. **** ERROR **** [1222]:...
  • Page 210 'strtab', and 'symtab' do not appear sequentially in that order, on 16-byte boundaries. -strip on page 3-16. **** ERROR **** [1232]: Cannot open the file named 'filename' specified in a -change flag. -change on page 3-4. nld and noft Manual—520384-003 10 -50...
  • Page 211 **** ERROR **** [1238]: Fixup list entry number number for either the code or data segment specified a bad virtual address to be fixed up. virtual address was address, and this is not within that segment. nld and noft Manual—520384-003 10 -51...
  • Page 212: Fatal Errors

    'R_MIPS_32', 'R_MIPS_26', 'R_MIPS_HI16', and 'R_MIPS_LO16'. **** ERROR **** [1244]: An write error occurred while trying to update the file named 'filename' for the -srl_fixup flag. error-number. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -52...
  • Page 213 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_INFO section'. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -53...
  • Page 214 The file specified for the -srl_fixup flag has 'program headers' for both non-resident and resident text, but they do not specify consecutive areas of virtual memory. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -54...
  • Page 215 **** ERROR **** [1260]: Cannot open the file named 'filename'. **** ERROR **** [1261]: During the search being executed for a -l or -lib or -import flag, NLD encountered but could not open the file named 'filename'. See: -l or -lib...
  • Page 216 **** ERROR **** [1269]: The file name supplied with the -use_srl_options flag must be an ordinary object file, but the file named 'filename' is file-type. This is an internal error. Please contact your service provider. nld and noft Manual—520384-003 10 -56...
  • Page 217 An -elf_check flag was found in the command stream, but a filename must be specified for the -elf_check flag, and the next item in the command stream begins instead with a hyphen. -elf_check on page 3-5. nld and noft Manual—520384-003 10 -57...
  • Page 218 'section header' for the 'TANDEM_GINFO section'. **** ERROR **** [1282]: The file named 'filename' appears to be corrupted because it does not have a 'program header' for the 'TANDEM_GINFO section'. nld and noft Manual—520384-003 10 -58...
  • Page 219 The file named 'filename' appears to be corrupted because the ElfHdr.field-name field has a bad value. **** ERROR **** [1290]: The -elf_check function 'filename' encountered an internal error; string number. -elf_check on page 3-5. nld and noft Manual—520384-003 10 -59...
  • Page 220 The Guardian file system error number number occurred while trying to alter the filename in the string 'string'. **** ERROR **** [1306]: The file named 'filename' is a PIC file; NLD does not support this type of object file. **** ERROR **** [1307]:...
  • Page 221 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. In this subsection, error messages are as they appear on Guardian and OSS platforms;...
  • Page 222 **** 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.
  • Page 223 'filename'. This was entry number number-2 in the corresponding relocation table. The relocated value did not fit within 16 bits. nld and noft Manual—520384-003 10 -63...
  • Page 224 The address of the data being referenced 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. nld and noft Manual—520384-003 10 -64...
  • Page 225 **** ERROR **** [2022]: Object name-1 created with C++ 'versionnumber-1' pragma cannot be linked with the object name-2 created with C++ 'versionnumber-2' pragma. All objects containing C++ must be compiled with the same C++ version pragma. nld and noft Manual—520384-003 10 -65...
  • Page 226 This is considered an error, since it can lead to incorrect relocation. For a list of all the object files that declared this data item, run NLD again with the additional flags '-y symbol' and -verbose. See: -verbose on page 3-16...
  • Page 227 The attribute(s) that are different for the function in object file filename-1 are: attribute-list. For a list of all the object files that declared this procedure, run NLD again with the additional flags '-y symbol' and -verbose. See: -verbose on page 3-16 on page 3-17 nld and noft Manual—520384-003...
  • Page 228 3-10. **** ERROR **** [2038]: A -NS_max_extents flag was the last item found in the command stream, but a numerical value must be specified for the -NS_max_extents flag. -NS_max_extents on page 3-10. nld and noft Manual—520384-003 10 -68...
  • Page 229 The -hybrid_DLL name 'srl-name' cannot be longer than number characters. Warnings Characteristics of warnings: Identify situations where nld might not have done what you expected Allow nld to complete normally Are issued if the flag -verbose on page 3-16 is specified...
  • Page 230 This is an internal warning. Please contact your service provider. **** WARNING **** [10004]: You specified that the symbol named 'name' should be renamed, but this symbol was not defined in NLD's input files, so this -rename flag has been ignored. -rename on page 3-12.
  • Page 231 This symbol was found in the 'external symbol table' in the object file named 'filename', and it has been renamed. However, NLD has not succeeded in matching it up with an entry in the 'local symbol table',which might indicate that debugging information is inconsistent.
  • Page 232 'small undefined data', and this might lead to relocation errors. **** WARNING **** [10019]: The symbol named name was declared both as 'large common' and as 'small common', and this might lead to relocation errors. nld and noft Manual—520384-003 10 -72...
  • Page 233 '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. See: -verbose on page 3-16...
  • Page 234 Diagnostic Messages Warnings **** WARNING **** [10025]: NLD was unable to determine the name of the cold load subvolume SYSTEM.SYS<nn> 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.
  • Page 235 The symbol 'name' was previously exported in SRL 'filename-1' (object file name 'filename-2'). **** WARNING **** [10038]: The file named 'filename' may have been corrupted from a bad string; GINFO_unres_site.instr=address. Strongly recommend rebuilding the file. nld and noft Manual—520384-003 10 -75...
  • Page 236 **** WARNING **** [10044]: Program containing code compiled with C++ 'versionx' pragma may conflict with the SRL 'srl-name' created with C++ 'versiony' pragma when the program runs. Suggest compiling objects with same C++ pragma as the SRL. nld and noft Manual—520384-003 10 -76...
  • Page 237 **** INFORMATIONAL MESSAGE **** [20002]: The input object file named 'filename' has broken the rules that should be followed so that NLD has more freedom to rearrange data. This message has been printed in response to the -show_internal_reloc flag.
  • Page 238 Specify a value of -G no larger than 'number' so that all the GP-relative data will fit into 'small' data. **** INFORMATIONAL MESSAGE **** [20011]: The -G value recommended in the previous message is conservative because of inconsistent common symbol sizes. nld and noft Manual—520384-003 10 -78...
  • Page 239 'filename', where it is 'name-2'. **** INFORMATIONAL MESSAGE **** [20016]: Since 'filename' is not an ELF object file, NLD will not be able to check that all definitions of %n have the same size. **** INFORMATIONAL MESSAGE **** [20017]: The file named 'filename' was specified for a -strip flag, but this file is already stripped.
  • Page 240 Diagnostic Messages Informational 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'.
  • Page 241 **** INFORMATIONAL MESSAGE **** [30000]: The following program limits would have been created: list **** INFORMATIONAL MESSAGE **** [30001]: No text for message number number. Internal Error. This is an internal message. Please contact your service provider. nld and noft Manual—520384-003 10 -81...
  • Page 242 Diagnostic Messages Informational Messages nld and noft Manual—520384-003 10 -82...
  • Page 243: Data Errors

    *** FATAL ERROR *** [4]: Error reading object file: filename. Cause. A file input or output error occurred or there is bad end of file. Recovery. Restart noft and then rebuild the object file. nld and noft Manual—520384-003 11- 1...
  • Page 244 *** FATAL ERROR *** [10]: More than one object file specified. Cause. Stated in message. Recovery. Reenter the noft run command, specifying only one object file for input. nld and noft Manual—520384-003 11- 2...
  • Page 245 *** FATAL ERROR *** [15]: Unable to complete the command option: command-name. Cause. The specified flag, command-name, was not accepted on the same line. Recovery. Enter SET on a separate line, then enter LIST or DUMP. nld and noft Manual—520384-003 11- 3...
  • Page 246: Data Errors

    *** DATA ERROR *** [1000]: Cannot dump out by procedure/source name because the object file does not contain full symbols. Cause. The object file was stripped of its symbol table. Recovery. Rebuild the object file with symbols information. nld and noft Manual—520384-003 11- 4...
  • Page 247 SET SCOPEPROC or SET SCOPESOURCE. Recovery. Use SHOW on page 5-47 to see if there is any scoping. If there is, either reset the scope or change the scope. nld and noft Manual—520384-003 11- 5...
  • Page 248 Cause. Stated in message. Recovery. Stated in message. *** DATA ERROR *** [1009]: Did not find any ELF symbols belonging to source file, check options and full table-name table. Cause. Stated in message. Recovery. Stated in message. nld and noft Manual—520384-003 11- 6...
  • Page 249 Cause. Stated in message. Recovery. Stated in message. *** DATA ERROR *** [1014]: Did not find any runtime symbols belonging to source file, check options and rpd table. Cause. Stated in message. Recovery. Stated in message. nld and noft Manual—520384-003 11- 7...
  • Page 250 *** DATA ERROR *** [1020]: No object file open. Cause. The specified object file is not open. Recovery. Use FILE or F on page 5-15 to specify the object file and then reissue the desired command. nld and noft Manual—520384-003 11- 8...
  • Page 251 Recovery. Rebuild the object file with complete symbols information. *** DATA ERROR *** [1026]: Not an ELF file: filename. Cause. The first few bytes of the object file are corrupt. Recovery. Rebuild the object file. nld and noft Manual—520384-003 11- 9...
  • Page 252 Procedure not found in object file: procedure-name. Cause. Stated in message. Recovery. Check the list of procedures to see if the procedure is actually in the object file. If not, rebuild the object file. nld and noft Manual—520384-003 11 -10...
  • Page 253 Specified address(es) not found. Cause. noft cannot find the specified addresses in the object file. Recovery. Ensure that the addresses exist in the object file and rebuild the object file with complete symbols information. nld and noft Manual—520384-003 11 -11...
  • Page 254 *** DATA ERROR *** [1042]: Unable to determine instruction. Cause. noft could not find the opcode for the last address. Recovery. Ensure that the ICODE is dumped into a code section. nld and noft Manual—520384-003 11 -12...
  • Page 255 (in the OSS environment and on UNIX workstations) or an edit file (in the Guardian environment). *** DATA ERROR *** [1047]: Unable to read table-name procedure table, command ignored. Cause. Either the loadfile is stripped or the procedure table is corrupted. Recovery. Rebuild the loadfile without stripping. nld and noft Manual—520384-003 11 -13...
  • Page 256 The directory (pathname) specified by on page 5-5 The system (node-name) or subvolume-name specified by SYSTEM or VOLUME on page 5-48 Recovery. Ensure that the specified directory, system, or subvolume exists and has the correct format. nld and noft Manual—520384-003 11 -14...
  • Page 257 5-32 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. nld and noft Manual—520384-003 11 -15...
  • Page 258 FILENAME_RESOLVE_ tried to build a directory name from existing pieces as a result of processing the command SYSTEM or VOLUME on page 5-48. Recovery. Ensure that SYSTEM or VOLUME on page 5-48 specifies a valid node, volume, and subvolume. nld and noft Manual—520384-003 11 -16...
  • Page 259 Rather than show an empty list, noft gives this error so that you can reset the scope and reissue the command. Recovery. Remove the scoping of the procedure with SET SCOPEPROC * (see on page 5-42). nld and noft Manual—520384-003 11 -17...
  • Page 260: Warnings

    Cause. The specified object file was created with later versions of native mode compilers and linker than noft supports; therefore, noft might not understand the object file format. Recovery. Use a newer version of noft. nld and noft Manual—520384-003 11 -18...
  • Page 261 Cause. LISTPROC or LP on page 5-27 or XREFPROC or XP on page 5-49 could not find the specified procedure. Recovery. Use LISTPROC * or XREFPROC * to see what procedures are available. nld and noft Manual—520384-003 11 -19...
  • Page 262 SEGMENT_DEALLOCATE_ had the following result: result Cause. This error can occur only in the Guardian environment. Recovery. Check the result in the Guardian Procedure Calls Reference Manual (see SEGMENT_DEALLOCATE_). Based on that information, take appropriate action. nld and noft Manual—520384-003 11 -20...
  • Page 263 Recovery. noft continues processing the remaining procedures in the object file. nld and noft Manual—520384-003 11 -21...
  • Page 264: Syntax Errors

    Recovery. Release the scoping restriction previously enabled with SET SCOPEPROC * or SET SCOPESOURCE * (see on page 5-42). Ensure that the address range is in the procedure or source file. nld and noft Manual—520384-003 11 -22...
  • Page 265 Recovery. Ensure that the syntax of the command is correct. Note. The next line of the COMMENT command in missing. The COMMENT command in noft is different from many other HP products. *** SYNTAX ERROR *** [3009]: Cannot find name for procedure for option.
  • Page 266 Cause. The number specified for HISTORYBUFFER or HISTORYWINDOW is too small (less than zero) or too large (larger than 32767). Recovery. Use on page 5-42 to specify a buffer or window number from 1 to 32767. nld and noft Manual—520384-003 11 -24...
  • Page 267 Recovery. Correct the command syntax. *** SYNTAX ERROR *** [3020]: Missing parameter to command, command ignored. Cause. A parameter is missing for the specified command. Recovery. Correct the command syntax; specifically, the parameter descriptions. nld and noft Manual—520384-003 11 -25...
  • Page 268 SET SCOPESOURCE command. Recovery. Either use RESET on page 5-41 to reset the scope to its default or use on page 5-42 to change the scope. To see the current scope, use SHOW page 5-47. nld and noft Manual—520384-003 11 -26...
  • Page 269 Use SET SCOPEPROC * to turn scoping off (see page 5-42). Use DUMPADDRESS or DA on page 5-6 instead of DUMPPROC or DP on page 5-10. If the message refers to an object file, ensure that the addresses or offsets are possible. nld and noft Manual—520384-003 11 -27...
  • Page 270 *** SYNTAX ERROR *** [3032]: SET should not be used by itself, check HELP SET for more details. Cause. SET requires arguments, but it has none. Recovery. Reenter SET correctly (see on page 5-42). nld and noft Manual—520384-003 11 -28...
  • Page 271 Cause. noft cannot find the specified source file number. Recovery. Ensure that specified procedure exists in object file and the number is in range. Use LISTSOURCE * to see a list of all the source files (see LISTSOURCE or on page 5-29). nld and noft Manual—520384-003 11 -29...
  • Page 272 Unable to allocate memory to table 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. nld and noft Manual—520384-003 11 -30...
  • Page 273 Cause. The command number was in range, but the line was unavailable. Recovery. Use HISTORY or H on page 5-20 to see if the command can be seen and if so, retype the command. nld and noft Manual—520384-003 11 -31...
  • Page 274 Unable to go back number lines in history. Cause. noft cannot go back the specified number of history lines. Recovery. Use SET HISTORYBUFFER to set the size of the history buffer (see on page 5-42). nld and noft Manual—520384-003 11 -32...
  • Page 275 *** SYNTAX ERROR *** [3058]: Procedure name not found, check procedure descriptor table. Cause. Stated in message. Recovery. Use the LISTPROC * command to see the available procedure names (see LISTPROC or LP on page 5-27). nld and noft Manual—520384-003 11 -33...
  • Page 276 Name is too long. Cause. In SYSTEM or VOLUME on page 5-48, the value for node, volume, or subvolume was too long. Recovery. Give the SYSTEM or VOLUME option a valid node, volume, and subvolume. nld and noft Manual—520384-003 11 -34...
  • Page 277 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. nld and noft Manual—520384-003 11 -35...
  • Page 278 Diagnostic Messages Syntax Errors nld and noft Manual—520384-003 11 -36...
  • Page 279: Ar Diagnostic Messages

    Binder. TNS/R object files are linked together using the linking utility nld. ar attempts to build a symbol table for the archive so that the linking program can know the archive contents. A different symbol table is required for each linking program, so ar cannot build a single symbol table when both types of object files are represented in the archive.
  • Page 280 -ts options. archive, cannot open. Cause. An error occurred when ar attempted to open the specified archive. Recovery. Identify the error and remedy the situation, then rebuild the archive. nld and noft Manual—520384-003 12- 2...
  • Page 281 Recovery. Correct the error condition and rebuild the archive. archive, error on reopen. Cause. When running in the Guardian environment, ar encountered an error reopening the specified archive. Recovery. Correct the error condition and rebuild the archive. nld and noft Manual—520384-003 12- 3...
  • Page 282 Cause. An error occurred during the operation; for example, a member file cannot be found. The archive symbol table contained in the archive may have been corrupted or may not contain up-to-date information required by nld for resolving external references.
  • Page 283 Cause. The file member specified in the file operand is not in the archive. The -t option can be used to find out what members exist in the archive. Recovery. Reenter the command with correct member names. nld and noft Manual—520384-003 12- 5...
  • Page 284 Cause. The specified position operand is not in the archive. The -t option can be used to find out what members exist in the archive. Recovery. Reenter the command with correct member names as the position operand. nld and noft Manual—520384-003 12- 6...
  • Page 285 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. nld and noft Manual—520384-003 12- 7...
  • Page 286 Diagnostic Messages nld and noft Manual—520384-003 12- 8...
  • Page 287: Sample Nld And Noft Session

    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.
  • Page 288: Header Files

    Sample nld and noft Session Header Files 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:...
  • Page 289: Source Module Mainc

    Sample nld and noft Session Source Module MAINC Example A-4. Header File UTILH With Edit Line Number 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.
  • Page 290: Example A-6. Source Module Module1C With Edit Line Numbers

    Sample nld and noft Session Source Module MODULE1C 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.
  • Page 291: Source Module Module2C

    Sample nld and noft Session Source Module MODULE2C 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.
  • Page 292: User Library Utilc

    Sample nld and noft Session User Library UTILC 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.
  • Page 293: Nld Command Examples

    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. The flag -ul tells nld to use user library address range for the functions.
  • Page 294: Program Output

    Sample nld and noft Session Program Output 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.
  • Page 295: Noft Command Examples On A Linkfile

    Sample nld and noft Session noft Command Examples on a Linkfile 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.
  • Page 296: Listcompilers

    A-11 the program is not executable, so the first function address starts at zero, 0x00000000. (Some compilers make the starting address of the first function 0x70000000.) The actual starting address is set by nld when the object file is made executable. Size Function size.
  • Page 297: Example A-15. Listproc Option (Linkfile)

    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;...
  • Page 298: Listsource

    Sample nld and noft Session LISTSOURCE 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.
  • Page 299: Listsrlinfo

    Sample nld and noft Session LISTSRLINFO 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...
  • Page 300: Listunresolved

    Sample nld and noft Session LISTUNRESOLVED 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.
  • Page 301: File

    Sample nld and noft Session noft Command Examples on a Loadfile noft Command Examples on a Loadfile This subsection repeats the commands in noft Command Examples on a Linkfile page A-9 on the program file EXAMPLE1, except that for options that offer the choice of BRIEF or DETAIL, these examples use BRIEF.
  • Page 302: Example A-20. Listattribute Option (Loadfile)

    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.
  • Page 303: Example A-21. Listcompilers Option (Loadfile)

    Sample nld and noft Session LISTCOMPILERS 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.
  • Page 304: Example A-23. Listsource Option (Loadfile)

    Sample nld and noft Session LISTSOURCE 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.
  • Page 305: Example A-24. Effect Of Set Sort On Listproc And Listsource

    Sample nld and noft Session SET SORT 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. Effect of SET SORT on LISTPROC and LISTSOURCE noft>...
  • Page 306: Example A-26. Listunresolved Option (Loadfile)

    Sample nld and noft Session LISTUNRESOLVED 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 affected by the SET SORT ALPHA option done in Example A-24 on page A-19.
  • Page 307: Example A-27. Listoptimize Option (Loadfile)

    Sample nld and noft Session LISTOPTIMIZE 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...
  • Page 308: Example A-30. Effect Of Reset Scopesource On Xrefproc Option

    Sample nld and noft Session XREFPROC Example A-30 uses the RESET SCOPESOURCE option to remove the scoping limits and then repeats the XREFPROC option. Example A-30. Effect of RESET SCOPESOURCE on XREFPROC Option noft> RESET SCOPESOURCE Scope : (none) noft> xrefproc * BRIEF...
  • Page 309: Example A-31. Xrefproc Option (Loadfile

    Sample nld and noft Session XREFPROC 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.
  • Page 310: Example A-32. Dumpproc Option

    Sample nld and noft Session DUMPPROC DUMPPROC You can use the DUMPPROC option to see the code in the function delete_passengers. Example A-32. DUMPPROC Option DUMPPROC noft> delete_passengers ******** Readable Dump Of Procedure: delete_passengers ******** Procedure Src Line Address Long Word...
  • Page 311 Sample nld and noft Session DUMPPROC 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.
  • Page 312: Example A-33. Effect Of Set Format Innerlist On Dumpproc Option

    Sample nld and noft Session LISTSRLFIXUPS Example A-33. Effect of SET FORMAT INNERLIST on DUMPPROC Option (page 2 of 2) [delete_passengers 16100] 0x70000694 0000000000 nop 16.2 passengers_on_bus -= passengers_leaving; [delete_passengers 16200] 0x70000698 0x3c010800 lui at,0x800 [delete_passengers 16200] 0x7000069c 0x8c290000 lw...
  • Page 313: Example A-35. Listsrlexports Option

    Sample nld and noft Session LISTSRLEXPORTS 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>...
  • Page 314 Sample nld and noft Session LISTSRLFIXUPS nld and noft Manual—520384-003 A -28...
  • Page 315 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. The operation of examining, collecting, linking, and modifying code and data blocks from one or more object files to produce a target object file.
  • Page 316 -o filename. flag. A token introduced by a hyphen (-); for example: -o, -rename, or -verbose.
  • Page 317 See TNS/R native user library. nld utility. A utility that creates a loadfile or a linkfile from one or more nonexecutable object files. node. A system of one or more processor modules. Typically, a node is linked with other nodes to make a network.
  • Page 318 Language (TAL). pTAL compiler. An optimizing compiler for the pTAL language. public library. A library that is loaded when the CPU is loaded, provided by HP. The system library and SRLs are public libraries. A process can use multiple public libraries.
  • Page 319 (CISC) technology. TNS processors implement the TNS instruction set. Compare to TNS/R. TNS/R. HP computers that support the NonStop Kernel and that are based on reduced instruction-set computing (RISC) technology. TNS/R processors implement the RISC instruction set and are upwardly compatible with the TNS system-level architecture.
  • Page 320 A program can have only one user library. See also TNS/R native user library. volume. An HP physical storage device (disk) for files. HP volume names always begin with “$”. nld and noft Manual—520384-003 Glossary -6...
  • Page 321 C programs (continued) NonStop SQL/MP in 2-13 allow_duplicate_procs flag (nld) Windows nld and allow_missing_libs flag (nld) C run-time library allow_multiple_mains flag (nld) Guardian nld utility and 2-17 ansistreams flag (nld) nostdfiles flag and ar utility OSS nld utility and 2-19 details of...
  • Page 322 Index C++ run-time library Dynamic-link libraries (DLLs) Guardian nld utility and 2-18 OSS nld utility and 2-19 e flag (nld) Editing noft flags 5-14 ELF format Data declaration and definition 2-31 elf_check flag (nld) Data errors (noft) 11-4/11-16 Enterprise Toolkit—NonStop Edition...
  • Page 323 Instance data 2-15 Guardian environment for nld 2-1/2-2 Guardian file system errors 10-2 Guardian process, specifying 3-14 l or lib flag (nld) L or libvol flag (nld) LA or LISTATTRIBUTE flag (noft) Heap size, specifying 3-13 description of 5-22/5-23 HEAP_MAX attribute...
  • Page 324 2-27 object TCP/IP socket 2-18, 2-20 source 5-29/5-30 user procedures See User libraries all or part of 5-10/5-12 libvol or L flag (nld) by optimization level 5-26 Linkfiles with their subprocedures 5-27/5-28 characteristics of process information 5-22/5-23 creating SRLs Linking...
  • Page 325 A-13 Mixed-language programs, linking 2-13, applied to loadfile A-19 2-26 LO or LISTOPTIMIZE flag (noft) description of 5-26 in sample session A-21 Named process 3-14 Native link editor See nld utility nld and noft Manual—520384-003 Index -5...
  • Page 326 3-16 XREFPROC option and 5-50 nlist() function nostdfiles flag (nld) Guardian nld utility and 2-18 nostdlib flag (nld) noverbose flag (nld) 3-10 OSS nld utility and 2-20 NS_extent_size flag (nld)
  • Page 327 3-15 listing 5-22/5-23 description of 3-14 setting 3-13/3-15 PIN, setting 3-13 Position-independent code (PIC) debugging s flag (nld) 3-12 in general Sample nld and noft session A-1/A-27 producing object files of nld and noft Manual—520384-003 Index -7...
  • Page 328 2-20 listing those linked into object file 5-31 ar utility and listing those with fixed-up symbols 5-30 TNS/R native object files missing overview of naming conventions for 2-27 structure of 8-1/8-2 searching for 2-27/2-28 nld and noft Manual—520384-003 Index -8...
  • Page 329 Index Special Characters Tools.h++ library Guardian nld utility and 2-18, 2-20 ! flag (noft) ul flag (nld) 3-16 See User libraries Units of linking User libraries associating with loadfiles associating with program files 3-14 creating 3-16 linking 2-13/2-15 verbose flag (nld)
  • Page 330 Index Special Characters nld and noft Manual—520384-003 Index -10...

This manual is also suitable for:

Noft

Table of Contents