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.
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.
Legal Notices © Copyright 2012 Hewlett-Packard Development Company L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
eld Manual Glossary Index Tables Legal Notices What’s New in This Manual v Manual Information v New and Changed Information About This Manual ix Notation Conventions v xi 1. Introduction to eld eld Overview 1-1 Example Command Line 1-2 eld Functionality 1-2 Linker Version Information 1-3 Native Object Files 1-3 The Linker Command Stream 1-5 Obey Files and the Use of Standard Input Example of Use 1-9 1-7 2.
4.
A. TNS/E Native Object Files Contents Glossary of Errors 6-126 A.
Contents eld Manual—527255-009 iv
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 subsequent H-series RVUs, until otherwise indicated by its replacement publications.
Changes to the 527255-008 manual: What’s New in This Manual ° • • • Updated the information on the attributes for -set and -change option on pages 4-9 and 4-10. Added eld Functionality for 64-Bit on page 4-12. In the table, Set Attributes on page 5-8: ° Added a new entry on page 5-8. In the title, Output Listings and Error Handling on page 6-1: ° ° ° ° ° ° ° ° ° Updated the message 1557 on page 6-95. Added a new message 1510 on page 6-77. Added a new message 1665 on page 6-124.
Changes to the 527255-005 Manual: What’s New in This Manual • Added applicability note for data2protected parameter support on page 2-7 and 3-16. • Updated list of sections under Binding of References on page 3-1. Changes to the 527255-005 Manual: • Updated information on how the linker searches for indirect DLLs on page 2-12 and 2-19. • • • Added consideration for -set libname on page 3-10. Added consideration for -change libname on page 4-10.
Changes to the 527255-005 Manual What’s New in This Manual eld Manual—527255-009 viii
About This Manual This publication describes how programmers can use eld, the object file linker for TNS/E, to create loadfiles for execution on H-series software NonStop servers. Section 1, Introduction to eld consists of the following topics: • • • eld Overview - explains the general functionality of the product. • Example of Use - presents an example of using eld to link a main program and a DLL . Native Object Files - introduces the different types of object files.
About This Manual • Finding and Reading The Public DLL Registry (ZREG) File - three ways to find it. 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. • • • • The -set and -change Options - how to set various options within the loadfile. • Modifying the Data Sections that Contain Stack Unwinding Information - when concatenating sections to create a new loadfile.
Notation Conventions About This Manual • Relocation Tables - when code is relocated, who resolves the address and prepares relocation tables? • Finding Information About Procedures and Subprocedures in Linkfiles - an introduction to the .procinfo and .procnames sections of linkfiles. • The DWARF Symbol Table - this table contains information used by debuggers and the Cobol compiler. • Archives - contains an extension of material covered in a previous section of this manual.
General Syntax Notation About This Manual italic computer type. Italic computer type letters within text indicate C and Open System Services (OSS) variable items that you supply. Items not enclosed in brackets are required. For example: pathname . TThis represents the name of a file. Filenames follow whatever rules apply to the corresponding host platform when the linker needs to do something with the file.
General Syntax Notation About This Manual each side of the list, or horizontally, enclosed in a pair of brackets and separated by vertical lines. For example: FC [ num ] [ -num ] [ text ] K [ X | D ] address { } Braces. A group of items enclosed in braces is a list from which you are required to choose one item. The items in the list can be arranged either vertically, with aligned braces on each side of the list, or horizontally, enclosed in a pair of braces and separated by vertical lines.
Notation for Messages About This Manual Line Spacing. If the syntax of a command is too long to fit on a single line, each continuation line is indented three spaces and is separated from the preceding line by a blank line. This spacing distinguishes items in a continuation line from items in a vertical list of selections. For example: ALTER [ / OUT file-spec / ] LINE [ , attribute-spec ]… !i and !o.
Change Bar Notation About This Manual lowercase italic letters. Lowercase italic letters indicate variable items whose values are displayed or returned. For example: p-register process-name [ ] Brackets. Brackets enclose items that are sometimes, but not always, displayed. For example: Event number = number [ Subject = first-subject-value ] A group of items enclosed in brackets is a list of all possible items that can be displayed, of which one or none might actually be displayed.
Change Bar Notation About This Manual The message types specified in the REPORT clause are different in the COBOL85 environment and the 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.
1 Introduction to eld This section contains the following information topics: eld Overview introduces the general functionality of the product. Native Object Files introduces the different types of object files. The Linker Command Stream shows the conventions for entering tokens (options, parameters and filenames) on the command line. Example of Use presents an example of using eld to link a main program and one DLL.
Example Command Line Introduction to eld Example Command Line The following is an example of a linker command line: eld myobj1 myobj2 -o myprog -lib mydll This command specifies linkfiles myobj1 and myobj2 as inputs to the linker, which is named eld. 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.
Linker Version Information Introduction to eld • • eld • • • C/C++ Programmer’s Guide HP COBOL For NonStop Systems runs in the following environments: Guardian OSS Windows NT, Windows 2000, and Windows XP, using either the Cross-Compiler CDs or the HP Enterprise Toolkit—NonStop Edition (ETK), which is based on Microsoft Visual Studio .NET Note. eld has the same capabilities and syntax in each environment, but each environment has its own rules, for example, filename syntax.
Native Object Files Introduction to eld 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. Program This is the main program. There is one program in every process. DLL This is a dynamic-link library.
The Linker Command Stream Introduction to eld 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. Some of the public libraries are called implicit libraries because they are used at link time and run time without explicit mention on the part of the user.
The Linker Command Stream Introduction to eld • 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. • Toggle options are options that modify the linker’s behavior for the remainder of the command stream, or until toggled again. • One-time options are everything else.
Obey Files and the Use of Standard Input Introduction to eld 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. If some tokens are given, and based on these tokens the linker should create a new object file from one or more linkfiles, but no linkfiles are brought into the link, eld reports an error.
Obey Files and the Use of Standard Input Introduction to eld 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. The -obey option has a synonym, -FL. There is also an option named -stdin. This is the same as an -obey option except that it doesn’t take a parameter and it signifies instead that the contents of the standard input file are read at this point in the command stream.
Example of Use Introduction to eld Example of Use This section shows an example of using the eld linker. 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 nolist #include nolist #include
Example of Use Introduction to eld char *pBegin; char *pEnd; char c; strcpy(r, s); pBegin = r; pEnd = r + strlen(r); while (--pEnd > pBegin ) { c = *pBegin; *pBegin++ = *pEnd; *pEnd = c; } return (0); } /* StrRev */ 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.
Example of Use Introduction to eld Here’s the creation of the object file called mystro. run $data01.toolsy02.ccomp /in mystrngc /mystro;suppress TNS/E C - T0549H01 - 30AUG2004 (Oct 25 2004 14:47:23) (C)2004 Hewlett Packard Development Company, L.P. 0 remarks were issued during compilation. 0 warnings were issued during compilation. 0 errors were detected during compilation. Object file: mystro Compiler statistics phase CPU seconds elapsed time CCOMP file name \SPEEDY.$DATA01.TOOLSY02.
Example of Use Introduction to eld The following command input creates the DLL: run $data01.toolsy02.eld mystro -o mystrdll -shared -export_all eld - TNS/E Native Mode Linker - T0608H01 - 26OCT04 Copyright 2004 Hewlett-Packard Company eld command line: \speedy.$data01.toolsy02.eld mystro -o mystrdll -shared -export_all **** INFORMATIONAL MESSAGE **** [1530]: Using 'ImpImp' file: \speedy.$data01.toolsy02.zimpimp.
Example of Use Introduction to eld 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 $data01.
Example of Use Introduction to eld eld Manual—527255-009 1-14
2 eld Input and Output This section contains the following information: Host Platforms - where the linker may be used. Target Platforms - where the output from the linker may be used. Output Object Files - what forms (libraries, loadfiles and DLLs) that output may take. The Creation of Output Object Files - how you control the process. Creating Segments of the Output Loadfile - how parts of a loadfile are created. Using a DLL Registry - how you can manage DLL addressing.
Target Platforms eld Input and Output • Text files in Guardian subdirectories of OSS are code 180 files, not edit files. When the linker creates a text file in a Guardian subvolume of OSS it is a code 180 file. When the linker reads a text file in a Guardian subvolume of OSS, code 180 files always work, and edit files do not necessarily work. • OSS has the concept of a “file mode” used to control UNIX file security and access rules. This file mode does not apply to files in the Guardian namespace.
Filenames and The File Identifier eld Input and Output 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. A Note About MAP DEFINES A DEFINE is a collection of attributes to which a common name has been assigned. These attributes can be passed to a process simply by referring to the DEFINE name from within the process.
Output Object Files eld Input and Output 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. The TNS/E linker can also create an import library, as described in Creating Import Libraries on page 3-11.
The Creation of Output Object Files eld Input and Output 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. Certain DLLs are called implicit libraries. If the linker is creating a DLL, it can also be told to make it an implicit library with the -make_implicit_lib option.
Creating Segments of the Output Loadfile eld Input and Output 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. Thus, the -temp_o option gives the user a way to specify the name of a file that will only come into existence if the link is successful and will still be in existence if something goes wrong when the linker tries to put the file in the designated output file location.
Creating Segments of the Output Loadfile eld Input and Output and what additional rules should be enforced, as shown in the following table. eld reports an error if you specify the -instance_data option more than once with different parameters. eld reports an error if you specify -instance_data with -r. Table 2-1. Parameters to the -instance_data Option Parameter Meaning data1 Create one data segment. (This is the default.
Using a DLL Registry eld Input and Output 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.
Using a DLL Registry eld Input and Output 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 constant segment, data variable segment, and/or gateway segment (whichever of these segments exist).
Using a DLL Registry eld Input and Output • • a to tell the starting address of the DLL a 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. Whenever the linker opens a registry, it checks for the following errors.
Using a DLL Registry eld Input and Output 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.
Input Object Files eld Input and Output 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. A new registry file is always created, mostly following the same rules as given earlier in The Creation of Output Object Files on page 2-5.
Input Object Files eld Input and Output See 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. See Using User Libraries on page 3-10 for an explanation of how the linker finds user libraries.
Input Object Files eld Input and Output or subvolume, as is normally done for the corresponding host platform. eld 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. In the case that the name was specified as a full filename in a -l option, the file must be an archive or DLL.
Input Object Files eld Input and Output 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.
Using Archives eld Input and Output The rules above, about finding the same DLL name more than once, also apply to the special DLL name “__IMPLICIT_LIB__”. Using Archives An archive is a file that contains copies of linkfiles. The linker looks for files within the archive to be used by the link. Linkfiles in the archive are used if they define global symbols that are currently known about, but undefined, at this point in the command stream.
Using Archives eld Input and Output 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. Archives are a method of making loadfiles smaller, because the linker will automatically bring into the link only those members of the archive which are needed.
Using Archives eld Input and Output 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. Therefore, if X is neutral then it is desired that all the DLL’s used are neutral, and if X is not neutral then it is desired that all the DLL’s used are either neutral or same as X.
Using Archives eld Input and Output you enter the -l cre option or if it processes a DLL and as a result finds the name: zcredll or ycredll in the liblist of the other loadfile. The Rules to Find Files This section tells the rules that the linker uses to decide which files to try to find and open in each directory or subvolume that it is searching. This applies to all the steps followed by the linker in searching for an archive or DLL, other than the special step for the public DLLs.
Using Archives eld Input and Output eld Manual—527255-009 2-20
3 Binding of References This section contains the following topics: • • • Overview -an overview of symbol resolution and code relocation. • Handling Unresolved References - what happens if a symbol is not found in any loadfile in the linker’s search list? • • • • Using User Libraries - introduces the libname options.
Overview Binding of References The functions are related because the linker can use symbol resolution to handle relocation, by assigning a symbol to the base address of each part of the program then treating the relocatable addresses as references to the base address symbols.
Overview Binding of References The way references are fixed up across loadfile boundaries depends on the import control of the loadfile being built. This controls how the search list is created, both at link time and at load time, to find the DLLs that are needed to resolve symbols referenced in the loadfile. There are three choices for this, set by the following options: -b localized (this is the default) means “localized”.
Overview Binding of References The linker does not necessarily know the proper load time values to use for addresses, because things can change between link time and load time for reasons such as these: • The DLL currently being built, or the other DLLs to which it refers, will not necessarily be loaded at the same (preferred) addresses as those assumed by the linker.
Presetting Loadfiles Binding of References Presetting Loadfiles This section discusses how the linker presets a loadfile. Except as mentioned otherwise below, import libraries are used the same way that DLLs are, and remarks made here about DLLs in the search list also apply to import libraries in the search list. The search list begins with the loadfile itself. Next, for a program that has a user library, comes the user library.
Presetting Loadfiles Binding of References There are several ways that the linker may find the import library that represents the implicit libraries. Regardless of how the import library that represents the implicit libraries is found, the linker always uses it the same way, placing it at the end of the search list. The linker may have found the import library that represents the implicit libraries from the command stream, such as described in How the Linker Finds Its Input Files and Creates the .
Binding of References To Preset or Not to Preset, and Creation of the LIC To Preset or Not to Preset, and Creation of the LIC LIC is the ‘Library Import Characterisation’, a section in the object file that encodes information about the current loadfile, plus each DLL or import library that was used to do the presetting, in the search list order, noting its export digest and whether it was used to resolve any references.
Handling Unresolved References Binding of References the implicit libraries, if the linker found that library. If there was a DLL with the same filename as the user library, then that DLL gets no LIC entry. Note that, for each entry in the .lic, there is a bit that tells whether any references were actually resolved by symbols exported from that DLL. The linker does not put out any warning messages about DLLs that were “not used”.
Handling Unresolved References Binding of References registry has been found then the default for the -unres_symbols option is error. In other words, eld only thinks it is unreasonable to have unresolved references if the public DLL registry has been found.
Using User Libraries Binding of References the flags field of the .tandem_info section. This tells rld how it should treat unresolved references at runtime. Even if this loadfile is preset, and even if rld can verify that the presetting is correct, rld will still repeat the presetting process in order to generate the error or warning messages requested by the RUNTIME_UNRES_CHECKING bits if the LIC says that there were unresolved references.
Creating Import Libraries Binding of References On Guardian, the linker knows that it is building a program that uses a user library because either -set libname or -local_libname is given. If only one of these is given, it provides a default for the other one. Specifically, if -local_libname is not given, the linker uses the parameter of -set libname for the value of local_libname.
Creating an Import Library at the Same Time That a DLL is Created Binding of References there similarly is a -must_use_iname option instead of -must_use_oname. An existing file of the same name is not replaced if the linker terminates with any errors. The -change incomplete on option can be used to demote an import library from complete to incomplete. It is not possible to demote the import library that represents the implicit libraries.
Binding of References Creating Import Libraries From Existing DLLs has unresolved references, that is either an error, warning, or ignored, depending on what is specified for the -unres_symbols option, similar to how this option is used when building a new loadfile. If the -unres_symbols option was not specified, the default in this situation is error. The import library that represents the implicit DLL's never has DWARF symbol table information.
Ignoring Optional Libraries Binding of References -temp_i -temp_r -unres_symbols -update_registry -verbose -vslising -warn Ignoring Optional Libraries This section decribes the feature whereby eld can be told to omit certain DLL's from the liblist if they appear to be unnecessary. Note that eld always does this processing, regardless of whether it is presetting the file.
Ignoring Optional Libraries Binding of References the omitted .liblist entries had never been present. For example, some of the DLL's in the search list addition set of such a .liblist entry may still be present in the LIC, and some not, and if present their positions in the LIC may change, depending on other ways of getting to those DLL's indirectly. When some elements of the .liblist section have been omitted, with corresponding changes to the LIC if present, we say that the .
Merging Symbols Found in Input Linkfiles Binding of References .liblist section for such a DLL. With regard to the -optional_lib option, this option ever causes such an entry to be removed from the .liblist. The point is that such an entry is only significant if a different user library were to be used at runtime, and eld does not try to analyze whether this .liblist entry would be "necessary" if a different user library had been present.
Accepting Multiply-Defined Symbols Binding of References In linkfiles, entries in the ELF symbol table tell the source language for each symbol. When there are multiple entries of the same name that have been defined and allocated by the compiler or assembler, the rules followed by the linker in deciding which copy to keep are found inAccepting Multiply-Defined Symbols on page 3-17. If there is only one entry that has been defined and allocated by the compiler or assembler, the linker keeps that one.
Rules for Procedures Binding of References • The linker uses the st_size field in the ELF symbol tables of its input files to understand the sizes of data items. When there are multiple definitions of a data item eld reports an error if the sizes are not the same. It is not an error if some of the definitions have initial values (i.e., in the .data or .sdata sections) and others don’t (i.e., in the .bss or .sbss sections).
Using the -cross_dll_cleanup option Binding of References If two copies of the procedure agree on the RESIDENT attributes, the linker prefers the first one it sees. The linker prefers one that is RESIDENT over one that is not RESIDENT. Note that the linker doesn’t know why someone thought the procedure needed to be RESIDENT, but as long as at least one copy said so, the linker assumes it is necessary.
Binding of References Specifying Which Symbols to Export, and Creating the Export Digest the symbol. 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.
Processing of Code and Data Sections Binding of References The option -export is accepted as a synonym for -exported_symbol, and -export_not as a synonym for -hidden_symbol. Exported symbols are identified in the .dynsym and .dynsym.gblzd sections by the fact that they are marked STB_GLOBAL and not SHN_UNDEF. If a symbol that was STB_GLOBAL in its input linkfile is not exported, that fact is indicated by marking it as STB_LOCAL rather than STB_GLOBAL in the output loadfile.
Public Libraries and DLLs Binding of References When creating a linkfile, the linker similarly concatenates the relocation tables that accompany the code and data sections. The linker’s input linkfiles may also contain common data. Such data items are defined, but not assigned addresses within sections. If a normal definition of the same symbol is found, the common data definitions are ignored.
The Public Library Registry Binding of References Each set of public libraries is installed in a separate subvolume, separate from the SYSnn subvolume and separate from any other set of public DLLs. This subvolume is on the same disk as the SYSnn subvolume. The SYSnn subvolume also contains the imp-imp file, named zimpimp. This is the import file usable for resolving external references to the explicit libraries. The imp-imp file can be copied to the public-DLL subvolume.
Binding of References Finding and Reading The Public DLL Registry (ZREG) File 2. If the -public_registry option is not specified then the linker looks for a file named zreg in its own directory or subvolume. If this location is a \bin or /bin, eld will also look in a corresponding \lib or /lib location. This supports the practice, on PCs and OSS, of putting eld in a bin directory and the public DLLs (together with the zreg file) in a sibling lib directory.
4 Other eld Processing This section contains the following information: Adjusting Loadfiles: The -alf Option - 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. Updating Or Stripping DWARF Symbol Table Information - from the input and output object files.
Adjusting Loadfiles: The -alf Option Other eld Processing -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. Such sites only need modification if a file is being rebased.
Additional rules about -alf Other eld Processing 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: • • • It is not possible to specify import controls. It is not possible to say which symbols are exported. If it is a DLL, it is not possible to say what its DLL name is.
Additional rules about -alf Other eld Processing • • • • The location of the existing loadfile. • • • On OSS, /lib, /usr/lib, and /usr/local/lib. The places specified in -L options. The places specified by the DT_RPATH entry of the .dynamic section. On OSS, if the existing file is a 64-bit data model: /lib64, /usr/lib64, and /usr/local/lib64. On Guardian or OSS, if the existing file is a 64-bit data model: $SYSTEM.YDLL. On Guardian or OSS: $SYSTEM.ZDLL.
Additional rules about -alf Other eld Processing 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. When the -alf option is operating on a program, it uses the user library the same as when the linker created the program.
Additional rules about -alf Other eld Processing 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: • • In the ELF header, the EF_TANDEM_PRESET bit may be changed. • The LIC is updated. It may end up with more or less entries than before.
Additional rules about -alf Other eld Processing • 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: • If the target of the reference is identified by name, -alf updates the reference based on that name.
The -set and -change Options Other eld Processing The -set and -change Options The -set option is used to set certain items in the file being created. These items are called “file attributes”. The following chart lists the file attributes and tells what they mean, usually telling the name of the section of this document that provides more explanation. Each of the attributes is specified together with a parameter to tell the value of the attribute. Table 4-1.
The -set and -change Options Other eld Processing Table 4-1. The -set and -change Options Attribute Attribute Meaning heap_max These attributes have numerical values. These attributes correspond to fields in the .tandem_info section. If not specified, the default value in each case is 0. mainstack_max process_subtype space_guarantee See the Guardian Procedure Calls Manual for more information about how to use the heap_max, mainstack_max, and space_guarantee attributes.
The -set and -change Options Other eld Processing 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.
The -set and -change Options Other eld Processing 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. Except for the items listed above, there are no restrictions on which attributes can be specified. Note that some attributes can be specified for DLLs even though they are meaningless for DLLs.
eld Functionality for 64-Bit Other eld Processing 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 by the following option: -set data_model [value] where value can be ilp32, lp64, or neutral. For lp64 input linkfiles, it is considered as an error, if -set data_model ilp32” is specified.
Renaming Symbols Other eld Processing input files contained C++. An informational message is generated if the input files contained C++. When eld 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. Note that the use of -set CplusPlusDialect cppneutral does not affect this check.
Creating Linker-Defined Symbols Other eld Processing 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. As mentioned in Creating the MCB on page 4-15, eld reports an error if you define a symbol named _MCB.
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 needed by the linker and/or runtime loader.
Other eld Processing Processing of Floating Point Versions and Data Models Processing of Floating Point Versions and Data Models When the linker builds a new linkfile or loadfile it performs consistency checks of floating point versions. These checks use the floating point bits that are found in the e_flags field of the ELF header. The linker determines whether the input linkfiles are consistent, meaning that they do not contain a mixture of both the tandem and ieee floating point types.
Specification of the Main Entry Point Other eld Processing 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.
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.
Merging Source RTDUs Other eld Processing 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. Merging Source RTDUs Each input linkfile may contain a set of source RTDUs, which are used in the implementation of SQL/MP. If so, then the linker creates source RTDUs in its output file.
Merging Source RTDUs Other eld Processing eld Manual—527255-009 4-20
5 Summary of Linker Options This section lists all the options supported by the TNS/E linker. For each one the complete syntax is shown, a brief statement of its function is given, and a hyperlinked reference is given to the main discussion of it elsewhere in this manual. -alf Rebase and/or rebind an existing loadfile, recreating the file. See Additional rules about -alf on page 4-3. -all Use all members from archives. See Using Archives on page 2-16.
Summary of Linker Options -change Change the parts of an existing object file corresponding to things that the -set option would set up. The and have the same possibilities as for the -set option shown below. See The -set and -change Options on page 4-8. -check_registry Use the specified DLL registry to tell where the DLL being built must be placed in memory. See Using a DLL Registry on page 2-8.
Summary of Linker Options -exported_symbol Export the specified symbol from the loadfile being created. See Specifying Which Symbols to Export, and Creating the Export Digest on page 3-20. -export_not synonym for -hidden_symbol. -first_L The specified directory or subvolume is one of the places where the linker will look for DLLs and archives before it looks for public DLLs. See The Steps in Looking for Archives and DLLs on page 2-17. -FL synonym for -obey.
Summary of Linker Options -include_whole synonym for -all. -instance_data { data1 | data2 | data2protected | data2hidden | data1constant } This tells the linker whether to create one or two data segments, and whether to require that the loadfile have no data that would need to go into the data variable segment if two segments were created. See Creating Segments of the Output Loadfile on page 2-6. -l Use the specified filename to locate a DLL or archive. The “-l” must be specified in lower case.
Summary of Linker Options -make_implicit_lib Mark the DLL being created as an implicit library. See Output Object Files on page 2-4. -make_import_lib Create a complete or incomplete import library with the specified filename, to represent the other DLL or DLLs whose filename(s) are found in the command stream. See Creating Import Libraries on page 3-11. -map Produce a map showing how memory has been laid out. See Creating Segments of the Output Loadfile on page 2-6.
Summary of Linker Options -no_preset Do not preset the loadfile being created. See To Preset or Not to Preset, and Creation of the LIC on page 3-7. -no_reexport Do not reexport DLLs found after this point in the command stream. See How the Linker Finds Its Input Files and Creates the .liblist Section on page 2-12. -nostdfiles At runtime, do not automatically open the standard C I/O files. See Creating the MCB on page 4-15. -no_stdfiles synonym for -nostdfiles.
Summary of Linker Options -NS_max_extents max_extents Note. For Guardian environment only. Changes the maximum number of extents from the default (900) to the specified number. max_extents is a number in the range 16 to 900, inclusive. Note. The Guardian Procedure Calls Reference Manual recommends that maxextents not exceed 500. -o Use this as the name of the output object file. See The Creation of Output Object Files on page 2-5. -obey Use the specified file as an obey file.
Summary of Linker Options places where rld will look for DLLs before it looks for public DLLs. See Specifying Runtime Search Path Information for DLLs on page 4-18. -rld_L The string specified by should be a list of directories and/or subvolumes separated by colons. At runtime, the specified directories and/or subvolumes are places where rld will look for DLLs after it looks for public DLLs. See Specifying Runtime Search Path Information for DLLs on page 4-18. -rpath synonym for -rld_L.
Summary of Linker Options Table 5-1. Set Attributes Attribute Name heap_max < Allowable Values 0 The -set and change Options on page 4-8 | off on The -set and change Options on page 4-8 on | off on The -set and change Options on page 4-8 incomplete on (note: only one allowable value, so it is therefore also required) If not specified, and an import library is being created, it is a complete import library.
Summary of Linker Options Table 5-1.
Summary of Linker Options -t Use the specified value as the starting address of the text segment of the loadfile being built. See Creating Segments of the Output Loadfile on page 2-6. -temp_i Use the specified filename as the name of the intermediate file during the creation of an import library. See Creating Import Libraries on page 3-11.
Summary of Linker Options -warn_common Warn when a common symbol is combined with another common symbol of the same name but of different size. -warning_unresolved synonym for -unres_symbols warn. -x Omit the DWARF symbol table when creating the output file. See Creating Import Libraries on page 3-11. -y 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.
6 Output Listings and Error Handling This section contains the following topics: General Information - when and how messages are created. Error Messages - individual cause, effect and recovery information. Glossary of Errors - further detail on some of the error message text . General Information The linker creates a listing file that is written to the C standard output file. eld does not override whatever default rules are provided for the standard output file by the C runtime on each platform.
General Information Output Listings and Error Handling Normally, eld cleans up any output files and flushes the standard output file. However, if eld terminates unexpectedly, incomplete output files may still be in existence and the standard output file may not be flushed. It is also possible for the standard output file to disappear while eld is running. For example, this could happen on Guardian if the standard output file is a process, and that process is killed while eld is running.
General Information Output Listings and Error Handling In those cases where the default would be -verbose, the listing always begins with banner information. In other cases, there is banner information at the top of the output file if -verbose is explicitly specified or if any messages need to be written. The banner information includes the following items: • • • • the name of eld itself (i.e.
Error Messages Output Listings and Error Handling eld breaks the message at a space if possible. When a message is broken at a space, the space is left at the end of the broken line. eld demangles C++ symbol names in listing messages, as follows. Any name that contains two consecutive underscores is assumed to be a C++ name, and eld tries to demangle it, using a demangling algorithm that tries to be consistent with the mangling done by the C++ compiler.
Error Messages Output Listings and Error Handling Cause. You gave options such as -t and -d to specifically provide the starting addresses for the code and data segments of the program or DLL that you are building. However, with these starting addresses, the segments overlapped. Effect. Fatal error (eld immediately stops without creating an output file). Recovery.
Error Messages Output Listings and Error Handling 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). Recovery. A program can run correctly, even if it has unresolved references at link time. But, you may prefer that your link be clean. In that case, you need to look at the names of the symbols that eld said that it couldn’t find, and see if they exist somewhere.
Error Messages Output Listings and Error Handling Recovery. If your intention is to create a program or DLL, then don’t specify the -r option. If your intention is to use the -r option to create a new object file that can be used again as eld input, then don’t specify the -set systype option. 1009 The 'float_lib_overrule' attribute is not allowed with the -r option. Cause.
Error Messages Output Listings and Error Handling 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. Effect.
Error Messages Output Listings and Error Handling that need to be initialized with the addresses of procedures, in the file you are building or some other DLL, whose addresses can’t be represented in 32 bits. 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). Recovery.
Error Messages Output Listings and Error Handling 1019 Using DLL . Cause. eld prints out informational messages about some of the files that it used and what types of files they were. In this case, it is telling you about a DLL. Effect. Information (This is not indicative of a problem). Recovery. No action required. 1021 Bad input file: the symbol named _MCB is defined in , and that is not allowed. Cause.
Error Messages Output Listings and Error Handling Recovery. If your intention is to create a zimpimp file, then the other filenames on the command line should be implicit DLLs. If your intention is to create an import library to represent an ordinary DLL (not one of the implicit DLLs), then correct your command line syntax, because there are more filenames present than is allowed. If it is not your intention to create any kind of import library then don’t give the -make_import_lib option.
Error Messages Output Listings and Error Handling Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If your intention is to create a zimpimp file, which represents the multiple implicit DLLs that constitute system library, or if you are trying to create an import file to represent another (ordinary) DLL, then the names of one or more DLLs are required on the command line.
Error Messages Output Listings and Error Handling 1046 Could not set file code; deleting import library . Cause. You are trying to create an import library on Guardian, and after creating the import library eld tried to set its file code to 800, but was unable to do so. Effect. Error (The linker cannot do what was requested of it and stops, deleting the file that had been created up to that point). Recovery.
Error Messages Output Listings and Error Handling Recovery. If there already was a file with the same name as the file you wanted to create, and you didn’t have permission to delete it, either find some other way to delete that old file, or specify a different filename for the import library that you want to create.
Error Messages Output Listings and Error Handling 1083 Cannot find . 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 cound not find that DLL or archive. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. The rules for searching for DLLs and archives are complicated.
Error Messages Output Listings and Error Handling Recovery. You shouldn’t have a DLL whose filename ends in “.a”, so you need to fix your build procedure. 1100 is a linkfile, but it was found for a -l option. 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.
Error Messages Output Listings and Error Handling Recovery. If you specified the -make_implicit_lib option for no reason, stop doing it. Otherwise, this indicates some problem with the procedure for building and installing the NSK operating system, which is beyond the scope of this document. 1103 is an archive, but it was found as an indirect DLL. Cause.
Error Messages Output Listings and Error Handling 1106 Using archive: . Cause. eld prints out informational messages about some of the files that it used and what types of files they were. In this case, it is telling you about an archive. Effect. Information (This is not indicative of a problem). Recovery. No action required. 1107 : member in archive is not an object file. Cause.
Error Messages Output Listings and Error Handling Recovery. Did you really intend to specify a special version of the zimpimp file? If you did, check that you spelled it correctly, and that you do have permission to read it. 1129 No main entry point was specified when creating a program. Cause. You have asked eld to create a main program. However, you have not specified the -e option, and no procedure within the program has the MAIN attribute.
Error Messages Output Listings and Error Handling 1132 Input file < filename> cannot be linked into a globalized DLL; all of the code that went into that file must be recompiled with the 'globalized' option. Cause. Using the -b globalized option requires that all the input object files be compiled with –Wglobalized option. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. Compile the input object files with the –Wglobalized option.
Error Messages Output Listings and Error Handling Recovery. If your intention is to create a DLL to be used as an interpose user library, then specify an appropriate option, such as -dll, -shared, or -ul, to build a DLL. If your intention is to build some other type of object file, not a DLL, then don’t specify the -set interpose_user_library option. 1141 Floating point type inconsistency. The -set floattype option specifies , but the input linkfiles imply . Cause.
Error Messages Output Listings and Error Handling Recovery. None required, because even though the DLLs say they require a specific type of floating point at runtime, that might not really be true. You might want to look into this further, though, with people who are familiar with what those DLLs actually do need. 1144 Floating point type inconsistency. The DLL being created specifies 'tandem'. DLL specifies 'ieee'. Cause.
Error Messages Output Listings and Error Handling Cause. You are building a program, and it says that it needs the “IEEE” 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 “Tandem” version of floating point at runtime. Effect. Warning (eld produces an output file, but it might not be what you intended). Recovery.
Error Messages Output Listings and Error Handling performs on these implicit DLLs is that they are “preset”, which would have to be true if that implicit DLL was correctly fixed up at the time it was linked. But, the implicit DLL mentioned in the message was not preset. Effect. Fatal error (The linker cannot do what was requested of it and the linker immediately stops). Recovery.
Error Messages Output Listings and Error Handling Recovery. In special cases, different loadfiles within the same process may be able to use different dialects of C++. You may wish to check with someone who is familiar with the DLL mentioned in the message, to see if there might be problems at runtime due to this dialect inconsistency. 1153 The loadfile being built has C++ dialect v3; DLL has C++ dialect v2. Cause.
Error Messages Output Listings and Error Handling Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If your intention is to combine one or more existing object files into a new object file, put their names on the command line. If you want to do something else, such as stripping the symbols from an existing object file (for example), you need to put the appropriate option for that purpose on the command line, and of course you need to spell it correctly.
Error Messages Output Listings and Error Handling Cause. You used the -r_first_L option, to specify a place where NSK will look for DLLs at runtime, and you also used the -r option, to tell eld to build a 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). Recovery.
Error Messages Output Listings and Error Handling 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). Recovery. If your intention is to create a program or DLL, then don’t specify the -r option. If your intention is to use the -r option to create another object file that can be used as eld input, then don’t specify the -set cppdialect option.
Error Messages Output Listings and Error Handling Cause. You used the -set highpin option, which is an attribute you can set when you build a program or DLL, 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 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). Recovery.
Error Messages Output Listings and Error Handling 1187 The 'runnamed' attribute is not allowed with the -r option. Cause. You used the -set runnamed option, which is an attribute you can set when you build 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. Effect.
Error Messages Output Listings and Error Handling Cause. You used the -set heap_max option, which is an attribute you can set when you build 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. 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). Recovery.
Error Messages Output Listings and Error Handling 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). Recovery. If your intention is to create a program or DLL, then don’t specify the -r option. If your intention is to use the -r option to create another object file that can be used as eld input, then don’t specify the -set space_guarantee option.
Error Messages Output Listings and Error Handling don’t understand the purpose of the -t option, read the documentation or contact HP for more detailed advice. Perhaps you intended to make some code section come out at a particular location, but there is no direct way to do that. 1199 The value for the -d option was rounded up to . Cause. You used the -d option, which specifies the starting address of the data segment of the program or DLL being built.
Error Messages Output Listings and Error Handling program. Or, if you don’t intend to create a program, then don’t specify the -nostdfiles option. 1202 The -make_implicit_lib option is only allowed when you are creating a localized DLL. Cause.
Error Messages Output Listings and Error Handling Cause. eld is building a program or DLL, and the program or DLL makes a reference to the symbol mentioned in the message, but eld was unable to find a copy of that symbol, either in the program or DLL being built, or in any other DLL that was looked at during the link.
Error Messages Output Listings and Error Handling That symbol may be in a DLL, for example, that eld wasn’t using, so you need to supply those DLLs to eld. eld will print out informational messages about all the 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.
Error Messages Output Listings and Error Handling Cause. You specified the -make_import_lib option, in order to create the zimpimp file that represents the multiple implicit DLLs that constitute system library, and you also specified those implicit DLLs on the command line. One of the checks that eld performs on these implicit DLLs is that they don’t have unresolved references, which would have to be true if that implicit DLL was correctly fixed up at the time it was linked.
Error Messages Output Listings and Error Handling the symbol named in this message. After that, there is an instance of this message number 1228 for each additional definition that eld sees for the symbol. Effect. Information (This is not indicative of a problem). Recovery. No action required. 1229 Definition of from file 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.
Error Messages Output Listings and Error Handling Effect. For informational purposes only (might indicate a problem, see warning 1657 on page 6-124). Recovery. See the Recovery step of warning 1231 on page 6-38. 1233 : common of overridden by larger common. Cause. eld encountered global symbols of the same 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. Effect.
Error Messages Output Listings and Error Handling 1254 : unresolved reference to . Cause. eld is building a program or DLL, and the program or DLL makes a reference to the symbol mentioned in the message, but eld was unable to find a copy of that symbol, either in the program or DLL being built, or in any other DLL that was looked at during the link.
Error Messages Output Listings and Error Handling eld will print out informational messages about all the 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.
Error Messages Output Listings and Error Handling the reference was (in terms of its index in a table of relocation sites for some input section), and which section it was pointing at (i.e., the section that was removed). Effect. Fatal error (eld immediately stops without creating an output file). Recovery. Assuming this file was created by the C++ compiler, that indicates a compiler error, to be reported to HP, or perhaps incorrect usage of the compiler.
Error Messages Output Listings and Error Handling after this quotation mark, and it terminated by the next quotation mark on the line, but there was no additional quotation mark on the line. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. Find the offending quotation mark in the obey file. What did you intend to have there? You may need to review the rules in the eld manual about how eld treats quotation marks in obey files.
Error Messages Output Listings and Error Handling Recovery. Check that you have issued a MAP DEFINE prior to running eld, where this MAP DEFINE equated that string that began with an equal sign to a filename. Also check that DEFMODE is ON. 1285 The MAP DEFINE was expanded to . Cause. You specified a string that began with an equal sign on the command line, and you are running the Guardian version of eld.
Error Messages Output Listings and Error Handling 1289 Badly formed number for
Error Messages Output Listings and Error Handling Recovery. If you want to specify this option, fix the syntax. 1294 Invalid value given for 'cplusplusdialect': . Cause. You gave a -set cppdialect option. The next token on the command line must be either “neutral” or (synonymously) “cppneutral”, to tell the (only allowed) value for this -set attribute. However, the next token on the command line was something other than these two possibilities. Effect.
Error Messages Output Listings and Error Handling 1297 Invalid value for 'floattype': . Cause. You gave a -set floattype or -change floattype option. The next token on the command line must be either “tandem”, “ieee”, or “neutral” (or the longer synonyms “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.
Error Messages Output Listings and Error Handling 1301 Conflicting values given for 'highrequestors'. Cause. You gave the -set highrequestors option more than once on the command line, with different attribute values. (The possible values are “on” and “off”.) You can give the option more than once, but only if you specify the same value each time. Effect. Fatal error (eld immediately stops without creating an output file). Recovery.
Error Messages Output Listings and Error Handling 1306 Conflicting values given for 'heap_max'. Cause. You gave the -set heap_max option more than once on the command line, with different numbers specified as the attribute value. You can give the option more than once, but the numerical value that you specify must be the same each time. Effect. Fatal error (eld immediately stops without creating an output file). Recovery.
Error Messages Output Listings and Error Handling Cause. You gave the -libname or -set libname option(s) more than once on the command line, with different filenames specified for the user library. You can give these options more than once, but the name that you specify must be the same each time (except for lower case versus upper case). Effect. Fatal error (eld immediately stops without creating an output file). Recovery.
Error Messages Output Listings and Error Handling Cause. You gave a -set systype or -change systype option. The next token on the command line must be either “guardian” or “oss”, 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. 1315 Conflicting values given for 'systype'. Cause.
Error Messages Output Listings and Error Handling 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 in and because they are different sizes. Cause.
Error Messages Output Listings and Error Handling 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. 1323 One or more options were given that are not allowed with the -change option.
Error Messages Output Listings and Error Handling 1326 Multiple specifications of -soname or -dllname options with different filenames. Cause. You gave the -dllname option (or its synonym, the -soname option) more than once on the command line. This option tells the “DLL name” to be placed inside the DLL that you are creating, but you specified different DLL names. You can give this option more than once, but only if you specify the same DLL name. Also note that case is significant for this check. Effect.
Error Messages Output Listings and Error Handling Effect. Fatal error (eld immediately stops without creating an output file). 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.
Error Messages Output Listings and Error Handling 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 has been changed to in file . Cause. You specified a -change option, and this message tells you that it succeeded, changing a certain attribute within a certain file to a certain value, as shown in the message. Effect. Information (This is not indicative of a problem).
Error Messages Output Listings and Error Handling you are not trying to do that, then don’t specify the -temp_r option, the must_use_rname option, or any option whose name begins “-grow”. 1334 The -check_registry and -update_registry options cannot both be given. 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.
Error Messages Output Listings and Error Handling 1337 Multiple values specified for the -instance_data option. Cause. You gave the -instance_data option more than once on the command line, and you specified a different value for it each time. You can give this option more than once, but only if you specify the same value each time. Effect. Fatal error (eld immediately stops without modifying the file). Recovery.
Error Messages Output Listings and Error Handling 1340 The
Error Messages Output Listings and Error Handling Recovery. The -instance_data option is a speical option that should only be used when you know why you are using it. If you need to use it, decide which value you need to specify, and spell it correctly. Case doesn’t matter, but other than that it must be exactly as shown in the manual. 1343 is neither a linkfile, DLL, or program. Cause.
Error Messages Output Listings and Error Handling 1348 DLL registry not found. Cause. You gave the -check_registry option, to tell eld the name of an existing private DLL registry for eld to use during the link, but no such file exists. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. Check that you spelled the name of the private DLL registry correctly. 1349 You are building a program or a DLL, and you have both resident code and writeable data.
Error Messages Output Listings and Error Handling Recovery. This indicates some problem with the procedure for building and installing the NSK operating system, which is beyond the scope of this document. 1351 Conflicting verbosity options: and . Cause. The -verbose, -warn, and -no_verbose options are mutually exclusive, and you specified more than one of them.
Error Messages Output Listings and Error Handling option names beginning with an “o” are “-obey” and “-optional_lib”, and they must be spelled exactly that way, except for case. 1356 Options to specify how unresolved references should be handled would be allowed if you were making a zimpimp file, but because the DLL on the command line is not an implicit DLL, you are instead making an ordinary import library, in which case such options are not allowed. Cause.
Error Messages Output Listings and Error Handling Cause. You used the -instance_data option, which affects the layout of the program or DLL that you are creating, 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 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). Recovery.
Error Messages Output Listings and Error Handling 1362 DLL registry line : encountered a bad character within a number. Cause. While reading the private DLL registry that was specified for this link in the check_registry or -update_registry option, at the line indicated in the message, eld expected to see a number, and the next thing in the file looked like the beginning of a number, but then invalid characters were seen. A number needs to be followed by white space to show where the number ends.
Error Messages Output Listings and Error Handling Recovery. If you want to specify this option, only specify one filename. 1370 Multiple specifications of the -temp_o option with different filenames. Cause. You gave the -temp_o option more than once on the command line. This option tells the name of a file to use as a temporary file while creating the output file. You can give this option more than once, but only if you specify the same filename. Effect.
Error Messages Output Listings and Error Handling 1373 Unrecognized parameter to the -unres_symbols option. 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. Fatal error (eld immediately stops without creating an output file). Recovery.
Error Messages Output Listings and Error Handling Recovery. If you want to specify this option, decide which filename you want to specify, and only specify that one. 1377 Multiple specifications of the -check_registry option with different values. Cause. You gave the -check_registry option more than once on the command line, with different names given for the parameter, to tell the name of the private DLL registry file.
Error Messages Output Listings and Error Handling Cause. The-make_import_lib option creates an import library to represent one or more other DLLs that already exist. Only certain other options are allowed in conjunction with the -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.
Error Messages Output Listings and Error Handling Cobol source code, and can also be done by a link a link step that uses both the -e and -r options. The procedure so marked is the one where execution begins, when your object file is linked into a program. eld found two different procedures that were each marked this way, as indicated in the message, and that is an error. Effect.
Error Messages Output Listings and Error Handling 1395 : is in , which is not a code section. Cause. This message indicates a problem with the contents of the specified input filename, so that eld refuses to process the file. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. This is a bug that needs to be reported to HP.
Error Messages Output Listings and Error Handling __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. Effect. Fatal error (eld immediately stops without creating an output file). Recovery.
Error Messages Output Listings and Error Handling according to the name of the “data section” in which the data was placed by the compiler. eld considers the data sections named “.data”, “.data1”, “.sdata”, “.sdata1”, “.bss”, and “.sbss” to all be “standard, writeable” data sections, and different copies of a data item can be in different sections of these names without getting a complaint. The same goes for the “standard, readonly” data sections, which are named “.rdata”, “.srdata”, “.rodata”, “.
Error Messages Output Listings and Error Handling 1496 Specified file 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.
Error Messages Output Listings and Error Handling option. If you want to independently specify where each segment should move, then specify both the -t and -d options. 1499 The value of the -t option was rounded up to . Cause. You specified the -alf option with the -t option, to repeat the fixup process on an existing DLL while specifying a new address for its code segment.
Error Messages Output Listings and Error Handling 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. There are two relocation tables, named “.rela.dyn” and “.rela.gblzd”, and the message tells you which table had the bad entry in it, and which entry it was.
Error Messages Output Listings and Error Handling 1509 Cannot (re-)create ; naming the output file instead. Cause. This message can come out either when you give the -alf option, or the strip option, or the -r option when there is exactly one input object file.
Error Messages Output Listings and Error Handling address of the DLL. However, you are not allowed to change the address of a program with the -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. If you want to change the address of a program, you can not.
Error Messages Output Listings and Error Handling 1515 Multiple specifications of the -gateway_template option with different filenames. Cause. The -gateway_template option tells the name of a template file that is used for overriding the standard gateway format when you are building a DLL that contains callable procedures. You gave this option more than once, specifying different filenames each time. Effect.
Error Messages Output Listings and Error Handling Cause. You wrote a callable procedure, and the object file produced by the compiler is supposed to tell how many parameters it has, which should be a number between 0 and 32. However, the object file said something else. Effect. Fatal error (eld immediately stops without creating an output file). Recovery.
Error Messages Output Listings and Error Handling for your “main” procedure in C to have the CALLABLE attribute, and that is a perfectly normal way to make your program run in privileged mode (although certain initialization activities will have taken place before it became privileged). 1521 The main entry point()is not in a code section. Cause.
Error Messages Output Listings and Error Handling Recovery. Remove the offending option. 1524 You can put one filename on the command line with the -alf option, to be the zimpimp file, but more than one filename is an error. Cause. You specified the -alf option, telling the name of the program or DLL that you want to update. Various other options are allowed with the -alf option, and some of these other options also have filenames as parameters.
Error Messages Output Listings and Error Handling 1528 Cannot preset because . Cause. You gave the -must_preset option, to say that eld should consider it an error if it couldn’t correctly perform fixups, and that is what happened. There are many reasons why fixups might not have been possible, and the message tells the reason that occurred. Effect. Fatal error (eld immediately stops without creating an output file). Recovery.
Error Messages Output Listings and Error Handling 1530 Using the zimpimp file . 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). Recovery. No action required. 1532 User_callable and kernel_callable procedures are both present. Cause.
Error Messages Output Listings and Error Handling 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). Recovery.
Error Messages Output Listings and Error Handling Effect. Fatal error (eld immediately stops without creating an output file). Recovery. This indicates some problem with the procedure for building the NSK operating system, which is beyond the scope of this manual. 1537 The file named , which should be a zimpimp file, is not a zimpimp file. Cause. The zimpimp file is a file that tells eld about the symbols in system library. eld has various methods of locating this file.
Error Messages Output Listings and Error Handling Cause. The -public_registry option specifies the name of a public DLL registry file, which eld uses to look up information about the operating system and other standard DLLs. You gave this option twice on the command line, and you specified different names each time, which is an error. Note that case is significant for this check. Effect. Fatal error (eld immediately stops without creating an output file). Cause.
Error Messages Output Listings and Error Handling two statements or between two attributes. The message tells the line number at which this occurred in the file. 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. Recovery.
Error Messages Output Listings and Error Handling 1543 While looking for the next attribute in a statement, starting at line of the public DLL registry file , went off the end of file. Cause. eld uses the public DLL registry file to look up information about the operating system and other standard DLLs. There are various ways that eld may find this file. For example, if you are running eld on TNS/E then the operating system tells eld where the file is.
Error Messages Output Listings and Error Handling the official version of the public DLL registry automatically. If you specify this option, it is your responsibility to provide eld with a correct public DLL registry file, and it is beyond the scope of this manual to describe how this file should be created. If eld could not find it on its own, and you didn’t specify the -public_registry option, then there is something wrong with your installation.
Error Messages Output Listings and Error Handling before seeing the filename. The message tells the line number at which this attribute began in the file. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If you specified the -public_registry option, are you sure you need to do that? There usually is no need to give this option, because eld should be able to find the official version of the public DLL registry automatically.
Error Messages Output Listings and Error Handling Recovery. If you specified the -public_registry option, are you sure you need to do that? There usually is no need to give this option, because eld should be able to find the official version of the public DLL registry automatically. If you specify this option, it is your responsibility to provide eld with a correct public DLL registry file, and it is beyond the scope of this manual to describe how this file should be created.
Error Messages Output Listings and Error Handling parses the contents of the file into “statements”, which in turn can have “attributes”, and a “dll” statement always contains a “file” attribute, which tells the DLLs name. This particular message comes out when eld saw two different “dll” statements with the same name. Effect. Fatal error (eld immediately stops without creating an output file). Recovery.
Error Messages Output Listings and Error Handling Recovery. It is not necessary to have references fixed up at link time. However, normally, eld should find the public DLL registry file. So, this may indicate that there is something wrong with your installation. The process of creating and installing the public DLL registry file is beyond the scope of this manual. 1553 is an archive, but eld was expecting a zimpimp file. Cause.
Error Messages Output Listings and Error Handling installation. The procedure for creating and installing a public DLL registry file is beyond the scope of this manual. 1555 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.
Error Messages Output Listings and Error Handling same DLL name as the user library, but it is not the same file, nor does it look like a copy of the same file. Effect. Warning (eld produces an output file, but it might not be what you intended). Recovery. This is not necessarily an error, although it may indicate that you didn’t do what you intended to do. The DLL mentioned in the message will be used by eld during this link.
Error Messages Output Listings and Error Handling Cause. You used the -local_libname option, which tells eld where to find a copy of the user library for the program that you are building, 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). Recovery. If your intention is to create a program, specify that correctly.
Error Messages Output Listings and Error Handling 1563 File , specified as the user library, is a linkfile. Cause. You are creating a program that has a user library, and you have given eld the filename for a copy of the user library, by specifying the -local_libname, libname, or -set libname option. A user library is a DLL. However, eld opened the user library and found that it wasn’t a DLL but instead was a linkfile, i.e.
Error Messages Output Listings and Error Handling Cause. You used the -export_all option, to tell eld that all normal global symbols should be exported from the program or DLL being created. Or, you may have used the -ul option, which implies the -export_all option. But, 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 or DLL. Effect.
Error Messages Output Listings and Error Handling in the input object files, and are visible outside their own compilations, can be exported, and such a symbol of this name did not exist. 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). Recovery. Check that you spelled the name of the symbol correctly. In pTAL or Cobol, for example, it must be given in upper case.
Error Messages Output Listings and Error Handling 1572 The -hidden_symbol is not defined in any of the input linkfiles. Cause. You gave the -hidden_symbol option (or its synonym, the -export_not option) to say that a certain symbol should not 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.
Error Messages Output Listings and Error Handling the filename for a copy of the user library that the program uses. However, the file that you specified in the -alf option is a DLL, not a program. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If your intention is to use the -alf option to update an existing DLL, then don’t specify the -local_libname option.
Error Messages Output Listings and Error Handling Cause. The -temp_i option tells the name of a temporary file that you want eld to use to save the import library that it is creating, if it can’t create it with the name you preferred, as specified by the -import_lib or -make_import_lib option. The must_use_iname option says that it should be an error if eld can’t create the import library with the name you preferred. So, these are inconsistent. Effect.
Error Messages Output Listings and Error Handling 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. Effect. Fatal error (eld immediately stops without creating an output file). Recovery.
Error Messages Output Listings and Error Handling 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 , is defined, and is renamed to , but that symbol is also already defined in this file. Cause. You gave a -rename option, specifying that a symbol should be renamed.
Error Messages Output Listings and Error Handling Effect. Fatal error (eld immediately stops without creating an output file). Recovery. Did you really want to specify the -d option when you (previously) built this DLL? There usually is no reason to do that.
Error Messages Output Listings and Error Handling option does this if you specify the -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. In any other case, you should not specify the -update_code option.
Error Messages Output Listings and Error Handling Cause. Each of the two files mentioned in the message defined procedures of the same name, as shown in the message. There are procedures that are specially created by the C++ compiler, where the compiler marks them to say that duplicates are okay, but at least one of the copies of this procedure was not so marked. Also, you did not specify the -allow_duplicate_procs option. So, the duplicates are not allowed. Effect.
Error Messages Output Listings and Error Handling items were created by the C++ compiler, and not marked to say that duplicates are okay, but you need to write your C++ code differently or use different compiler options so that the compiler does say that the duplicates are okay. The details of these C++ rules are also beyond the scope of this manual. 1598 Illegal duplicate definition of the procedure in and because of a procedure attribute mismatch. Cause.
Error Messages Output Listings and Error Handling together you must specify the -set process_subtype option again to resolve the ambiguity. 1601 Different values were specified for the process subtype in and ; the value given in the -set process_subtype option was used. Cause.
Error Messages Output Listings and Error Handling Cause. As part of the rules for the TNS/E software architecture, there is a restriction on the types of object files that can be given to the linker. An exact statement of the restriction is hard to give, but here is the general idea. The code within an object file can be divided into multiple “sections”. You will probably run into the limitation if any one of these code sections is close to 16 megabytes in size.
Error Messages Output Listings and Error Handling instead directly build a program or DLL out of your input files, because there is no restriction on the final program or 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. Cause.
Error Messages Output Listings and Error Handling Recovery. This indicates a problem with your installation. The process for creating the zimpimp file, installing it in the right place, and providing the system call that eld uses to find the zimpimp file, is beyond the scope of this document. 1608 The
Error Messages Output Listings and Error Handling specified for the process subtype. The new file that eld creates will have the process subtype that you specified this time, not the value that was in the previous file. Effect. Warning (eld produces an output file, but it might not be what you intended). Recovery. Assuming you gave the file the wrong process subtype before, or had some other reason to change it now, no action is required.
Error Messages Output Listings and Error Handling 1615 DLL registry, line : the new DLL is listed multiple times in the registry. Cause. The private DLL registry that was specified for this link in the -check_registry or -update_registry option contained more than one -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).
Error Messages Output Listings and Error Handling Cause. The sizes listed for DLLs in a private DLL registry must be multiples of 64KB if the linker is not building an implicit DLL, or 128KB if the linker is building an implicit DLL (i.e., a component of system library). However, that rule was violated by the range command on the indicated line number of the file. That could be because the file was incorrectly edited by hand.
Error Messages Output Listings and Error Handling Cause. You gave the -check_registry command, to specify that the starting address for the DLL being created by this link is to be taken from the indicated private DLL registry file. However, that DLL was not listed in the private DLL registry file. Effect. Fatal error (eld immediately stops without creating an output file). Recovery.
Error Messages Output Listings and Error Handling which can’t, or maybe just allowing them to take up more space. Perhaps there are entries in the private DLL registry that you don’t need. You can just delete those lines of the registry by hand, or you could start over with a new registry and relink all the DLLs you really need, so you only have entries for them in the new registry. Note that the registry keeps track of the filenames that you create.
Error Messages Output Listings and Error Handling 1626 Cannot create the DLL registry ; using this name instead: . Cause. You are trying to update a private DLL registry. eld first makes a new copy of it in a temporary location, deletes the previous copy of the registry, and then renames the temporary file to the final location. That process failed. The file has instead been left with a different name, as shown in the message. Effect.
Error Messages Output Listings and Error Handling 1629 Different values specified with multiple -set user_buffers options. Cause. You gave the -set user_buffers option more than once on the command line, with different attribute values. (The possible values are “on” and “off”.) You can give the option more than once, but only if you specify the same value each time. Effect. Fatal error (eld immediately stops without creating an output file). Recovery.
Error Messages Output Listings and Error Handling 1632 Can’t open public DLL file named or . Such a file should be in the same place as the zreg file, . Cause. eld was searching for a DLL, and you were using either the PC or OSS version of eld, rather than the Guardian version.
Error Messages Output Listings and Error Handling 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. Effect. Fatal error (eld immediately stops without creating an output file). Recovery. If your intention is to create a program, then don’t specify the -r option.
Error Messages Output Listings and Error Handling Effect. Fatal error (eld immediately stops without creating an output file). Recovery. Assuming you really do want to specify this option, give the correct parameter(s) to it. 1640 No filename was specified for the libname attribute of the
Error Messages Output Listings and Error Handling Recovery. If you really wanted to use a name that begins with an equal sign in this context, you can’t. On the PC or OSS, the Guardian DEFINE mechanism is not present, so you need to directly specify the intended filename. 1657 Common data is larger in size, possible loss of data. Cause. Multiple global symbols are present in the link files. The common data file is larger in size than the defined data file. Effect.
Glossary of Errors Output Listings and Error Handling For details on Cause and Recovery, see eld Functionality for 64-Bit on page 4-12. Effect. Fatal error. eld stops immediately without creating an output file. 1668 Using , even though it does not have the desired data model. For details on Cause and Recovery, see eld Functionality for 64-Bit on page 4-12. Effect. Warning.
Glossary of Errors Output Listings and Error Handling There is also a main Glossary at the end of this reference manual that contains explanations of the major concepts in linking and loading files on a TNS/E system. Archive. An archive is a file that contains within it one or more files, called the members of the archive. 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.
Glossary of Errors Output Listings and Error Handling 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). ELF. This is the name for the industry-standard object file format upon which our object files are based. Export.
Glossary of Errors Output Listings and Error Handling Import library. An import library is a file that is like a DLL but only with the header information. It can be used by eld to resolve references when building another program or 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.
Glossary of Errors Output Listings and Error Handling correctly specified a filename that eld needed to open, but eld says it can't open it, then you need to figure out why that is so. It may be that the file does not exist, or it may be that the file exists but you do not have permission to open it. If it is a file that eld only needs to read, then you would generally only need permission to read it, not write it. Option names.
Glossary of Errors Output Listings and Error Handling the places eld looks for the archive or DLL are the directories or subvolumes specified by -L options. It is usually an error if the search does not find something, but you can override that with the -allow_missing_libs option. Section. An object file contains "sections", which have names, and sometimes the names imply properties of the section, such as whether the section contains code or data.
Glossary of Errors Output Listings and Error Handling controls whether eld considers unresolved references to be errors, warnings, or neither. User library. A user library is a DLL. A program is allowed to specify at most one user library that it will need at runtime, and the user library is specified by storing its 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.
Glossary of Errors Output Listings and Error Handling eld Manual—527255-009 6-132
A TNS/E Native Object Files This appendix contains the following information: The Object File Format - the types of object files and their content. Code and Data Sections - the "ordinary" code and data sections that come from application source code, possibly with additions by the compiler or linker. Relocation Tables - when code is relocated, who resolves the address and prepares relocation tables? Finding Information About Procedures and Subprocedures in Linkfiles - an introduction to the .
Types of TNS/E Object Files TNS/E Native Object Files Types of TNS/E Object Files There are the following four types of TNS/E object files. Table A-1. Types of TNS/E Object Files Type of Object File Description Linkfile This is the term for the object files that are produced by a compiler or by the assembler, and can be given as input to the linker. It is also possible for the linker to produce a linkfile as output when run with the -r option. Program This is the term for a main program.
TNS/E Native Object Files How to Distinguish the Different Types of Object Files linker can use an incomplete import library to check for unresolved references, but not to preset. DLLs and import libraries can also be used at compile time by the COBOL compiler to find out information about procedure call interfaces. 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.
Summary of the Contents of an Object File TNS/E Native Object Files Stack Unwinding Information (.IA_64.unwind and .IA_64.unwind_info) Text Sections (sections whose names begin .text or .restext) User Data Sections (.data and .data1, .sdata and .sdata1, .bss, .sbss, .rdata and .rodata, .srdata and .srodata, and .rconst) A .tandem_info section (possibly abbreviated to four bytes) The .procinfo and .procnames Sections DWARF Symbol Table Sections Relocation Table Sections (.rela.x, where .
Summary of the Contents of an Object File TNS/E Native Object Files Table A-2. Contents of a Loadfile or Import Library GPRelative Loadfile Contents Import LIbrary ELF Header X ELF Program Headers X .tandem_info X .lic .dynamic X .liblist X .dynsym.gblzd X .hash.gblzd X .hashval.gblzd .rela.gblzd X .dynstr2 .IA_64.unwind .IA_64.unwind_info .IA_64.unwind.strings .rconst .plt .restext .text .hash X .dynsym X .dynstr X .hashval .rela.dyn .gateway - for a program .
Summary of the Contents of an Object File TNS/E Native Object Files Table A-2. Contents of a Loadfile or Import Library GPRelative Loadfile Contents Import LIbrary (for a DLL) .gateway DWARF Symbol Table Sections .source.rdtu (if present, there are three of them.) .object.rdtu (if present, there are three of them.) X .shstrtab X ELF Section Headers X Note that the sections from .got through .
Summary of the Contents of an Object File TNS/E Native Object Files .liblist Section In a loadfile, this tells the names of the DLLs that were in the linker command stream when the linker built this loadfile. In an import library that represents a single DLL it contains the same information as in that DLL. .dynsym.gblzd Section This is a symbol table section, similar to the .dynsym section (see below), but just for globalized symbols. It may be present in loadfiles and import libraries. .hash.
Summary of the Contents of an Object File TNS/E Native Object Files Text Sections Text sections contain application-defined executable code (procedures). The object file design also allows them to contain data, but that is not expected to happen. In linkfiles, there can be any number of text sections. Their names must begin either .text or .restext, corresponding to whether they contain non-resident or resident text, respectively. In loadfiles, all the sections that had names beginning .
Summary of the Contents of an Object File TNS/E Native Object Files .rdata Section This contains application-defined initialized data that does not get modified at runtime (although the initial values may be addresses that need modification when the loadfile is first brought into memory). .fptr Section This section contains official function descriptors. An official function descriptor contains the address and GP value for a procedure that exists in this loadfile.
Summary of the Contents of an Object File TNS/E Native Object Files to zero. The object file design supports such sections, although compilers might not use them. .bss Section This contains application-defined uninitialized data, but this section doesn’t have the restriction that makes it possible to put data into the .sbss section. It occupies no space in an object file, but rather reserves memory space that is automatically initialized to zero.
Code and Data Sections TNS/E Native Object Files Object RTDU Sections An object RTDU, which is part of the SQL/MP implementation, can be placed into a program by a tool named SQLCOMP. The object RTDU is represented by three sections. .shstrtab Section This is a string space that is pointed at from the ELF section headers. It is required.
User Code TNS/E Native Object Files User Code In linkfiles there can be many text sections. The sections whose names begin .text contain procedures and subprocedures that are not resident. The sections whose names begin .restext contain procedures and subprocedures that are resident. When the linker is building a new linkfile it concatenates each of the text sections from the various input files into a section of the same name in the output file.
User Data TNS/E Native Object Files exported from its loadfile, it might also be found in the ELF symbol table of a linkfile, or the dynamic symbol table of a loadfile or import library. User Data The .data (and .sdata) sections are for initialized data, while .bss (and .sbss) are for uninitialized data. However, if a data item is initialized to all zeros, the compiler may treat it as uninitialized data.
The MCB (Master Control Block) TNS/E Native Object Files The MCB (Master Control Block) The linker adds the MCB to the .data section of a program (or creates a section of this name if there was none before). The MCB is a data item that can be referenced by the name _MCB within the program. The linker only creates the MCB in programs (not DLL's), and only if the program makes a reference to the symbol named _MCB. This is a description of the fields that are nonzero in the MCB of an object file.
Predefined Symbols TNS/E Native Object Files Table A-3. Additional Predefined Symbols Optionally Created By The Linker In Loadfiles Name Meaning Value of st_shndx _BASE_ADDRESS The address of the text segment. The index of the .text section. _DYNAMIC The address of the .dynamic section. The index of the .dynamic section. _unwind The start of the .IA_64.unwind section. The index of the .IA_64.unwind section, or SHN_ABS (see the explanation below). _unwind_size The number of entries in the .
Relocation Tables TNS/E Native Object Files Relocation Tables It is possible that the contents of one place in the code or data of an object file need to be filled in with the address of another place in the code or data, or in some other way based on such an address. If the compiler or assembler knows what needs to go there, without later modification by the linker or runtime loader, then that's the end of the story.
Relocation Tables TNS/E Native Object Files In linkfiles, relocation table entries always completely describe what needs to be filled in at the corresponding relocation sites. So, it doesn't matter what is actually in the operands at the relocation sites. In fact, what is there should be zero, with the following two exceptions: The value "-1" is filled in for relocation sites that point from DWARF information at executable code, when they correspond to unused copies of procedures.
Relocation Tables TNS/E Native Object Files extract the target and relocation type from the r_info field, or reconstruct the r_info field from its two pieces: #define ELF64_R_SYM (i) ((i) >> 32) #define ELF64_R_TYPE (i) ((i) & 0xffffffff) #define ELF64_R_INFO (s,t) (((Elf64_Xword)(s) << 32) + (Elf64_Xword)(t)) The target symbol is an index into the .symtab section in the case of a linkfile, or into the .dynsym or .dynsym.gblzd section in the case of a loadfile.
Relocation Tables TNS/E Native Object Files Table A-4. Relocation Types Name Value Description R_IA_64_GPREL22 0x2a 22-bit GP-relative address of a data item. R_IA_64_GPREL64I 0x2b 64-bit GP-relative address of a data item. R_IA_64_LTOFF22 0x32 22-bit GP-relative address of a .got section entry. R_IA_64_LTOFF64I 0x33 64-bit GP-relative address of a .got section entry. R_IA_64_PLTOFF22 0x3a 22-bit GP-relative address of a local function descriptor.
Relocation Tables TNS/E Native Object Files R_IA_64_IMM64 -- Virtual Address of a Symbol in Code This applies to the situation when the compiler or assembler knew that it was compiling code that would not be moved at runtime and that the referenced symbol would also be within the same loadfile and could not be preempted at runtime. In this case, the compiler or assembler can generate (non-PIC) code where the virtual address of a symbol is placed directly into the code.
Relocation Tables TNS/E Native Object Files In more detail, the reference must also be within the data segment, not the text segment, of the loadfile. This is a requirement because the text and data segment could get rebased by different amounts at runtime, changing the GP-relative addresses of items in the text segment, but such references can't be updated at load time.
Relocation Tables TNS/E Native Object Files subtracting the value of the GP register for this loadfile from the address of this local function descriptor. This relocation table entry is not present in loadfiles. The linker would instead generate a relocation table entry of type R_IA_64_IPLTMSB to describe the local function descriptor. R_IA_64_FPTRx -- Virtual Address of an Official Function Descriptor This applies to the situation when a data item is initialized with the address of a procedure.
Relocation Tables TNS/E Native Object Files In both cases, if the IP-relative branch was a 21-bit variety, it might not be possible for it to reach its destination. In such a case the linker would allocate a branch stub that was close enough. The branch stub would use a code sequence that enabled it to reach the target procedure or import stub, and the original instruction would be updated to reach the branch stub. R_IA_64_LTOFF_FPTR22 -22-Bit GP-Relative Address of the .
How -alf Updates DWARF TNS/E Native Object Files R_IA_64_REL64MSB implicitly applies to all the non-zero entries in the initialization and termination routines created by the linker, whose addresses are indicated by fields in the .tandem_info section, and to each half of each official function descriptor found in the .fptr section.
How -alf Updates DWARF TNS/E Native Object Files contains one of the following two values, which match the values for relocation types used elsewhere in object files: #define R_IA_64_REL32MSB0x6c #define R_IA_64_REL64MSB0x6e If REL32MSB is present, that means it is a 32-bit address. If REL64MSB is present, that means it is a 64-bit address. The remaining 56 bits of the 64-bit entry tell the file offset of that address, from the beginning of the object file.
Finding Information About Procedures and Subprocedures in Linkfiles TNS/E Native Object Files Finding Information About Procedures and Subprocedures in Linkfiles The linker obtains information about procedures and subprocedures from the .procinfo and .procnames sections of linkfiles.
Archives TNS/E Native Object Files This is the main section of DWARF information. It is a tree of nodes, each node contains various attributes. .debug_abbrev This section provides additional information required to decode the information in the .debug_info section, including information about implementation-defined material. .debug_line This section contains information that tells how to map things to source line numbers. .debug_line_nsk This has a format similar to .
Archives TNS/E Native Object Files Here is the declaration for the ar_hdr structure: typedef struct ar_hdr { char ar_name [16]; char ar_date [12]; char ar_uid [6]; char ar_gid [6]; char ar_mode [8]; char ar_size [10]; char ar_fmag [2]; } ar_hdr; The size of this structure is 60 bytes. The ar_size field tells the size of the contents of this piece of the archive, and the ar_name field tells its name. When the name is less than 16 characters long, the rest of the field is filled with blanks.
Tools That Work With Object Files TNS/E Native Object Files The following is a summary of what is in an archive. Horizontal lines separate pieces of the archive. This example shows the case when there is a symbol table and a long member name string space. ! _______________________________ ar_hdr for the symbol table the number of symbols in the symbol table file offset for the member that defines the first symbol file offset for the member that defines the second symbol ...
Tools That Work With Object Files TNS/E Native Object Files • 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.
Glossary Archive file. This file contains copies of other files, called the "members" of the archive. An archive may be used for various purposes, one of which is to be an input for the linker. The linker uses archives as a source of linkfiles. Archives are not used at load time. Big endian. This term describes a method of storing data so that the most significant byte appears in a lower-numbered location in memory. As with TNS/R, TNS/E data structure is big endian.
Export. Glossary Export. To provide a symbol definition for use by other loadfiles. A loadfile offers for export a symbol definition for use by other loadfiles that need a data item or function having that symbolic name. Gateway. For every callable function there is a gateway; all calls to the function jump first to the gateway, which effects the transition to privileged state if the caller is not already privileged.
Indirect reference (of a loadfile). Glossary and run. It is useful in cross-linking. See Implicit library import library (imp-imp) and Zimpimp file. Indirect reference (of a loadfile). A library in a loadfile’s searchList that is not named in its libList. Instance. A particular case of a class of items, objects, or events. For example, a process is defined as one instance of the execution of a program; multiple processes might be executing the same program simultaneously.
Loadfile Glossary Loadfile. hThis term describes the input to the runtime loader and default output of the linker. This object file may contain name references to symbols that exist in other loadfiles in the same process. Such references are typically resolved when the loadfiles are brought into memory by the runtime loader rld . This term is synonymous with the term "executable" file. An executable object code file is one that is ready for loading into memory and executing on the computer.
Program Glossary mapped to different addresses for different processes in the same CPU. PIC introduces several new elements into ELF files, some of which are adapted from the Intel LP64 ELF structure. TNS/E supports only PIC files. TNS/R supports PIC and nonPIC file types. Program. This term describes one type of loadfile that is capable of being run on the system. This is the main program and there can only be one program associated with a process. Public Libraries.
Strip file Glossary each of these section items. A section is not required to be present if it would not contain any useful information for a given object file. In loadfiles, some of the sections are further organized in segments that get loaded into virtual memory. Strip file. These are files do not have debugging information; i.e., DWARF symbol table, in it. Stripping can be done on any object file.
TNS/E object file format Glossary the processor generates a fault to allow software to find and load the missing entry from a memory-management structure. TNS/E object file format. This object file format is an amalgam of Intel IA-64 code architecture and the HP NonStop operating system extensions. TNS/E object files are categorized into three types of files: linkfiles, loadfiles, and import libraries.
Zreg file Glossary Zreg file. This is the internal name of the public DLL registry file, which lists the names of all the public DLL's.
Index A Export Glossary-2 F Adjust LoadFile 4-1 adjusting loadfiles 4-1 Archive file Glossary-1 Archives, use of 2-16 File code 700 1-3 File code 800 1-3 Filenames 2-2 Finally, on Guardian or OSS 2-17 Finding archives and DLLs 2-17 Finding public DLLs 2-18 B Big endian Glossary-1 Binding references 3-1 Bundle Glossary-1 G C Client (of a loadable library) Glossary-1 Code file Glossary-1 common data 3-22 Gateway Glossary-2 gateway segment 2-6 Gblzd Glossary-2 Globalized import Glossary-2 Globalized sy
L Index L LibList Glossary-3 liblist 2-12 Libname Glossary-3 Library Glossary-3 LIC Glossary-3 LIC creation 3-7 LIC - Library Import Characterisation 3-7 Linker Glossary-3 linker command stream 1-5 Linker platform Glossary-3 Linkfile Glossary-3 Linkfile definition 1-4 Loadable Library Glossary-4 Loader Glossary-3 Loader Library Glossary-4 Loadfile Glossary-4 LoadList Glossary-4 Localized Glossary-4 M main entry point 4-17 MAP DEFINES 2-3 master control block 4-15 MCB. The Master Control Block.
T Index Special Characters Symbolic reference Glossary-6 System library Glossary-6 system library 3-22, Glossary-4 T TACL 3-10 target platforms 2-2 text section 3-21 The linker checks 2-18 The public-DLL registry file (ZREG) 3-23 the search path for -alf 4-3 The ZREG file 3-22 There is also an exception 2-18 TLB Glossary-6 TNS/E Glossary-6 TNS/E object file format Glossary-7 TNS/R Glossary-6 -alf option looks for DLLs 4-3 -b globalized 3-3 -b localized 3-3 -b semi_globalized 3-3 -e option 4-17 -export_