Table of Contents

Advertisement

Quick Links

eld Manual
Abstract
This manual describes how programmers can use eld, the object file linker for TNS/E,
to create loadfiles for execution on HP Integrity NonStop™ NS-series servers.
Product Version
N.A.
Supported Release Version Updates (RVUs)
This publication supports J06.03 and all subsequent J-series RVUs and H06.01 and all
subsequent H-series RVUs, until otherwise indicated by its replacement publications.
Part Number
527255-009
Published
February 2012

Advertisement

Table of Contents
loading

Summary of Contents for HP eld

  • Page 1 Manual Abstract This manual describes how programmers can use eld, the object file linker for TNS/E, to create loadfiles for execution on HP Integrity NonStop™ NS-series servers. Product Version N.A. Supported Release Version Updates (RVUs) This publication supports J06.03 and all subsequent J-series RVUs and H06.01 and all subsequent H-series RVUs, until otherwise indicated by its replacement publications.
  • Page 2 Document History Part Number Product Version Published 527255-004 N.A. July 2005 527255-005 N.A. May 2010 527255-007 N.A. August 2010 527255-008 N.A. May 2011 527255-009 N.A. February 2012...
  • Page 3: Legal Notices

    Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.
  • Page 5: Table Of Contents

    Linker Version Information Native Object Files The Linker Command Stream Obey Files and the Use of Standard Input Example of Use 2. eld Input and Output Host Platforms Target Platforms Filenames and The File Identifier Output Object Files The Creation of Output Object Files...
  • Page 6 Contents 4. Other eld Processing Handling Unresolved References Using User Libraries 3-10 Creating Import Libraries 3-11 Creating an Import Library at the Same Time That a DLL is Created 3-12 Creating Import Libraries From Existing DLLs 3-12 Ignoring Optional Libraries...
  • Page 7 Completion Codes - The Severity Levels of Messages Table A-1. Types of TNS/E Object Files Table A-2. Contents of a Loadfile or Import Library Table A-3. Additional Predefined Symbols Optionally Created By The Linker In Loadfiles A-15 Table A-4. Relocation Types A-18 eld Manual—527255-009...
  • Page 8 Contents eld Manual—527255-009...
  • Page 9: Manual Information

    What’s New in This Manual Manual Information eld Manual Abstract This manual describes how programmers can use eld, the object file linker for TNS/E, to create loadfiles for execution on HP Integrity NonStop™ NS-series servers. Product Version N.A. Supported Release Version Updates (RVUs) This publication supports J06.03 and all subsequent J-series RVUs and H06.01 and all...
  • Page 10 Changes to the 527255-008 manual: ° Updated the information on the attributes for -set and -change option on pages and 4-10. • Added eld Functionality for 64-Bit on page 4-12. • In the table, Set Attributes on page 5-8: °...
  • Page 11 Added consideration for -set libname on page 3-10. • Added consideration for -change libname on page 4-10. • Added the following error messages: • 1229 to 1232 on page 6-38 • 1657, 1659, and 1660 on page 6-124 eld Manual—527255-009...
  • Page 12 What’s New in This Manual Changes to the 527255-005 Manual eld Manual—527255-009 viii...
  • Page 13: About This Manual

    • Example of Use - presents an example of using to link a main program and a DLL . Section 2, eld Input and Output consists of the following topics: • Host Platforms - where the linker may be used.
  • Page 14: Other Eld Processing

    About This Manual • Finding and Reading The Public DLL Registry (ZREG) File - three ways to find Section 4, Other eld Processing consists of the following topics: • Adjusting Loadfiles: The -alf Option - how to repeat the presetting of a loadfile when DLLs change.
  • Page 15: Notation Conventions

    - contains an extension of material covered in a previous section of this manual. • Tools That Work With Object Files - a quick look at which HP NonStop operating system tools use object files. Notation Conventions The specific conventions for...
  • Page 16 [ ] Brackets. Brackets enclose optional syntax items. For example: TERM [\system-name.]$terminal-name INT[ERRUPTS] A group of items enclosed in brackets is a list from which you can choose one item or none. The items in the list can be arranged either vertically, with aligned brackets on eld Manual—527255-009...
  • Page 17 For example: CALL STEPMOM ( process-id ) ; If there is no space between two items, spaces are not permitted. In this example, no spaces are permitted between the period and any other items: $process-name.#su-name eld Manual—527255-009 xiii...
  • Page 18: Notation For Messages

    ENTER RUN CODE ?123 CODE RECEIVED: 123.00 The user must press the Return key after typing the input. Nonitalic text. Nonitalic letters, numbers, and punctuation indicate text that is displayed or returned exactly as shown. For example: Backup Up. eld Manual—527255-009...
  • Page 19: Change Bar Notation

    Change bars are used to indicate substantive differences between this manual and its preceding version. Change bars are vertical rules placed in the right margin of changed portions of text, figures, tables, examples, and so on. Change bars highlight new or revised information. For example: eld Manual—527255-009...
  • Page 20 Common Run-Time Environment (CRE). The CRE has many new message types and some new message type codes for old message types. In the CRE, the message type SYSTEM includes all messages except LOGICAL-CLOSE and LOGICAL-OPEN. eld Manual—527255-009...
  • Page 21: Eld Overview

    (this is called “presetting”). A main program, together with the DLLs that it needs directly or indirectly, is executed on the HP NonStop operating system. A file type of 800 indicates that the code can only execute on the TNS/E HP NonStop operating system platform.
  • Page 22: Example Command Line

    This command specifies linkfiles myobj1 and myobj2 as inputs to the linker, which is named . The linker will combine them into the program named myprog, and will bind references against a DLL found from mydll. For a longer example of using eld, see the Example of Use on page 1-9. eld Functionality can also : •...
  • Page 23: Linker Version Information

    VPROC procedure that is a standard feature of Tandem tools. The PC version of eld contains version information that you can see by looking at the "properties" of the eld.exe file. Native Object Files operates on TNS/E native object files.
  • Page 24 Introduction to eld Native Object Files There are four types of TNS/E object file: Type of Object File Description Linkfile Object files that are produced by a compiler or by the assembler that can be given as input to the linker. It is also possible for the linker to produce a linkfile as output when run with the -r option.
  • Page 25: The Linker Command Stream

    Introduction to eld The Linker Command Stream Some DLLs are called public libraries because they are provided as part of the TNS/E implementation and are found in a special way by the linker and runtime loader. A public library has the same format as any other DLL, and can have an import library to represent it.
  • Page 26 Introduction to eld The Linker Command Stream • Repeatable options are options such that each occurrence of the option is independent, such as providing another element of a list of information or making the linker do a certain activity again.
  • Page 27: Obey Files And The Use Of Standard Input

    Introduction to eld Obey Files and the Use of Standard Input If no tokens are given to the linker in its command stream then the linker writes out messages to the output listing to give a one-line summary of each of the available options and does nothing else.
  • Page 28 Introduction to eld Obey Files and the Use of Standard Input nesting. Recursive nesting is handled by the rule that an -obey option is ignored if its parameter is identical to the parameter of an -obey option that is currently being processed.
  • Page 29: Example Of Use

    This example shows the use of a main program, mainstrc, and a library called mystrngc. Both will be compiled using ccomp, then linked using eld. mystrngc will be loaded as a DLL. Display the Source Code Here is the code for the main program, mainstrc #include <stdio.h>...
  • Page 30 Compile the Program and Library The first step is to compile the programs using ccomp, the native mode TNS/E compiler, on the HP NonStop operating system to create the two object files, mainstro and mystro. We are using a fully-qualified filename to get to the TNS/E compiler, ccomp. On your system, the pathname showing the location of your development tools will be quite different.
  • Page 31 We could also individually reference the items to be exported, as follows: -export StrRev Note the -shared option sent to eld. This creates the DLL. The -dll option can be used to do the same task, and is probably more descriptive of what we want to achieve.
  • Page 32 ZCREDLL) and C_INT_INIT_COMPLETE_ , C_INT_INIT_START_ , and exit (which are defined in ZCRTLDLL). Note that each DLL must use an individual -lib option to be linked with eld. The command syntax does not allow for a single -lib option followed by a list of DLLs, for example: -lib zcredll, zcrtdll, mystrdll is not valid syntax.
  • Page 33 60> run $data01.toolsy02.eld $data01.toolsy02.ccplmain mainstro -lib mystrdll& 60> & -lib zcredll -lib zcrtldll -o revstr -L $users.patrick -L $data01.toolsy02 -verbose eld - TNS/E Native Mode Linker - T0608H01 - 26OCT04 Copyright 2004 Hewlett-Packard Company eld command line: \speedy.$data01.toolsy02.eld $data01.toolsy02.ccplmain mainstro -lib mystrdll -lib zcredll -lib zcrtldll -o revstr -L $users.patrick -L...
  • Page 34 Introduction to eld Example of Use eld Manual—527255-009 1-14...
  • Page 35: Host Platforms

    The TNS/E linker ( ) runs on several platforms, as follows. • The TNS/E linker runs on the TNS/E version of the HP NonStop operating system, with both the Guardian and OSS personalities. • The TNS/E linker runs on TNS/R versions of the HP NonStop operating system.
  • Page 36: Target Platforms

    The loadfiles created by the TNS/E linker can only be loaded and run on the TNS/E versions of the HP NonStop operating system. A process can be run in either one of two environments “Guardian” and “OSS”, dependent on it’s process ID.
  • Page 37 Input and Output Filenames and The File Identifier Sometimes the linker is required to put a filename back together from its two pieces. The linker concatenates the two pieces using a period on Guardian, a slash on OSS, or a backslash on the PC.
  • Page 38: Output Object Files

    Input and Output Output Object Files Output Object Files The linker can create a new object file or update an existing one in certain ways. When the linker is creating a new object file, by default it creates a loadfile, but the -r option instead tells the linker to create a linkfile.
  • Page 39: The Creation Of Output Object Files

    Input and Output The Creation of Output Object Files The -ul option is synonymous with -shared plus -export_all, that is, to create a DLL and export all its symbols. See Using User Libraries on page 3-10 for an explanation of how the linker uses user libraries.
  • Page 40: Creating Segments Of The Output Loadfile

    Input and Output Creating Segments of the Output Loadfile the name of the work file is unchanged and the linker puts out a warning message. Similarly, if the -temp_o option is not specified then the name of the work file is unchanged.
  • Page 41 Otherwise, the linker sets the bit that corresponds to which parameter was given to the -instance_data option. The three different values set in the e_flags field in these cases tell the HP NonStop operating system how to protect the data variable segment. When the -make_implicit_lib option is used, -instance_data...
  • Page 42: Using A Dll Registry

    Input and Output Using a DLL Registry Note that this is a DLL registry under the user’s control, not the “public DLL registry” covered in Finding and Reading The Public DLL Registry (ZREG) File on page 3-23. If the -t option is not specified, and no DLL registry is specified, the DLL is placed at the address 0x78000000.
  • Page 43 Input and Output Using a DLL Registry It is possible to use the DLL registry with a DLL that has two data segments, or that has a gateway. In such cases, when this discussion of the DLL registry refers to the “data segment”, it means a fictitious segment that is the concatenation of the data...
  • Page 44 Input and Output Using a DLL Registry • a <hexadecimal number> to tell the starting address of the DLL • a <hexadecimal number> to tell the reserved size of the DLL Together, the starting address and the reserved size tell the total range of addresses that this DLL, or possibly a larger version of it in the future, occupies or is intended to occupy.
  • Page 45 Input and Output Using a DLL Registry described below (after, in effect, deleting the old entry for the DLL from the registry), and updates the registry accordingly. The -grow_limit option may only be specified if -update_registry is used. If...
  • Page 46: Input Object Files

    Input and Output Input Object Files whether entries already in the registry overlap. Whenever a DLL registry is updated by the linker and the DLL had previously been mentioned in the file, the old entry is replaced by the new one so that the DLL is not mentioned more than once in the registry.
  • Page 47 Input and Output Input Object Files Presetting Loadfiles on page 3-5 for an explanation of how the linker also finds indirect DLLs by using the .liblist sections of other DLLs that it has already found, and for how the linker finds the import library that represents the implicit DLLs.
  • Page 48 Input and Output Input Object Files or subvolume, as is normally done for the corresponding host platform. reports an error if the file does not exist, or if the linker cannot open it for reading. In the case that the name was specified directly in the command stream, the file can be a linkfile, archive, or DLL.
  • Page 49 Input and Output Input Object Files However, to simplify build processes, the user may find it convenient for these names to be the same. The .liblist section does not contain an entry corresponding to the user library, does not contain an entry for the import library that represents the implicit libraries, and does not contain entries for DLLs that the linker finds indirectly.
  • Page 50: Using Archives

    The -u option is used to specify the name of a symbol for which eld should look in archives in the command stream, if eld had not already seen a definition of this symbol before the archive was encountered.
  • Page 51 Input and Output Using Archives or /usr/local/lib64 then, the same -l option in the linker verifies the desired one based on the type of link created. Otherwise, the user can decide the naming convention for the archives and formulate the linker to find the right version.
  • Page 52 The linker does not make use of any environment variables other than COMP_ROOT. When eld is creating a new object file X from a set of linkfiles, or processing a loadfile X with the -alf option, it is desired that DLL’s of the appropriate data model match the data model of X.
  • Page 53 -l option. This rule is not applicable for instances where the linker is searching for an indirect DLL. While searching for an indirect DLL, eld searches files with the name specified in the .liblist section.
  • Page 54 Input and Output Using Archives eld Manual—527255-009 2-20...
  • Page 55: Overview

    These addressing problems are solved by relocation, the process of assigning load addresses to the various parts of the program, adjusting the code and data in the program to reflect the assigned addresses. eld Manual—527255-009...
  • Page 56 In the case of the HP NonStop operating system compilers; in TNS/R the addresses started at zero and incremented for each section, in TNS/E all section addresses start at zero, they don’t really contain addresses but rather contain section offsets.
  • Page 57 • DLLs specified in the liblist. This is the the HP NonStop operating system default and gives you the most control on how your undefined references are resolved at runtime. -b globalized means “globalized”. The searchlist for the loadfile at link time is the same as that of “localized”...
  • Page 58 This refers to the situation where there can be procedure call references that are purposely not resolved at link time, or even at load time. Instead, the first time the procedure is called, the rld runtime support resolves its address. HP NonStop systems do not support this capability.
  • Page 59: Presetting Loadfiles

    DLLs in this case and do the usual checks on them.) Finally, if the -make_implicit_lib option has not been specified, the linker tries to add the import library that represents the set of implicit libraries to the end of its search list. eld Manual—527255-009...
  • Page 60 Or, if the relocation type says that the address of the official function descriptor is required, the linker would require that the target symbol be a procedure and then would fill in the address of the official function descriptor rather than the address of the procedure itself. eld Manual—527255-009...
  • Page 61: To Preset Or Not To Preset, And Creation Of The Lic

    .liblist section, then has entries for each of the additional elements the linker found by pursuing the transitive closure of .liblist sections, and then has an entry for the import library that represents eld Manual—527255-009...
  • Page 62: Handling Unresolved References

    -warning_unresolved as a synonym for -unres_symbols warn. When is building a new loadfile and a public DLL registry has not been found the default for the -unres_symbols option is warn. On the other hand, if a public DLL eld Manual—527255-009...
  • Page 63 The reason that unresolved references to code get more lenient treatment than unresolved references to data is that it is possible to handle them in a more predictable way at runtime. Specifically, the HP NonStop operating system provides an implementation of UNRESOLVED_PROCEDURE_CALLED_ that generates a SIGILL signal that can be caught but not deferred.
  • Page 64: Using User Libraries

    .tandem_info section of the program that it is creating. The linker also converts the name to upper case, if not done already. On Guardian APIs, single quotes do not work because they are not recognized by the HP Tandem Advanced Command Language (TACL); therefore, it is not important to specify them.
  • Page 65: Creating Import Libraries

    The Creation of Output Object Files on page 2-5, except that the name of the work file is ZLDAInnn rather than ZLDAFnnn, the name of the intermediate file, if desired, is specified by the -temp_i option rather than the -temp_o option, and eld Manual—527255-009 3-11...
  • Page 66: Creating An Import Library At The Same Time That A Dll Is Created

    DLLs, unless all the copies of the symbol have the STO_MULTIPLE_DEF_OK bit set. It is also an error if any of the implicit DLL's is not preset. If any of the implicit DLL's is preset, but eld Manual—527255-009 3-12...
  • Page 67 -no_verbose -NS_extent_size -NS_max_extents -obey -set incomplete on -stdin -temp_i -verbose -vslisting -warn The following are the options allowed when creating the import library that represents the implicit DLL's: -check_registry -must_use_iname -must_use_rname -no_banner -no_verbose -NS_extent_size -NS_max_extents -obey -stdin eld Manual—527255-009 3-13...
  • Page 68: Ignoring Optional Libraries

    -no_optional_lib. If an optional DLL turns out to be unnecessary, then the linker will assume it is okay to ignore that DLL, and it will not be listed in the .liblist section. If is presetting, and therefore creating a LIC, then the LIC is created as if eld Manual—527255-009 3-14...
  • Page 69 A special case is when finds a DLL on the command line that is the same file as what was specified for the user library. In such a case, an entry is still made in the eld Manual—527255-009 3-15...
  • Page 70: Merging Symbols Found In Input Linkfiles

    Also, if the -instance_data option is specified with a parameter value of data2protected or data2hidden then reports an error if you have any globalized symbols. Note. The data2protected parameter is supported on systems running J06.09 or earlier J-series RVUs and H06.20 or earlier H-series RVUs. eld Manual—527255-009 3-16...
  • Page 71: Accepting Multiply-Defined Symbols

    C or C++ file unless the STO_MULTIPLE_DEF_OK bit is set in all the corresponding ELF symbol table entries. HP’s definitions of C and C++ say that it is an error for users to create such situations, but the STO_MULTIPLE_DEF_OK bit allows the compiler to do it.
  • Page 72: Rules For Procedures

    .sdata sections) and others don’t (i.e., in the .bss or .sbss sections). However, eld reports an error if the initial values are not the same in all the copies of the data that are initialized. Data in the .bss and .sbss sections is considered to have the initial value zero.
  • Page 73: Using The -Cross_Dll_Cleanup Option

    The -cross_dll_cleanup option is used to reduce the total size of a program and the private DLLs that are used by a process. This option affects the behavior of the eld program with regard to symbols eld finds in its input linkfiles that have all the following properties: •...
  • Page 74: Specifying Which Symbols To Export, And Creating The Export Digest

    When the -cross_dll_cleanup option is specified, eld also verifies if a symbol of the same name is found in a DLL. If it finds a same name, eld deems the last copy of the procedure as "unused", and its code can be cleaned up. The references to the symbol are therefore resolved to the copy of the symbol in the DLL.
  • Page 75: Processing Of Code And Data Sections

    .rdata, and it contains no relocation sites, the linker changes the name of that input section to .rconst, and combines all sections named .rconst into a section of that name in its output file accordingly. eld Manual—527255-009 3-21...
  • Page 76: Public Libraries And Dlls

    They are mostly supplied by HP, although you and third party software providers can also provide DLLs to be added to the public DLLs. You use DSM/SCM to add your DLLs to the public libraries.
  • Page 77: The Public Library Registry

    The public-DLL registry file (ZREG) serves as an interface between DSM/SCM (that you use), the public-library installation tool (that HP uses), the preloader and the linker. DSM/SCM creates an initial registry file, listing all the public DLLs by name. This is an edit file (filecode 101).
  • Page 78 DLL registry be written in lower case, and that when corresponding files exist on a platform where case is significant those files are given lower case filenames, and furthermore that the DLL names found within such files are also written in lower case. eld Manual—527255-009 3-24...
  • Page 79: Other Eld Processing

    - how to repeat the presetting of a loadfile when DLLs change. The -set and -change Options - how to set various options within the loadfile. eld Functionality for 64-Bit - how the linker performs consistency checks. Renaming Symbols - how the linker treats each input file.
  • Page 80 Other eld Processing Adjusting Loadfiles: The -alf Option -alf recreates the file by the usual linker mechanisms. Certain relocation sites within a file must be set up by the linker, whether the file is preset or not, and must never become inconsistent thereafter. That is because rebinding makes use of the existing values at those sites.
  • Page 81: Additional Rules About -Alf

    Other eld Processing Additional rules about -alf said that the DLL was preset, and that bit isn’t really of any importance in an import library. The following are some things that cannot be specified with this option because they are unconditionally inherited from the existing version of the loadfile: •...
  • Page 82 -alf is used in the same environment as where the program will run, which means not only that it is also the HP NonStop operating system platform, but that it is the proper version of the operating system, etc.
  • Page 83 Other eld Processing Additional rules about -alf Searches performed by the -alf option must always find DLLs rather than archives, as if -b dllsonly had been specified. It is not possible to specify any -b options with -alf. The -alf option supports the -allow_missing_libs option. If a DLL that is listed in the .liblist section cannot be found, the .liblist entry is left alone.
  • Page 84 Other eld Processing Additional rules about -alf by looking at the dynamic symbol table of the existing loadfile rather than the ELF symbol table of an input linkfile. The following parts of the existing object file potentially need to change when the -alf option is used without rebasing: •...
  • Page 85 Other eld Processing Additional rules about -alf • GP-relative addressing from the gateways to the text segment, specifically, when the gateway contains the 64-bit GP-relative address of the procedure for which it is the gateway. The way that the -alf option updates all the items listed above depends on the type of item: •...
  • Page 86: The -Set And -Change Options

    Table 4-1. The -set and -change Options Attribute Attribute Meaning For this attribute, allowed values are: ilp32, data_model lp64, and neutral. eld Functionality for 64-Bit page 4-12. Specifies the target platform personality. See systype Target Platforms on page 2-2. Specifies the user library name.
  • Page 87 Processing of Floating Point Versions floattype and Data Models on page 4-16. float_lib_overrule eld Functionality for 64-Bit CPlusPlusDialect page 4-12. This attribute has a numerical value. For pfssize compatibility with the past, the linker accepts this attribute and checks its syntax, but otherwise this attribute is ignored.
  • Page 88 Other eld Processing The -set and -change Options are considered inconsistent. If -set process_subtype is specified then the value specified is placed into the output file and if any of the input linkfiles had a nonzero process subtype different from that then a warning message is produced. On the other...
  • Page 89 Other eld Processing The -set and -change Options why eld also allows a single double-quote character (") to be given with -change libname, and interprets it as an empty string. Note that this is only allowed with -change libname, not with -set libname.
  • Page 90: Eld Functionality For 64-Bit

    Functionality for 64-Bit eld Functionality for 64-Bit Object files can be 32-bit, 64-bit, or neutral. When eld is creating a new object file out of a set of linkfiles, the desired data model for the output file is specified...
  • Page 91: Renaming Symbols

    Other eld Processing Renaming Symbols input files contained C++. An informational message is generated if the input files contained C++. When is creating a loadfile it also performs C++ dialect checking against all the DLL's that it sees as part of that load. The check is that no DLL has the opposite C++ dialect from that seen in an input linkfile.
  • Page 92: Creating Linker-Defined Symbols

    Other eld Processing Creating Linker-Defined Symbols Creating Linker-Defined Symbols Predefined Symbols on page A-14 lists the symbols that are automatically defined by the linker when it creates a loadfile, and what they mean. The linker resolves references to these symbols by using the value of the symbol as if it was an address.
  • Page 93: Modifying The Data Sections That Contain Stack Unwinding Information

    Other eld Processing Modifying the Data Sections that Contain Stack Unwinding Information there are multiple -strip options, the temporary filename specified by -temp_o applies to all of them. The ELF symbol table can never be stripped from a linkfile, and the .dynsym and .dynsym.gblzd sections can never be stripped from a loadfile, because they are...
  • Page 94: Processing Of Floating Point Versions And Data Models

    If the linker is building a program, or updating it with -alf, the intention is to be consistent with the checks that the HP NonStop operating system will do. So, there is no checking against DLLs if the linker has been told to turn on the FLOAT_LIB_OVERRULE bit in the program.
  • Page 95: Specification Of The Main Entry Point

    Other eld Processing Specification of the Main Entry Point Checks are only performed against DLLs that the linker actually saw. For example, the linker is not required to search for indirect DLLs if it is not presetting and not checking for unresolved symbols, so in that case it is not required to perform floating point consistency checking against such indirect DLLs.
  • Page 96: Specifying Runtime Search Path Information For Dlls

    Other eld Processing Specifying Runtime Search Path Information for DLLs When building a program in C or C++, and using the standard runtime library support provided by these compilers, the usual method is to place in the linker command stream an object file that is also supplied with these compilers and contains a procedure that has the MAIN attribute.
  • Page 97: Merging Source Rtdus

    Other eld Processing Merging Source RTDUs The DT_RPATH and DT_TANDEM_RPATH_FIRST entries in the .dynamic section are also used by -alf to decide where to look, although in this case they can be overridden by giving the -rld_L or -rld_first_Loptions with -alf.
  • Page 98 Other eld Processing Merging Source RTDUs eld Manual—527255-009 4-20...
  • Page 99: Summary Of Linker Options

    How the Linker Finds Its Input Files and Creates the .liblist Section page 2-12. -b { globalized | localized | semi_globalized | symbolic } These options affect how references are resolved across loadfiles. Overview on page 3-1. -call_shared Create a program. See Output Object Files on page 2-4. eld Manual—527255-009...
  • Page 100 -unres_symbols error. -export synonym for -exported_symbol. -export_all Export all symbols that one might normally want to have exported without naming them explicitly. See Specifying Which Symbols to Export, and Creating the Export Digest on page 3-20. eld Manual—527255-009...
  • Page 101 Build a complete or incomplete import library with the specified filename in addition to creating a new DLL, and strip the DWARF symbol table from the import library. Updating Or Stripping DWARF Symbol Table Information on page 4-14. eld Manual—527255-009...
  • Page 102 4-18. -local_libname <filename> Use the specified filename as the name of the user library that can be used to resolve references in this program at link time. Using User Libraries on page 3-10. synonym for -map. eld Manual—527255-009...
  • Page 103 Only include archive members in the link if they satisfy needed references. See Using Archives on page 2-16. -no_optional_lib Do not consider later DLLs in the command stream to be optional. See Ignoring Optional Libraries on page 3-14. eld Manual—527255-009...
  • Page 104 Changes the extent size from the default (32 pages) to the specified size. extent-size is an even number in the range 2 to 65534, inclusive. A page has 2048 bytes. eld uses extent-size for both primary and secondary extents. eld Manual—527255-009...
  • Page 105 Change the name of a symbol while creating a new file. See Renaming Symbols on page 4-13. -rld_first_L <path> The string specified by <path> should be a list of directories and/or subvolumes separated by colons. At runtime, the specified directories and/or subvolumes are eld Manual—527255-009...
  • Page 106 Table 5-1. Set Attributes See Section for Attribute Name Allowable Values Default Details CPPDialect | neutral | cppneutral These two names eld Functionality for and values are 64-Bit on page 4-12 CPlusPlusDialect synonymous. Use one only. The value comes from the input linkfiles...
  • Page 107 | off The -set and - change Options page 4-8 pfs | pfssize <number> Option is a no-op. The -set and - change Options page 4-8 process_subtype | <number> The -set and - change Options subtype page 4-8 eld Manual—527255-009...
  • Page 108 Use the standard input file as an obey file. See Obey Files and the Use of Standard Input on page 1-7. -strip <filename> Remove the DWARF symbol table from an existing loadfile or import library. Updating Or Stripping DWARF Symbol Table Information on page 4-14. eld Manual—527255-009 5-10...
  • Page 109 See Using a DLL Registry page 2-8. -verbose Show all messages. See Output Listings and Error Handling on page 6-1. -warn Show all error and warning messages. See Output Listings and Error Handling page 6-1. eld Manual—527255-009 5-11...
  • Page 110 Creating Import Libraries on page 3-11. -y <symbol name> Provide information about how this symbol is mentioned in the ELF symbol tables of the linker’s input files. See Merging Symbols Found in Input Linkfiles on page 3-16. eld Manual—527255-009 5-12...
  • Page 111: Output Listings And Error Handling

    0 or 1, and considering 1 to be an error, and not caring about warnings. So, on the PC and OSS, eld calls exit with a parameter value of 0 if the highest severity was 0 or 1, and with a parameter value of 1 if the highest severity level was 2 or 3.
  • Page 112 Guardian if the standard output file is a process, and that process is killed while eld is running. In that case, eld still goes on with what it was doing, producing the same return code as described above, to tell if the output file could be correctly created.
  • Page 113 The purpose of the -no_banner option is for c89 or c99 to use it at least in cases where eld is in a directory that has a space in its name. In such a case, c89 or c99 does not need to set up argv [0] correctly for eld. Instead, c89 or c99 itself may print out the correct name of eld and use the -no_banner option to stop eld from printing out the incorrect string that c89 or c99 passed to it.
  • Page 114: Error Messages

    C++ compiler. If a name cannot be successfully demangled, eld writes out the name as it found it. If a name can be demangled, eld writes out both the original and the demangled form.
  • Page 115 But, you may prefer that your link be clean. In that case, look at the names of the symbols that eld said it couldn’t find, and see if they exist somewhere. They may be in DLLs, for example, that eld wasn’t using, so you may need to relink your program or DLL again, supplying the names of those DLLs.
  • Page 116 , -shared, or -ul options -dll that tell eld to create a DLL, or the -r option that tells eld to create another object file that can be used again as eld input. If you intended to create one of these other types of object files, rather than a program, then don’t give the -libname or -set...
  • Page 117 DLL that you are creating, and you also gave the -r option, to tell eld to create an object file that can be used again as linker input, rather than a program or DLL.
  • Page 118 Output Listings and Error Handling Error Messages link, eld looked at some other DLL whose addresses didn’t fit into 32 bits. In either case, the program or DLL that you are trying to build contains 32-bit pointers that need to be initialized with the addresses of symbols, in the file being built or in some other DLL, whose addresses can’t be represented in 32 bits.
  • Page 119 <filename> has highpin off. Cause. You are building a program or DLL that has the HIGHPIN attribute set ON, which is the default, but during the link one or more of the DLLs that eld looked at had the HIGHPIN attribute set OFF.
  • Page 120 1021 Bad input file: the symbol named _MCB is defined in <filename>, and that is not allowed. Cause. The symbol _MCB is a special symbol that eld creates within a program if the program makes a reference to it. User code is only allowed to make external references to it, not to define it, but there was a definition of this symbol in your code.
  • Page 121 (ordinary) DLL. The other filename you put on the command line should be the DLL to be represented. It wasn’t a DLL, so that’s an error. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If your intention is to create an import library to represent a single (ordinary) DLL, then the other filename on the command line should be that DLL.
  • Page 122 -make_import_lib option. 1043 Cannot open output workfile <filename>. Cause. You are trying to create an import library. eld tries to create a workfile in the same location (OSS directory, Guardian subvolume, or PC folder) as the place where you specified that the import library should be created.
  • Page 123 1047 Error attempting to delete file <filename>. Cause. This message comes out after message 1046 (see above). It means that, after being unable to set the file code of the file, and then trying to delete the file, eld was also unable to delete the file.
  • Page 124 1082 Cannot find <name>. Cause. You specified the -l option, to tell eld to search for a DLL or archive based on the string given as the parameter to the -l option, and eld could not find that DLL or archive, and you also specified the -allow_missing_libs option, to say that it was not an error if a DLL could not be found.
  • Page 125 DLL or archive anyway. Or, you may be specifying everything as you should, to tell eld how to find the DLL or archive in the location you expect it to be, but the DLL or archive is not there, or you don’t have permission to read it.
  • Page 126 Cause. You specified the -l option, to tell eld to search for a DLL or archive based on the string given as the parameter to the -l option, and eld was able to find and open a file, but the file was a linkfile, such as an object file produced from a compilation, not a DLL or archive.
  • Page 127: Archives A

    -b dllsonly option was in effect at this point on the command line, which says that it is an error if eld finds an archive as opposed to a DLL.
  • Page 128 Or, perhaps the archive has a mixture of different types of object files in it, and you used the -all option, which tells eld to try to use all the object files in the archive. In that case, you should build a different archive that only contains TNS/E object files.
  • Page 129 Recovery. If your program contains C or C++ code then a certain object file is supposed to be included in the link, and if you ask the compiler to invoke eld for you then the compiler will supply that file automatically. If you invoke eld yourself, you need to specify the same object file that the compiler would.
  • Page 130 1133 Procedure <symbol name> with the 'main' attribute was overridden by an -e option for <symbol name>. Effect. Warning (eld produces an output file, but it might not be what you intended). Recovery. If your program contains C, C++, or Cobol code, you shouldn’t be using the -e option at all.
  • Page 131 File <filename> specifies 'ieee'. Cause. You are building a DLL, and during this link eld is also looking at various other DLLs, and among those other DLLs eld sees that at least one says that it requires the “Tandem” version of floating point at runtime, while another says that it requires the “IEEE”...
  • Page 132 Cause. You are building a DLL, and it says that it needs the “Tandem” type of floating point at runtime, but during this link eld is also looking at various other DLLs, and among those other DLLs eld sees that at least one says that it requires the “IEEE”...
  • Page 133 Cause. You are building a program, and it either says that it needs the “Tandem” type of floating point at runtime, or that it is “neutral”, but during this link eld is also looking at various other DLLs, and among those other DLLs eld sees that at least one says that it requires the “IEEE”...
  • Page 134 1152 The loadfile being built has C++ dialect v2; DLL <filename> has C++ dialect v3. Cause. The input files use the v2 dialect of C++, and during the link eld saw a DLL that was using the v3 dialect of C++.
  • Page 135 1153 The loadfile being built has C++ dialect v3; DLL <filename> has C++ dialect v2. Cause. The input files use the v3 dialect of C++, and during the link eld saw a DLL that was using the v2 dialect of C++.
  • Page 136 Recovery. If you really want to use the -temp_* option, there is no need to specify a fully qualified name. You can just specify a simple name, and then eld will put it in the right place. But you probably also have no need for the -temp_* option at all, so you can just omit it.
  • Page 137 DLLs after it loads the program you are building, and you also used the -r option, to tell eld to build another object file that can be used as linker input, rather than a program. Effect. Error (The linker cannot do what was requested of it and will eventually stop, but may continue for the purpose of detecting additional errors before stopping).
  • Page 138 DLL, but not a program.
  • Page 139 Recovery. Did you compile code with some other compiler, and manage to get it to go through eld to create this DLL? We don’t recommend doing that. In any case, no matter how you created this DLL, you cannot rebase the two segments by different amounts with the -alf option.
  • Page 140 Recovery. If your intention is to create a program or DLL, then don’t specify the option. If your intention is to use the option to create another object file that can be used as eld input, then don’t specify the -set runnamed option. 1188 The 'saveabend' attribute is not allowed with the -r option.
  • Page 141 Cause. You have specified the -import_lib and the -import_lib_stripped options. The - import_lib option tells eld to make an import library for a DLL, at the same time eld is building that DLL, and not to strip the DWARF symbols from the import library. The - import_lib_stripped option also says to make an import library, but to strip the DWARF symbols.
  • Page 142 DLL, and you also used the option, to tell eld to build another object file that can be used as linker input rather than a program or DLL. Effect. Error (The linker cannot do what was requested of it and will eventually stop, but may continue for the purpose of detecting additional errors before stopping).
  • Page 143 Cause. You used the -ansistreams option, which affects how the program that you are building will do its I/O, but the file that you have told eld to create is not a program. Effect. Fatal error (eld immediately stops without creating an output file).
  • Page 144 -b semiglobalized option, to build a globalized or semiglobalized DLL, and you also specified the -make_implicit_lib option, to tell eld to make one of the implicit DLLs that constitute system library. That’s not allowed, because the implicit DLLs are never created as globlaized or semiglobalized DLLs.
  • Page 145 -verbose option. A symbol in a DLL also needs to be exported from that DLL for eld to find it. A symbol might also be a member of an archive, but the archive needs to come later on the command line than the reference to the symbol to guarantee that eld finds the symbol in the archive.
  • Page 146 DLLs that it used if you supply the -verbose option. A symbol in a DLL also needs to be exported from that DLL for eld to find it. A symbol might also be a member of an archive, but the archive needs to come later on the command line than the reference to the symbol to guarantee that eld finds the symbol in the archive.
  • Page 147 -unres_symbols warn option was also specified. Effect. Warning (eld produces an output file, but it might not be what you intended). Recovery. This issue involves the procedure for building and installing the NSK operating system, which is beyond the scope of this document.
  • Page 148 1229 Definition of <symbol name> from file <filename> is overriding common of the same name. Cause. eld encountered global symbols of the same name, of which one is common data and the other is a definition. The definition overrides the common data.
  • Page 149 1233 <file name>: common of <symbol name> overridden by larger common. Cause. eld encountered global symbols of the same name, <symbol name>, both of which are common data items and are of different size. The symbol of the larger size is retained, overriding the smaller common data item.
  • Page 150 DLLs that it used if you supply the -verbose option. A symbol in a DLL also needs to be exported from that DLL for eld to find it. A symbol might also be a member of an archive, but the archive needs to come later on the command line than the reference to the symbol to guarantee that eld finds the symbol in the archive.
  • Page 151 -verbose option. A symbol in a DLL also needs to be exported from that DLL for eld to find it. A symbol might also be a member of an archive, but the archive needs to come later on the command line than the reference to the symbol to guarantee that eld finds the symbol in the archive.
  • Page 152 Cause. You used the -obey option, and eld was reading that obey file, and eld found a quotation mark (double quote character) within that obey file, either at the beginning of a line or after white space in the middle of a line. eld assumes that a token begins eld Manual—527255-009...
  • Page 153 In the Guardian case this would be allowed, where eld would treat the parameter as a “Guardian DEFINE”, and expand it to a filename But, you are running eld on the PC or on OSS, and on these platforms this type of parameter is not allowed.
  • Page 154 Cause. You specified a string that began with an equal sign on the command line, and you are running the Guardian version of eld. eld treated the string as a “Guardian DEFINE”, and succeeded in expanding it to a filename. The message shows you how it was expanded.
  • Page 155 Cause. You used the -libname, -set libname, or -change libname option to specify the name of a user library. A user library name must always be a Guardian filename specified in the form $a.b.c. eld has complained because at least one of “a”, “b”, and “c” was longer than 8 characters.
  • Page 156 “neutral”, but that really means “Tandem” at runtime. Effect. Warning (eld produces an output file, but it might not be what you intended). Recovery. If some DLL that is used at runtime says that it requires the “IEEE” type of floating point, your program will not be allowed to run (unless you also specify “-set...
  • Page 157 “tandem_float”, etc.), to tell the value for this attribute. However, the next token on the command line was something other than these possibilities. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If you want to specify this option, fix the syntax.
  • Page 158 Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If you want to specify this option, decide which value you want to specify, and only specify that value.
  • Page 159 Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If you want to specify this option, decide which value you want to specify, and only specify that value.
  • Page 160 (except for lower case versus upper case). Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If you want to specify this option, decide what name you want to specify, and only specify that name.
  • Page 161 However, the next token on the command line was something other than these possibilities. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If you want to specify this option, fix the syntax. 1315 Conflicting values given for 'systype'.
  • Page 162 Cause. You specified the -alf option more than once on the command line. That is not allowed. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If you want to run multiple -alf options, do each one in a separate eld command. 1320 Illegal duplicate definition of the data item <symbol name>...
  • Page 163 Output Listings and Error Handling Error Messages but eld didn’t recognize the parameter specified. (The possibilities are “localized”, “globalized”, “semi_globalized”, “symbolic”, “static”, “dynamic”, and “dllsonly”.) Effect. Fatal error (eld immediately stops without creating an output file). Recovery. Fix the spelling of the parameter. Case doesn’t matter, but other than that it must be exactly as shown in the manual.
  • Page 164 You specified the -local_libname option, to tell eld where the user library currently exists, for eld to fix up refernces to it during the link. It is also necessary for eld to place a Guardian file name for the user library within the program being built, to tell where the user library will exist in the Guardian namespace at runtime.
  • Page 165 Recovery. If your intention is to build a new object file out of existing files, to be able to use this new object file as eld input, then don’t specify the name of a program on the command line. You can’t add more stuff to an existing program, you can only rebuild a different program from scratch.
  • Page 166 Output Listings and Error Handling Error Messages in nld. If you say “-elf” to eld, eld will believe that you are saying that “lf” is the name of the main entry point. So, don’t do that. 1331 <attribute name> has been changed to <attribute value>...
  • Page 167 Cause. You specified both the -check_registry and -update_registry options. The - check _registry option tells eld that it must assign a DLL an address as specified in a private DLL registry, and the registry is unchanged. The -update_registry option tells eld to use information in the registry to decide what address to use for the DLL, and then update the registry accordingly.
  • Page 168 The problem is not that the file was in use by another link, because eld would give a different message about that. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. Check that you spelled the name correctly and that you do have permission to read it.
  • Page 169 So, this set of conditions is inconsistent. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If your intention is to create a zimpimp file, then don’t use the option that was mentioned in the message.
  • Page 170 Recovery. The -local_libname option tells the name of a user library that eld will use during this link to fix up references from the program that it is creating. There can only be one user library.
  • Page 171 DLLs after they have all been created. So, when you are making an implicit DLL, eld doesn’t try to find the zimpimp file on its own. However, one of the files that eld found, when it was looking for normal DLLs, turned out to be a zimpimp file. That’s the error.
  • Page 172 Cause. You specified the -check_registry or -update_registry option, to tell eld to use a private DLL registry. Such a file did exist, and the first thing that eld tried to do with it was to open the file for reading. However, eld could not do that, because the file was being used exclusively by another process, perhaps by another link that was using the -update_registry option.
  • Page 173 Cause. You have specified the -instance_data data1constant option, which means that you want eld to consider it an error if the program or DLL that you are building contains any writeable data. And, indeed, the input file mentioned in the message contains writeable data.
  • Page 174 Cause. While reading the private DLL registry that was specified for this link in the - check_registry or -update_registry option, eld ran off the end of the file when it was expecting that the next thing in the file would be a number. Presumably, the format of the file is bad because it was incorrectly edited by hand.
  • Page 175 1363 The same symbol, <symbol name>, was specified twice in the same -rename option. Cause. You gave the -rename option, to tell eld how it should change the definition of a symbol of one name into the definition of a symbol of another name, but you specified the same symbol name twice.
  • Page 176 1372 Cannot create -o file <filename>. Cause. You are trying to create an object file. eld first creates it in a temporary location, deletes any file that previously existed with the name specified for the object file, and then renames the temporary file to the final location. That process failed. In such a situation, eld would usually leave the file in another location and tell you about it.
  • Page 177 Cause. You gave the -unres_symbols option on the command line. The next token on the command line must be one of the possible keyword parameters that you can give with this option, but eld didn’t recognize the parameter specified. (The possibilities are “error”, “warn”, and “ignore”.) Effect.
  • Page 178 -dll eld that you want to make a DLL, but you specified the -make_implicit_lib option, which tells eld more specifically what kind of DLL to make, namely, one of the implicit DLLs that constitute system library. Effect. Fatal error (eld immediately stops without creating an output file).
  • Page 179 -make_import_lib option, and the one mentioned in the error message is not one of them. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If you are not trying to create an import library to represent one or more other DLLs that already exist, don’t specify the -make_import_lib option.
  • Page 180 “first” one it sees, which you can control by changing the order of object files on the command line, assuming the different procedures with the MAIN attribute are in different object files.
  • Page 181 GP-relative data needs to fit within it. eld chooses the value for the GP register so that it can reach all the data in this region, if possible. However, your program or DLL also included a symbol named eld Manual—527255-009...
  • Page 182 Output Listings and Error Handling Error Messages __gp. That tells eld to lay out this symbol in the usual way, like any other data item, but then use its address as the value to put in the GP register. After doing this, all the GP-relative data could not be reached from that address.
  • Page 183 “.srdata”, “.rodata”, “.srodata”, and “.rconst”. Any other data sections are considered special by eld, and if a data item is in such a section then all copies of that data item must be in a section of that same name. Similarly, different copies of a data item can’t disagree about whether they are “writeable”...
  • Page 184 1496 Specified file <filename> is not a TNS/E object file. Cause. A filename was specified for eld to read, and the file was supposed to be a valid TNS/E object file of some sort, but it wasn’t. In particular, this message is saying that the file was not the 64-bit ELF format, and more specifically not the format used for Intel’s 64-bit IPF implementation, which is the format used by TNS/E object files.
  • Page 185 64K bytes (or, 128K bytes if you are doing this to an implicit DLL). Effect. Warning (eld produces an output file, but it might not be what you intended). Recovery. The starting address of the code segment of a DLL is required to have the indicated alignment.
  • Page 186 Output Listings and Error Handling Error Messages would indicate a bug with eld when it created that program or DLL, and should be reported to HP. It is also possible that the relocation table entry indicates an address in the code segment, but you did not specify the -update_code option, to tell the -alf option that it was okay to update such places.
  • Page 187 DLL before obtaining the lp64 linkfile and thereafter started following the lp64 rule. If you are performing a lp64 build and want to ensure that eld is consistent throughout the link then, enter the –set data_model lp64 option in the command line.
  • Page 188 -alf option, so it is wrong to use these options. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If your intention is to repeat the fixups on a program, do not specify the -t or -d option.
  • Page 189 Recovery. Few people will ever need to use this option. But, if you have a template file that you wish to give to eld with this option, just specify the option once, giving the name of that template file.
  • Page 190 DLL or program that you are building, and you also used the -r option, to specify eld to build another object file that can be used as a linker input, rather than a program or a DLL.
  • Page 191 -alf option, to tell eld to move a DLL to different addresses, and you specified addresses that woudn’t fit into 32 bits. Or, you are using the -alf option to repeat the fixups on a program or DLL, and you are pointing at some other DLL that uses addresses that don’t fit into 32...
  • Page 192 Cause. You used the -no_preset or -must_preset option, which affect the eld program’s behavior when it is creating a program or DLL, and you also used the option, to tell eld to build another object file that could be used as eld input, rather than a program or DLL. That’s inconsistent.
  • Page 193 During the -alf option, eld uses those DLL names to search for those other DLLs again. eld found such a file, and opened it, but instead of being a DLL it was a different kind of file, as explained in the message. The message might have called it a “linkfile”, which means, for example, that it might be a file produced by...
  • Page 194 1530 Using the zimpimp file <filename>. Cause. eld normally looks for a “zimpimp” file, based on which it gets information about the symbols in system library, and this message is just telling you where eld found this file. Effect. Information (This is not indicative of a problem).
  • Page 195 Output Listings and Error Handling Error Messages have also given the -dll and -make_implicit_dll options, to tell eld to make one of the implicit DLLs that constitute system library. System library is not allowed to contain globalized symbols. Effect. Fatal error (eld immediately stops without creating an output file).
  • Page 196 TNS/E then the operating system tells eld where the file is. In other cases, eld looks for it in an appropriate place, expecting it to have the name “zimpimp”. eld did find a file by these methods, but the file turned out not to have the proper structure for a zimpimp file.
  • Page 197 For example, if you are running eld on TNS/E then the operating system tells eld where the file is. In other cases, eld looks for it in an appropriate place, expecting it to have the name “zreg”. Or, you can override these methods by explicitly telling eld where it is with the -public_registry option.
  • Page 198 Effect. Warning. It is possible that the format of the official public DLL registry file changed, and that is why eld cannot read it, but still eld tries to continue with the link. Because eld could not read the public DLL registry file, however, that means that eld will not be able to automatically find any of the standard DLLs.
  • Page 199 For example, if you are running eld on TNS/E then the operating system tells eld where the file is. In other cases, eld looks for it in an appropriate place, expecting it to have the name “zreg”. Or, you can override these methods by explicitly telling eld where it is with the -public_registry option.
  • Page 200 For example, if you are running eld on TNS/E then the operating system tells eld where the file is. In other cases, eld looks for it in an appropriate place, expecting it to have the name “zreg”. Or, you can override these methods by explicitly telling eld where it is with the -public_registry option.
  • Page 201 For example, if you are running eld on TNS/E then the operating system tells eld where the file is. In other cases, eld looks for it in an appropriate place, expecting it to have the name “zreg”. Or, you can override these methods by explicitly telling eld where it is with the -public_registry option.
  • Page 202 For example, if you are running eld on TNS/E then the operating system tells eld where the file is. In other cases, eld looks for it in an appropriate place, expecting it to have the name “zreg”. Or, you can override these methods by explicitly telling eld where it is with the -public_registry option.
  • Page 203 For example, if you are running eld on TNS/E then the operating system tells eld where the file is. In other cases, eld looks for it in an appropriate place, expecting it to have the name “zreg”. Or, you can override these methods by explicitly telling eld where it is with the -public_registry option.
  • Page 204 TNS/E then the operating system tells eld where the file is. In other cases, eld looks for it in an appropriate place, expecting it to have the name “zreg”. The first place eld looks is its own location (Guardian subvolume, OSS directory, or PC folder), and if there is no “zreg”...
  • Page 205 1555 <filename> is an archive, but it should have been a public DLL. Cause. You gave a -l option, to tell eld to search for a DLL based on the parameter to the -l option. Based on that, eld decided that this was one of the standard DLLs, found it in the standard place, and opened it.
  • Page 206 The DLL mentioned in the message will be used by eld during this link. For example, you may have specified this DLL to eld with a -l option, and the program will remember that fact, so the operating system will look for this DLL again at runtime.
  • Page 207 DLL, rather than a program. And don’t specify the option, which tells eld that you are building another object file that can be used as input to eld, rather than a program. Or, if you don’t intend to create a program, then don’t specify the - local_libname option.
  • Page 208 DLL by running eld and specifying an option such as -dll shared, or -ul. Then you can give the name of that user library to eld when you create the program. 1564 Both the -exported_symbol and -hidden_symbol options were specified for the same symbol <symbol name>.
  • Page 209 -ul option, which implies the -export_all option. But, you also used the option, to tell eld to build another object file that can be used as linker input, rather than a program or DLL. Effect. Error (The linker cannot do what was requested of it and will eventually stop, but may continue for the purpose of detecting additional errors before stopping).
  • Page 210 Cause. You gave the -exported_symbol option (or its synonym, the -export option) to say that a certain symbol should be exported. In fact, eld has seen such a symbol, perhaps in a DLL, or perhaps as an external reference from the program or DLL being built.
  • Page 211 Recovery. Even though eld could not open the user library, it will still continue doing the link to create or update the program. In this case, eld will not be able to do fixups on the program. In the -alf case, this invocation of eld may accomplish very little, since eld could not repeat the fixup process, which was probably the reason to give the -alf option in the first place, but again it won’t fail.
  • Page 212 Recovery. If eld cannot create the object file with the name you prefer, do you want that to be an error? Or, do you want to tell eld the name of a different place to put it? Depending on what you want to do, specify at most one of the -temp_o and - must_use_oname options.
  • Page 213 Recovery. If eld cannot create the import library with the name you prefer, do you want that to be an error? Or, do you want to tell eld the name of a different place to put it? Depending on what you want to do, specify at most one of the -temp_i and - must_use_iname options.
  • Page 214 Output Listings and Error Handling Error Messages Cause. You gave an option to ask eld to create an import library, and eld was unable to create the import library in the specified location, and you also gave the - must_use_iname option to say that eld should consider that failure an error.
  • Page 215 Output Listings and Error Handling Error Messages giving a subset of the input files to eld each time, and then there would be less confusion about what is actually going to happen. 1585 In <filename>, <symbol name> is defined, and is renamed to <symbol name>, but that symbol is also already defined in...
  • Page 216 DLL or zimpimp file should go. You could do that by editing the private DLL registry file by hand, or by deleting its entry from the private DLL registry and letting eld choose a new location for it with the - update_registry option.
  • Page 217 -update_code option. But you specified the - update_code option without the -alf option. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If your intention is to run the -alf option on the millicode DLL then you should have specified the -update_code option.
  • Page 218 If you really did intend to do this, you can use the -allow_multiple_procs option to tell eld it is okay. In that case, eld will pick one copy to use, so you must be sure that is the one you really want to use. If one copy of the procedure has the resident attribute, eld will pick that one.
  • Page 219 -set process_subtype option to assign a numerical subtype to that object file. When eld is then given that object file in a subsequent link, it copies over the subtype to its output object file again.
  • Page 220 -set process_subtype option to assign a numerical subtype to that object file. When eld is then given that object file in a subsequent link, it copies over the subtype to its output object file again.
  • Page 221 16 megabytes in size. You used the option of eld to tell it to create a new object file that can be used as linker input again, so the limitation applies to this output file. eld will combine code sections that have the same name in its input files into a single code section of the same name in the output file.
  • Page 222 DLL having a code section of any size. But you probably want to report this to HP, so that the reason this came up can be analyzed. 1605 The -import_lib or -import_lib_stripped option is only allowed when creating a new DLL.
  • Page 223 Cause. You gave the -r and -set _process_subtype options, to tell eld to create a new object file that can be used as eld input again, and that specifies what the process subtype should be when a program is later built from that object file. Also,...
  • Page 224 -set floattype option, to tell eld which floating point type to indicate in the output object file, and it was different from what the input file contained.
  • Page 225 -range command for the DLL that is being created by this link. Presumably, the format of the file is bad because it was incorrectly edited by hand. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. Fix the format of the file, as explained elsewhere in this manual.
  • Page 226 DLL that wasn’t an implicit DLL, but now is being used to build an implicit DLL. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. Fix the format of the file so that the size is a multiple of 64K or 128K, as appropriate.
  • Page 227 You can use the -update_registry command to create such a registry file, or you can edit one by hand. If you just want to record the decision that eld made for the DLLs address in a registry file not specify the address unconditionally with the registry file, then you should use the -update_registry option rather than the -check_registry option.
  • Page 228 Effect. Warning. eld will still create the DLL that you wanted to create, but the private DLL registry itself has not been modified.
  • Page 229 DLL. There was a block of space in the registry that was large enough for the DLL, and eld has put it there. This might or might not be the same starting address as before, but it definitely is a larger size than before.
  • Page 230 Recovery. If the problem occurred because you specified a value for the -t or option that was close to 0x80000000, don’t do that. By default, eld will start a DLL at 0x78000000, which gives 256 megabytes for its code and data before reaching the 0x80000000 boundary.
  • Page 231 TNS/E then the operating system tells eld where the file is. In other cases, eld looks for it in an appropriate place, expecting it to have the name “zreg”. The first place eld looks is its own location (Guardian subvolume, OSS directory, or PC folder), and if there is no “zreg”...
  • Page 232 Error Messages Cause. You used the -call_shared option, which tells eld to create a program, and you also used the -r option, to tell eld to build another object file that can be used as linker input, rather than a program.
  • Page 233 “Guardian DEFINE”, and expand it to a filename. But, you are running eld on the PC or on OSS, and on these platforms this type of command line string is not allowed.
  • Page 234 Cause. The contents of the specified input filename might not be correct. As a result, eld does not process the file. Effect. Fatal error. eld stops immediately without creating an output file. Recovery. Contact your HP representative. 1660 <filename>: the procedure <procedure name> is in <section name>, which is a resident code section, but is not...
  • Page 235: Glossary Of Errors

    Effect. Fatal error. eld stops immediately without creating an output file. Glossary of Errors This glossary of errors provides more information about the words that appear in eld error messages. Some glossary entries may also help you understand other glossary entries.
  • Page 236 In general, the members of an archive can be any kinds of files, but the members should probably only be TNS/E linkfiles if the archive is intended to be used with eld. eld can read an archive and use some of its linkfiles as inputs for a link.
  • Page 237 Output Listings and Error Handling Glossary of Errors DLL registry. This is a file that can be used to tell eld which addresses to use when creating a DLL, and/or to record the choices eld made about such addresse. DWARF. This is the name for the industry-standard format of the symbol table information that is used for debugging (not for most linking activities).
  • Page 238 DLL, but cannot be loaded into memory in place of the real DLL at runtime. An import library can be marked "incomplete", such as by the -set incompete on option of eld. When an import library is incomplete, eld may still use it to see if there are unresolved references, but not to preset.
  • Page 239 "preset" when there is a chance that the addresses could be correct at runtime.
  • Page 240 DLL's. This may occur for many reasons, ranging from...
  • Page 241 Guardian filename within the program, through the -set libname option of eld, rather than by telling eld to use a DLL the usual way, such as by a -l option. Variable data. This refers to data that can be modified after the process has started running.
  • Page 242 Output Listings and Error Handling Glossary of Errors eld Manual—527255-009 6-132...
  • Page 243: Tns/E Native Object Files

    All TNS/E versions of the HP NonStop operating system, including both the Guardian and OSS environments. • Some TNS/R versions of the HP NonStop operating system, at least in the Guardian environment. • Appropriate versions of the Windows operating system on PC’s.
  • Page 244: Types Of Tns/E Object Files

    Import libraries are further categorized as complete or incomplete. The difference is that an incomplete import library need not contain the correct addresses for symbols. A complete import library can be used by the linker when presetting a loadfile. The eld Manual—527255-009...
  • Page 245: How To Distinguish The Different Types Of Object Files

    -r option. The following is a list of the things that may exist in linkfiles: ELF Header eld Manual—527255-009...
  • Page 246 The .sbss and .bss sections don’t actually take up any space in loadfiles. The table only shows where they would be placed in virtual memory. eld Manual—527255-009...
  • Page 247 .hash.gblzd .hashval.gblzd .rela.gblzd .dynstr2 .IA_64.unwind .IA_64.unwind_info .IA_64.unwind.strings .rconst .plt .restext .text .hash .dynsym .dynstr .hashval .rela.dyn .gateway - for a program .data - can have more than one data segment .rdata .fptr .srdata .got .IA_64.pltoff .sdata .sbss .bss eld Manual—527255-009...
  • Page 248 .dynamic Section This contains information needed by the runtime loader, such as the addresses of the .liblist through rela.dyn sections. It is required in loadfiles and import libraries. eld Manual—527255-009...
  • Page 249 .rconst. .plt Section This section contains import stubs. An import stub is created by the linker in a loadfile when the linker cannot guarantee that the target of an IP-relative procedure call is resolved within the same loadfile. eld Manual—527255-009...
  • Page 250 This contains gateways. A gateway is created for each procedure entry point that has the CALLABLE or KERNEL_CALLABLE attribute. .data Section This contains application-defined initialized data, but doesn’t have either of the restrictions that make it possible to put data into the .rdata or .sdata section. eld Manual—527255-009...
  • Page 251 This section occupies no space in an object file, but rather reserves memory space that is automatically initialized eld Manual—527255-009...
  • Page 252 SQL/MP, the set of source RTDU’s is represented by three sections. In a program, the set of source RTDU’s is also represented by three sections, although not with the same section names as in a linkfile. eld Manual—527255-009 A-10...
  • Page 253: Code And Data Sections

    The reason that Intel and HP separate out the relocation table entries for the .IA_64.pltoff section is related to the feature of “lazy evaluation”, which the HP NonStop operating system does not support (and which is not described in this appendix).
  • Page 254: User Code

    A-26 for further information. The size of executable code is always a multiple of 16 bytes, because instructions are grouped into 128-bit bundles. Actually, the HP NonStop operating system compilers usually say that text sections must be aligned on 32-byte boundaries, and similarly each procedure within a code section starts at an offset within that section that is a multiple of 32 bytes.
  • Page 255: User Data

    However, if a data item is initialized to all zeros, the compiler may treat it as uninitialized data. That is possible, because all uninitialized data is automatically initialized to zeroes by the HP NonStop operating system. When the linker combines a set of linkfiles into a new file it usually concatenates each of the user's data sections from the various input files into a section of the same name in the output file.
  • Page 256: The Mcb (Master Control Block

    The following table tells the names of these symbols, their meanings, and the values that are placed into the st_scndx fi s of their dynamic symbol table entries. eld Manual—527255-009 A-14...
  • Page 257 Note that_unwind_size is absolute. Also, if the loadfile has no code, and therefore has no .IA_64.unwind section, then the symbol named _unwind is made absolute, and in this case both _unwind and _unwind_size have the value 0. eld Manual—527255-009 A-15...
  • Page 258: Relocation Tables

    The format of the relocation information is the same in all cases. The ELF section type is SHT_RELA, and the format of a relocation table entry is the following: typedef struct ELF64_Rela { ELF64_Addr r_offset; ELF64_Xword r_info; ELF64_Xword r_addend; }Elf64_Rela The size of this structure is 24 bytes. eld Manual—527255-009 A-16...
  • Page 259 The low order 32 bits of the r_info fi tell the relocation type and the high order 32 bits tell the symbol. The following #define's eld Manual—527255-009 A-17...
  • Page 260 Elf64_Rela structure is that it allows the addend to be larger than the number of bits available at the relocation site. The HP NonStop operating system prefers Elf64_Rela because it means that the process of filling in the relocation...
  • Page 261 This rest of this section describes what the relocation types in the above table mean and how they are used. R_IA_64_NONE This is a no-op. When the relocation type is R_IA_64_NONE, the entire relocation table entry is zero. eld Manual—527255-009 A-19...
  • Page 262 64-bit GP-relative addressing. It is an error if the linker cannot guarantee that the target symbol is resolved in the same loadfile. eld Manual—527255-009 A-20...
  • Page 263 Although the HP NonStop operating system does not rebase the text and data segments by different amounts at load time, we still obey this rule about 64-bit GP- relative addressing, and it is important to the linker's -alf option, which can rebase the text and data segments by different amounts.
  • Page 264 0's are attached to it, it will equal the address of the import stub minus the address of the bundle containing the current instruction. As described above under R_IA_64_PLTOFF22, the loadfile would contain a relocation table entry of type R_IA_64_IPLTMSB to describe the local function descriptor. eld Manual—527255-009 A-22...
  • Page 265 DLL is rebased in memory at load time, or an address that needs to be updated by the amount that the segment containing the address is moved by the -alf option of the linker. There is no target symbol, so the target symbol index is always 0. eld Manual—527255-009 A-23...
  • Page 266: How -Alf Updates Dwarf

    8, and the sh_entsize fi is 8. The .debug_relocs section is an array of 64-bit entries, one for each code or data address found in other DWARF sections. Within the 64-bit entry, the high-order byte eld Manual—527255-009 A-24...
  • Page 267 (if it is data) or the address of its official function descriptor (if it is a procedure). eld Manual—527255-009 A-25...
  • Page 268: Finding Information About Procedures And Subprocedures In Linkfiles

    An import library can be stripped even if the corresponding DLL is not stripped. DWARF Object File Sections Here is a summary of the purposes of the DWARF sections that the HP NonStop operating system uses: .debug_info eld Manual—527255-009...
  • Page 269: Archives

    "long member name string space", which is present if any of the names of the members of the archive are longer than 16 characters. The contents of the remaining pieces are the members of the archive. eld Manual—527255-009 A-27...
  • Page 270 ("/") followed by an ASCII string for the integer value that is the byte offset of the member's name in the long member name string space. Leading zeroes are removed from this string, and it is blank filled on the right. eld Manual—527255-009 A-28...
  • Page 271: Tools That Work With Object Files

    VPROC can read object files to print out version procedures (i.e., a very special case of what NOFT does). • The HP NonStop operating system operating system, including the runtime loader (rld), reads object files to bring them into memory. eld Manual—527255-009...
  • Page 272 Debuggers read object files as well as their memory images, and can modify the memory images. • The archive creation tool (ar) reads object files, and reads and writes archives. • SQLCOMP can read and write object files in order to create or update their object RTDU’s. eld Manual—527255-009 A-30...
  • Page 273: Glossary

    TNS/R uses both ELF and COFF file structures. All TNS/E compiler/assemblers, linkers, and loaders generate object files with this file structure. Explicit library. Any library that is named in the libList of any client loadifle or is a user library of a client program. eld Manual—527255-009 Glossary-1...
  • Page 274 (as inputs) when building or relinking a program or DLL file. Hybrids do not exist in TNS/E. Implicit library. A library supplied by HP that is available in the read-only and execute-only globally mapped address space shared by all processes without being specified to the linker or loader.
  • Page 275 The loader for TNS and for TNS/R native programs and libraries that are not position-independent code (PIC) is part of the operating system. For PIC loadfiles and all TNS/E native programs, the loader called rld works with the operating system to load programs and libraries. eld Manual—527255-009 Glossary-3...
  • Page 276 External reference addresses appear only in a data area that can be modified by the loader; they do not appear in PIC code. PIC code is even more position independent than one might imagine from the term; it can be simultaneously eld Manual—527255-009 Glossary-4...
  • Page 277: Loadfiles

    Public Libraries. A set of libraries (offering widely-used functions) that are managed as part of the system, available to all users of the system, and in large part supplied by HP, although it is possible for customers and third parties to provide DLLs to be added to the public DLLs.
  • Page 278 TNS/E. The hardware platform based on the Itanium™ architecture and the HP NonStop operating system and software that are specific to that platform. All code is PIC.
  • Page 279: Loadfiles A

    TNS/E object file format. This object file format is an amalgam of Intel IA-64 code architecture and the HP NonStop operating system extensions. TNS/E object files are categorized into three types of files: linkfiles, loadfiles, and import libraries.
  • Page 280 Glossary Zreg file Zreg file. This is the internal name of the public DLL registry file, which lists the names of all the public DLL's. eld Manual—527255-009 Glossary-8...
  • Page 281 Dynamic loading Glossary-1 imp) Glossary-2 Import Glossary-2 Import control Glossary-2 EDIT Line Number Glossary-1 import control eld Functionality for 64-Bit 4-12 Import Libraries 3-11 eld introduction Import library Glossary-2 Glossary-1 Import Library definition ELF symbol tables 3-16 In other words 2-18 Enterprise Toolkit—NonStop Edition...
  • Page 282 Sections and Segments Glossary-5 Multiply-defined symbols 3-17 segment Semi-globalized Glossary-6 source RTDUs 4-19 non-PIC libraries 3-22 Strip file Glossary-6 stripping 4-14 Symbol Glossary-6 Symbol definition Glossary-6 obey files Symbol Resolution Glossary-6 Object Files, basic properties Symbol value Glossary-6 eld Manual—527255-009 Index-2...
  • Page 283 4-15 unwind information 4-15 User library Glossary-7 user library 3-10 user library definition VHPT Glossary-7 Visual Studio .NET VPROC Glossary-7 When eld is creating a new object file 2-17 Zimpimp file Glossary-7 Zreg file Glossary-8 eld Manual—527255-009 Index-3...

Table of Contents