background image

eld Manual

Abstract

This manual describes how programmers can use 

eld

, the object file linker for TNS/E, 

to create loadfiles for execution on HP Integrity NonStop™ NS-series servers. 

Product Version

N.A.  

Supported Release Version Updates (RVUs)

This publication supports J06.03 and all subsequent J-series RVUs and H06.01 and all 

subsequent H-series RVUs, until otherwise indicated by its replacement publications.  

Part Number

Published

527255-009

February 2012

Summary of Contents for eld

Page 1: ...r execution on HP Integrity NonStop NS series servers Product Version N A Supported Release Version Updates RVUs This publication supports J06 03 and all subsequent J series RVUs and H06 01 and all subsequent H series RVUs until otherwise indicated by its replacement publications Part Number Published 527255 009 February 2012 ...

Page 2: ...Document History Part Number Product Version Published 527255 004 N A July 2005 527255 005 N A May 2010 527255 007 N A August 2010 527255 008 N A May 2011 527255 009 N A February 2012 ...

Page 3: ...d Motif are trademarks of the Open Software Foundation Inc OSF MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THE OSF MATERIAL PROVIDED HEREIN INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OSF shall not be liable for errors contained herein or for incidental consequential damages in connection with the furnishing performance or use of thi...

Page 4: ......

Page 5: ...on 1 3 Native Object Files 1 3 The Linker Command Stream 1 5 Obey Files and the Use of Standard Input 1 7 Example of Use 1 9 2 eld Input and Output Host Platforms 2 1 Target Platforms 2 2 Filenames and The File Identifier 2 2 Output Object Files 2 4 The Creation of Output Object Files 2 5 Creating Segments of the Output Loadfile 2 6 Using a DLL Registry 2 8 Input Object Files 2 12 Using Archives 2...

Page 6: ... Input Linkfiles 3 21 Public Libraries and DLLs 3 22 The Public Library Registry 3 23 Finding and Reading The Public DLL Registry ZREG File 3 23 4 Other eld Processing Adjusting Loadfiles The alf Option 4 1 Additional rules about alf 4 3 The set and change Options 4 8 eld Functionality for 64 Bit 4 12 Checking the C Language Dialect 4 12 Renaming Symbols 4 13 Creating Linker Defined Symbols 4 14 U...

Page 7: ...4 Relocation Tables A 16 How alf Updates DWARF A 24 Finding Information About Procedures and Subprocedures in Linkfiles A 26 The DWARF Symbol Table A 26 Archives A 27 Tools That Work With Object Files A 29 Glossary Index Tables Table 2 1 Parameters to the instance_data Option 2 7 Table 4 1 The set and change Options 4 8 Table 5 1 Set Attributes 5 8 Table 6 1 Completion Codes The Severity Levels of...

Page 8: ...Contents eld Manual 527255 009 iv ...

Page 9: ...acement publications Document History New and Changed Information Changes to the H06 24 J06 13 manual In the section The Steps in Looking for Archives and DLLs on page 2 17 Updated the fourth and fifth step and also added a new content on page 2 17 Updated information on 2 18 In the section Additional rules about alf on page 4 3 Updated the list on page 4 4 In the table The set and change Options ...

Page 10: ...n page 6 125 Added a new message 1668 on page 6 125 Added a new message 1669 on page 6 125 Added a new message 1670 on page 6 125 Added a new message 1672 on page 6 125 Changes to the 527255 008 manual Added a new message 1132 on page 6 20 Changes to the 527255 007 manual Added the following linker options NS_extent_size extent size on page 5 6 NS_max_extents max_extents on page 5 7 warn_common on...

Page 11: ...ed 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 Added the following error messages 1229 to 1232 on page 6 38 1657 1659 and 1660 on page 6 124 ...

Page 12: ...What s New in This Manual eld Manual 527255 009 viii Changes to the 527255 005 Manual ...

Page 13: ...d Output Object Files what forms libraries loadfiles and DLLs that output may take The Creation of Output Object Files how you control that process Creating Segments of the Output Loadfile how parts of a loadfile are created Using a DLL Registry how you can manage DLL addressing Input Object Files which files you can use as input Using Archives how you can group multiple input or output files toge...

Page 14: ...bers valid file types language dialects and so on Processing of Floating Point Versions and Data Models more consistency checks Specification of the Main Entry Point there are two ways to specify the main entry point Specifying Runtime Search Path Information for DLLs eld tells rld where to find the DLLs Merging Source RTDUs used with SQL MP Section 5 Summary of Linker Options consists of a list a...

Page 15: ...rtext Links Blue underline is used to indicate a hypertext link within text By clicking a passage of text with a blue underline you are taken to the location described For example This requirement is described under Backup DAM Volumes and Physical Disk Drives on page 3 2 General Syntax Notation This list summarizes the notation conventions for syntax presentation in most NonStop manuals Some of th...

Page 16: ...kind of string used in the L and first_L options number This indicates a 64 bit numerical value It is interpreted as a hexadecimal number if it begins with 0x 0X h or H in which case the rules given below for a hexadecimal number apply If it has none of these prefixes then it is interpreted as a decimal number and the rest of the token must be a sequence of decimal digits The TNS E linker does not...

Page 17: ...or braces indicates that you can repeat the enclosed sequence of syntax items any number of times For example M address new value 0 1 2 3 4 5 6 7 8 9 An ellipsis immediately following a single syntax item indicates that you can repeat that syntax item any number of times For example s char Punctuation Parentheses commas semicolons and other symbols not previously described must be typed as shown F...

Page 18: ... data to the calling program For example error COMPRESSEDIT filenum i o i i In procedure calls the i i notation follows an input string parameter that has a corresponding parameter specifying the length of the string in bytes For example error FILENAME_COMPARE_ filename1 length i i filename2 length i i o i In procedure calls the o i notation follows an output buffer parameter that has a correspond...

Page 19: ... 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 For example obj type obj name state changed to state caused by Object Operator Service process name State changed from old objstate to objstate Operator Request Unknown Vertical Line A vertical line separates alternatives...

Page 20: ...ied 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 ...

Page 21: ...eld is either a program or a DLL A loadfile contains certain information used to bind references among loadfiles at load time The linker may also look at other DLLs in order to resolve references to them at link time this is called presetting A main program together with the DLLs that it needs directly or indirectly is executed on the HP NonStop operating system A file type of 800 indicates that t...

Page 22: ...libraries bind references against user libraries and import libraries update an existing loadfile with the alf change and strip options The linker does not have a programmatic interface other than starting it as a new process providing it the appropriate inputs and looking at the outputs that it produces There are various ways of invoking the linker such as directly from the command line indirectl...

Page 23: ...object files Native object files are in Executable and Linking Format ELF a standard format used for object files with some HP extensions This manual presents only basic information about these files For details on the structure of native object files for TNS E see Appendix A TNS E Native Object Files and the enoft Manual Native object files are either Linkfiles or Loadfiles but not both The nativ...

Page 24: ... at runtime its filename must be in the Guardian name space An import library can take the place of a DLL at link time One use of import libraries is to save space Another use is for security when it is necessary for the linker to read the header information but it is not desirable for others to be able to see the code Import libraries are further categorized as complete or incomplete The differen...

Page 25: ...to eld In other environments and products similar concepts might go under different names for example OSS calls options flags The linker obtains tokens from the command line by using the argc and argv functions of C The way this works may be dependent on the C runtime implementation but the general idea is that tokens are separated by spaces On the PC it may be useful to include a space within a f...

Page 26: ...t the value comes out the same regardless of how it is written With regard to the set option each combination of the set option with one of its attributes is treated as a single one time option as mentioned in the previous paragraph In other words there are no restrictions on how many times the set option can be given with different attributes If set is specified more than once with the same attri...

Page 27: ...ither the first character in the obey file or it follows white space In this case if it is the last quotation mark on that line eld reports an error Otherwise the characters between it and the next quotation mark are considered to be a single token even if they include white space The linker will then start looking for the next token immediately after the second quotation mark For example if a lin...

Page 28: ...or input That is why a special option such as stdin is necessary to say when input is coming from standard input A special case is made however for the Guardian platform where the linker distinguishes an EDIT file from other types of input files On the Guardian platform if the standard input file is an EDIT type file and nothing is specified on the command line the linker reads that EDIT type file...

Page 29: ...00 main given a list of strings print out them reversed argv 1 argv argc 1 point to strings if no string passed put out usage message and quit for each string reverse it display it int main int argc char argv char ppStr int strLeft int outcome if argc 2 no args passed printf Usage run rev str1 str2 n twhere str is a string to reverse n texample run rev abc zyxw n exit 1 for strLeft argc 1 ppStr ar...

Page 30: ... TNS E compiler ccomp On your system the pathname showing the location of your development tools will be quite different run data01 toolsy02 ccomp in mainstrc mainstro 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 Obj...

Page 31: ...al 0 2 00 00 06 All processes executed in CPU 04 NSR Y Swap volume SPEEDY DATA01 Build the DLL and the Program First we build the DLL then the main executable file called revstr It has to be in that order because the main executable could not refer to a DLL that did not yet exist If the linker s allow_missing_libs option is specified the main executable could be linked befoe the DLL is linked Note...

Page 32: ...ings reported 1 informational message reported Elapsed Time 00 00 01 Now Build the Program The next step is to create the loadfile the whole program by use of the linker ccplmain contains initialization code for the C and C run time libraries Your version of that file will probably be located in system system ccplmain contains external references to errno and environ which are defined in ZCREDLL a...

Page 33: ...b mystrdll lib zcredll lib zcrtldll o revstr L users patrick L data01 toolsy02 verbose INFORMATIONAL MESSAGE 1019 Using DLL users patrick mystrdll INFORMATIONAL MESSAGE 1019 Using DLL data01 toolsy02 zcredll INFORMATIONAL MESSAGE 1019 Using DLL data01 toolsy02 zcrtldll INFORMATIONAL MESSAGE 1530 Using ImpImp file speedy data01 toolsy02 zimpimp Output file revstr program file Output file timestamp ...

Page 34: ...Introduction to eld eld Manual 527255 009 1 14 Example of Use ...

Page 35: ...n link PIC object files into TNS E loadfiles as part of your development cycle on that platform but you will not be able to execute those loadfiles on TNS R The TNS E linker runs on appropriate versions of the Windows operating system on PC s The TNS E linker s features are the same for all host platforms unless otherwise specified in this manual Differences often relate to the different types of ...

Page 36: ...re written and compiled to use it appropriately The target environment does not affect anything else the linker does unless otherwise specified in this document The target environment is indicated within the loadfile by the EF_TANDEM_SYSTYPE bit in the e_flags field of the ELF header The default target environment is guardian for the linker hosted on Guardian The default is oss on the PC The defau...

Page 37: ...at are just written directly on the command line For such command line items eld checks if they begin with equal signs If so in the Guardian case the linker will immediately do the expansion of the DEFINE so that all uses thereafter are the same as if the expanded name had been given originally with one special case described below The expansion of the name should also be done in upper case and th...

Page 38: ...ate a DLL is shared The option dll is accepted as a synonym for shared eld reports an error if you specify more than one of the call_shared r and shared options When a DLL is created its DLL name can be specified with the soname option If the soname option is used the linker accepts whatever string is given for the DLL name exactly as is and without imposing any rules as to which strings are legal...

Page 39: ...sonality the linker gives it mode 777 because it is executable there In all other cases when the linker creates an object file on any version of OSS it gives it mode 666 These modes are octal values and they are AND ed with the value returned by the umask system call Whenever the TNS E linker creates an object file it first creates a work file This file is in the same directory or subvolume as the...

Page 40: ...ough all files with names of the form ZLDAFnnn Alternatively if you specify the must_use_oname option that means eld reports an error if eld cannot delete the existing file and rename the workfile to it This is a better behavior if eld is called from an automated script that knows how to watch out for errors but not how to check for the file being left in a different place The must_use_oname optio...

Page 41: ...rs it to be within the uninitialized data because what is called uninitialized data gets initialized to zero by the operating system That possibly makes the size of the initialized data smaller within the object file Based on this the linker will fill in the p_filesz field of the appropriate program header On the other hand the linker also rounds up this value to a multiple of 4 kilobytes thus pos...

Page 42: ...y a warning message is produced eld reports an error if you specify the t or d option with r Using a DLL Registry The linker uses a DLL registry to manage DLL addresses so that the virtual addresses of some or all of the DLLs being managed by a given registry do not overlap Note that this is a DLL registry managed by the individual user not the public DLL registry covered in Finding and Reading Th...

Page 43: ...are lines whose first two non blank characters are hyphens Each of the other lines of the registry must begin with one of the keywords explained below and the rest of the line provides the parameters for that keyword The keyword and parameters are separated by blanks or tab characters The keyword dllarea if used must be the first keyword in the file It takes two numerical parameters whose format i...

Page 44: ...the linker in the parent directory Or if the filenames were unique in all these directories you might choose to put only the last part of the name into the registry in which case you would have to be within the appropriate subdirectory when building the DLL Or even if you have all your DLLs in one place you still need to be consistent in how you spell their names in o options for example not sayin...

Page 45: ...e of 64KB or 128KB if the linker is building an implicit DLL In this case eld reports an error if the sum of the sizes of all the segments of the DLL including rounding is larger then the value specified in this option rounded up to a multiple of 64KB or 128KB depending on whether it is an implicit DLL If the DLL name was not already listed in the file or didn t fit in the place previously listed ...

Page 46: ...existing private DLL registry before it writes out a new version of it As explained above if the linker can t read it eld reports an error So the temp_r and must_use_rname options are only relevant to situations where the linker had permission to read the existing private DLL registry but not delete it Input Object Files TNS E linkfiles have no object file version number associated with them Loadf...

Page 47: ...not archives b dynamic accept both archives and DLLs These options form a three way switch selecting one of three modes for the linker at a given point in the command stream These options can be specified multiple times in the command stream each time setting the mode for subsequent items in the command stream until the mode is changed again At the beginning of the command stream the mode is b dyn...

Page 48: ...option is specified telling the linker to create a linkfile rather than a loadfile the linker looks for archives and DLLs the same way as in other cases but then the DLLs are ignored Informational messages tell the file names of all the archives and DLLs that were opened by the linker saying for each one whether it is an archive a DLL or an import library If it is an import library the message tel...

Page 49: ... is changed again When reexport is in effect the liblist section entry for a DLL found in the command stream says that it is re exported When no_reexport is in effect it is not re exported At the beginning of the command stream the mode is no_reexport eld reports an error if you use either of these options when not building a DLL The following rules apply to situations where the same file is found...

Page 50: ...ch a symbol without defining it However one difference is that when a symbol really does get declared in a linkfile that declaration tells if the symbol is globalized or not but the u option does not imply anything about whether the symbol is globalized The all option tells the linker to unconditionally use all linkfiles found in archives rather than only using those that provide needed symbols Th...

Page 51: ... case sensitive whereas L is a different option from l 4 On OSS the linker looks in a list of standard places If the linker is building a 64 bit object or if the alf option is processing a 64 bit loadfile then the first three places in this list are lib64 usr lib64 and usr local lib64 In all other cases the next three places in the list are lib usr lib and usr local lib Each of the above names is ...

Page 52: ... public DLL registry file The linker verifies whether the file identifier matches with one of the public DLL filenames found in the public DLL registry If there is no such match and the linker is either creating a 64 bit object file or the alf option processes a 64 bit loadfile The linker verifies whether the name added with prefix y and suffix DLL matches one of the public DLL filenames found in ...

Page 53: ...re x was the name specified in the l option For example on OSS if the linker is given the l ab option and it is searching through an OSS directory that is not a Guardian subvolume it may find ab libab a or libab so Or if given the la b option it similarly may find a b liba b a or liba b so On the other hand if it is searching through a Guardian subvolume on OSS and it is given the lab option it wi...

Page 54: ...eld Input and Output eld Manual 527255 009 2 20 Using Archives ...

Page 55: ...ich Symbols to Export and Creating the Export Digest to export global and defined symbols Public Libraries and DLLs two types namely implicit and explicit The Public Library Registry lists all public DLLs by name Finding and Reading The Public DLL Registry ZREG File how the linker finds the file Overview The primary job of the linker is to bind abstract symbolic names to real addresses For example...

Page 56: ...t its preferred addresses but that is not necessarily true for a DLL Here are two examples of references A data item that is a pointer initialized with the address of another data item The compiler or assembler doesn t know the final address to put in so it creates a relocation table entry for this data item The linker may fill in a value but in any case it propagates the same type of relocation t...

Page 57: ...a user library that user library The liblist of the program a breadth first transitive closure of liblist specified DLLs Other dynamically loaded DLLs The key thing to remember is that a globalized loadfile can have its own definitions preempted by another loadfile This is the UNIX default behavior b semi_globalized or b symbolic means semi globalized It is basically the same as bglobalized except...

Page 58: ...the same order as rld Some symbols are exported by the loadfile that contains them and some are not Only the exported symbols are visible to other loadfiles The linker fills in all references to symbols that are defined in the same loadfile using the address of the symbol within this same loadfile In some cases what the linker fills in may need to be modified by rld but the linker still guarantees...

Page 59: ...ilt is localized then the traversal to find indirect DLLs only pays attention to liblist section entries that are re exported The linker makes use of the DLL names found in one liblist section in order to search for other DLLs but does not check that the DLL name found within a DLL matches the name that was used to search for it The same kinds of rules that apply to DLLs found directly in the comm...

Page 60: ...via non identical export digests then a warning will appear If the linker has not found the import library that represents the implicit libraries from the command stream it may also determine its name by a system call If the linker still has not found the import library that represents the implicit libraries but it has found a public DLL registry file the linker next looks for a file named zimpimp...

Page 61: ...ort library that represents the set of implicit libraries because it can be assumed that the implicit libraries have been correctly built in a separate place Also when some DLL has the same filename as the user library and their memory segments overlap the linker does not consider that a reason to stop presetting The linker will decide not to preset if it was unable to locate an item specified in ...

Page 62: ...d reports an error if you give must_preset with no_preset Otherwise if the linker can t preset and the no_preset option was not used the linker generates a warning message Handling Unresolved References This section discusses what the linker does when it is trying to bind a reference to a symbol and that symbol is not found in any loadfile in the linker s search list If an undefined symbol is ment...

Page 63: ...being created and then looks for the symbol in the usual way through DLLs If found and it is a procedure then the references to the desired symbol are resolved to this symbol and the file can still be preset The references are still considered to be unresolved as far as putting out messages about unresolved symbols is concerned If presetting is successful in this case the LIC tells that there were...

Page 64: ...e only type of name that will work at runtime Note that when running the linker on OSS one would need to do something such as putting the name in single quotation marks or preceding it with a backslash to avoid the special meaning of the dollar sign to the shell The linker places the name specified by the set libnamee option into the tandem_info section of the program that it is creating The linke...

Page 65: ...the same way as if allow_missing_libs was specified and the linker couldn t find a DLL including the production of a warning message Creating Import Libraries There are three kinds of import libraries A complete import library may represent a single DLL providing the linker all the same information at link time as if the DLL itself were present An incomplete import library similarly represents a D...

Page 66: ...nformation then so will the import library If the DLL is being created without DWARF symbols information through the use of the s or x options then the import library will also not have DWARF symbols information The following option import_lib_stripped filename similarly tells the linker to create an import library but in this case the import library does not contain DWARF symbol table information...

Page 67: ...ified in the make_import_lib option Otherwise not all the DLL s on the command line have the EF_TANDEM_IMPLICIT_LIB bit set in their ELF headers In this case it is required that there be only one DLL in the command stream and the import library will represent it with the same DLL name By default the import library created will have the same DWARF symbols information as the existing DLL However if ...

Page 68: ... and furthermore none of the DLL s in its search list addition set were used to resolve any references then that DLL is called unnecessary because the presence of that DLL in the command stream did not affect how the linker preset the file For example if that DLL had not been specified in the command stream then it or the other DLL s in its search list addition set might instead have been found so...

Page 69: ...ut rather can cause the loadfile to run differently These are the cases where the DLL s that were omitted from the abbreviated liblist or abbreviated LIC would have been found at runtime and would have had different export digests from the ones that the linker saw or would have been found in a different order or would have indirectly brought in other DLL s that the linker didn t see In such cases ...

Page 70: ...eferences You could argue that either A or B could be considered unnecessary on its own but you can t say that they are both unnecessary at the same time without figuring out how you are going to get to C The definition of unnecessary given in this section can be applied separately to each DLL in the command stream without having to take into account such dependencies As it actually would work in ...

Page 71: ... Accepting Multiply Defined Symbols This section is only concerned with symbols that are defined and allocated by the compiler or assembler not with symbols that are external references or common data This section covers global definitions which make it possible to have multiple definitions of the same symbol Multiple definitions are only allowed if all the definitions are as data items or if all ...

Page 72: ...ter the previous rule is convenient for enforcing the rules given above about initialized definitions in C and C If that doesn t narrow it down to one choice choose the first instance encountered Note that the linker does not care whether various definitions are short data namely the sdata srdata and sbss sections versus long data namely the data rdata and bss sections If the above rules cause the...

Page 73: ...ation can be stripped from linkfiles When the linker fills in addresses of symbols in the DWARF information it fills in 1 for the address of an unused copy of a symbol The linker does this for both linkfiles and loadfiles The information about unused copies of procedures is deleted from the procinfo section of a linkfile and from the stack unwinding information of a linkfile or loadfile The show_m...

Page 74: ...table entry for a symbol in the linker s input linkfiles and the linker is creating a linkfile then this bit is set in the linker s output file If the export_all option is used then the linker exports all defined global symbols except for those in the following categories Procedures whose names begin with the special prefixes that mark them for inclusion in the ctors dtors initz or termz arrays Sy...

Page 75: ...a certain address in virtual memory when the loadfile is brought into memory as opposed to data that is dynamically allocated on the stack or in the heap The linker checks that the sizes of all code and data sections are multiples of 16 bytes Concatenating Code and Data Sections Found in the Input Linkfiles A linkfile may have many text sections with names beginning either text or restext When the...

Page 76: ...NS E compiler run time libraries Libraries that support connections to TNS E communication facilities Certain TNS E tools utilities and the loader library rld TNS E compilers generate needed linkages from PIC programs and DLLs to the compilers run time libraries In addition to accessing public libraries PIC programs and DLLs will automatically access the system and millicode libraries without your...

Page 77: ... describes a public DLL In its simplest form it is just a name for example dll file ztestdll Here is another example it contains the license attribute A licensed DLL is one that contains priviliged code Unless you use this attribute along with the value 1 the default is 0 which means the DLL is unlicensed dll license 1 file privdll There are other attributes which are created automatically for exa...

Page 78: ...he location of the zreg file If the linker finds the public DLL registry it then determines a list of public DLL filenames This information is used elsewhere in the linker for two purposes First it is used to locate public DLLs as discussed in Finding Public DLLs on page 2 18 Second it is used to locate the import library that represents the implicit libraries as discussed in Presetting Loadfiles ...

Page 79: ...sed with SQL MP Adjusting Loadfiles The alf Option The main purpose of this option is to tell the linker to repeat the process of presetting an existing loadfile Most likely this is done because some of the DLLs used by this loadfile have changed and therefore resolving the references against the newer set of DLLs will allow the loadfile to load more quickly The updating of the loadfile might happ...

Page 80: ... import library that represents the implicit libraries directly on the command line This is an exception to the rule stated in the previous paragraph that no filenames can be on the command line On the other hand it keeps the processing of the alf option consistent with usual linker processing with regard to the ability to get the name of this import library from the command line The filename spec...

Page 81: ...alf option it is permissible to specify no_preset It is also possible for the alf option to discover that it can t preset for the same reasons as described in To Preset or Not to Preset and Creation of the LIC on page 3 7 and the alf option acts similarly in that case to what the linker does when it is creating a new loadfile and discovers that presetting is impossible The following are difference...

Page 82: ...t is also possible to specify the rld_L and rld_first_L options with alf As with the linker s normal processing of these options you can specify them multiple times and the linker concatenates the strings given Unlike the linker s normal processing of these options the alf option does not concatenate these strings with the ones found in the dt_rpath and dt_tandem_rpath_first entries of the dynamic...

Page 83: ...doesn t have a name for the user library or on any platform if it can t open such a file it is treated like a missing DLL the same as when a program is created If the local_libname option is used and the program doesn t mention any user library name that is an error By default the alf option considers it an error if the loadfile has any relocation sites in the text segment which would indicate non...

Page 84: ... be updated if this is a DLL that has an entry point It is updated to the new rebased address of the same procedure that was the main entry point before The e option is not allowed with alf In the program headers the p_vaddr fields are updated In the tandem_info section the gp_value the export_digest and the four fields to tell the addresses of the ctors array etc are updated if they are nonzero I...

Page 85: ...gment moved eld reports an error if the existing file cannot be opened for reading It is possible to specify the o option to tell the name of the new output file If the o option is not specified then it defaults to the same name as the existing loadfile Even if the existing file is a DLL its DLL name does not influence the output file name The output file is created by the same method as described...

Page 86: ...he user library name highpin highrequestors oktosettype runnamed saveabend user_buffers For these attributes the possible values are ON or OFF These attributes correspond to flag bits in the tandem_info section The default is ON for highpin and highrequestors and OFF for runnamed saveabend and oktosettype There are several synonyms for highrequestors oktosettype For this attribute the possible val...

Page 87: ...tion If not specified the default value in each case is 0 See the Guardian Procedure Calls Manual for more information about how to use the heap_max mainstack_max and space_guarantee attributes More information about process_subtype is provided in the notes following this table floattype float_lib_overrule See Processing of Floating Point Versions and Data Models on page 4 16 CPlusPlusDialect See ...

Page 88: ...set option The difference is that change modifies an existing file whereas set is used when a new file is being created The change option takes the same parameters as set plus the name of the existing file The change option can be used with a linkfile loadfile or import library with the following rules The change attributes that are allowed with a linkfile are the data_model and floattype attribut...

Page 89: ...uture when this program is run At that time if the user library found with that name was not equivalent to i e contained the same export digest as the user library that had been used when the program was preset then the program would not have been preset correctly for its runtime environment and would need to be updated accordingly That is the same as what would happen if the same user library fil...

Page 90: ...t file neutral regardless of how it was marked before This is allowed for linkfiles and DLL s but not for programs The searching that is done for l options or for liblist entries depends on the data model of the file that is being created or processed by the alf option as discussed in this manual When eld creates an import library that represents a single non implicit DLL the import library is giv...

Page 91: ...ine symbol 2 instead If there were references to symbol 1 those will still refer to symbol 1 and therefore they could not be resolved within this same object file If a new linkfile is being built with the r option a future link could combine this linkfile with another one that supplied a definition of symbol 1 to satisfy such references Or in general the references could be satisfied in other DLLs...

Page 92: ...ymbol the DWARF addresses for the unused copies are set to 1 as discussed in Accepting Multiply Defined Symbols on page 3 17 The stripping of symbols information means that the linker does not create the DWARF symbol table information in its output file s The reason to do this is to make object files smaller when the user is not concerned with debugging For compatibility with the past this can be ...

Page 93: ... its input linkfiles If there were multiple copies of procedures the information about unused copies is omitted from the procinfo and unwind function sections of linkfiles and from the unwind function sections of loadfiles In the linkfile case that also means doing something about the corresponding relocation table entries Creating the MCB The linker creates the MCB master control block as additio...

Page 94: ...ctually means tandem to the HP NonStop operating system and CRE If the set floattype option is not used eld reports an error if the input files are not consistent If they are consistent the result type is placed into the output file When the linker is building a loadfile the set float_lib_overrule option may be used to turn on the EF_TANDEM_FLOAT_LIB_OVERRULE bit in the ELF header of the loadfile ...

Page 95: ...e e option is specified the linker checks that it is the name of a procedure that is defined in this object file otherwise it is an error eld reports an error if this procedure has the CALLABLE or KERNEL_CALLABLE attribute Additional rules depend on the type of file that the linker is building If the linker is building a program then eld reports an error if no main entry point has been specified b...

Page 96: ...ntries are as follows DT_RPATH tells places to look after looking for public DLLs The rld_L option specifies a string to place into DT_RPATH rpath is accepted as a synonym for rld_L DT_TANDEM_RPATH_FIRST tells places to look before looking for public DLLs The rld_first_L option specifies a string to place into DT_TANDEM_RPATH_FIRST Each of the rld_L and rld_first_L options may be specified multipl...

Page 97: ...y 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 This mostly involves concatenating the corresponding sections although there are also pointers into RTDU string spaces that need to be updated ap...

Page 98: ...Other eld Processing eld Manual 527255 009 4 20 Merging Source RTDUs ...

Page 99: ...w_missing_libs Do not consider it an error if a l option cannot be resolved except in situations where b static is in effect See How the Linker Finds Its Input Files and Creates the liblist Section on page 2 12 allow_multiple_mains Do not consider it an error if more than one procedure has the MAIN attribute See Specification of the Main Entry Point on page 4 17 ansistreams At runtime the program ...

Page 100: ...ss_dll_cleanup option on page 3 19 d hexadecimal address Use the specified value as the starting address of the data constant segment See Creating Segments of the Output Loadfile on page 2 6 data_resident This is a special option that may be used when building a proto process also known as a sysgen process dll synonym for shared dllname synonym for soname e symbol name Use the address of the speci...

Page 101: ...L See Using a DLL Registry on page 2 8 grow_percent number Leave the specified percentage of slack space in virtual memory for each of the text and data segments of this DLL See Using a DLL Registry on page 2 8 grow_text_amount number Leave the specified amount of slack space in virtual memory for the text of this DLL See Using a DLL Registry on page 2 8 hidden_symbol symbol name Do not export the...

Page 102: ...ed directory or subvolume is one of the places where the linker will look for DLLs and archives after it looks for public DLLs The L must be specified in upper case See The Steps in Looking for Archives and DLLs on page 2 17 lib synonym for l This usage may be preferred because it is not case sensitive and therefore cannot be confused with L libname synonym for set libname libvol synonym for L lim...

Page 103: ...name eld reports an error if the linker isn t able to delete an existing file of the same name when creating an import library See Creating Import Libraries on page 3 11 must_use_oname eld reports an error if the linker isn t able to delete an existing file of the same name when creating its main output object file See The Creation of Output Object Files on page 2 5 must_use_rname eld reports an e...

Page 104: ...t look in the standard places for DLLs and archives See The Steps in Looking for Archives and DLLs on page 2 17 no_stdlib synonym for nostdlib noverbose synonym for no_verbose no_verbose Do not show warnings or informational messages unless they are requested by a linker option See General Information on page 6 1 no_version_check Do not perform the object file version check See Input Object Files ...

Page 105: ...gistry filename Use the specified file as the public DLL registry file See Finding Public DLLs on page 2 18 r Create a linkfile rather than a loadfile See Output Object Files on page 2 4 reexport Re export 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 rename symbol name symbol name Change the name of a symbol...

Page 106: ...ue Set the specified attribute to have the specified value in the loadfile being created The following chart lists the attributes their possible values their defaults if not specified and the section of this document to look at for more information Table 5 1 Set Attributes Attribute Name Allowable Values Default See Section for Details CPPDialect CPlusPlusDialect neutral cppneutral These two names...

Page 107: ... 3 11 inspect on off on The set and change Options on page 4 8 interpose_user_library on off off The set and change Options on page 4 8 libname filename If not specified there may be no user library or the name may be derived from what is specified for the local_libname option Using User Libraries on page 3 10 mainstack_max number 0 The set and change Options on page 4 8 oktosettype on off off The...

Page 108: ...rd Input on page 1 7 strip filename Remove the DWARF symbol table from an existing loadfile or import library See Updating Or Stripping DWARF Symbol Table Information on page 4 14 rld_unresolved error warn ignore error Handling Unresolved References on page 3 8 runnamed on off off The set and change Options on page 4 8 saveabend on off off The set and change Options on page 4 8 space_guarantee num...

Page 109: ... the intermediate file during the recreation of a DLL registry Using a DLL Registry on page 2 8 u symbol name Consider the specified symbol to be needed when deciding which files to take from archives Using Archives on page 2 16 ul Create a user library Actually this option is a synonym for shared plus export_all See Output Object Files on page 2 4 unres_symbols error ignore warn Handle unresolved...

Page 110: ... 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 symbol name Provide information about how this symbol is mentioned in the ELF symbol tables of the linker s input files See Merging Symbols Found in Input Linkfiles on page 3 16 ...

Page 111: ...t listing fall into the following four severity levels On Guardian eld s return code is equal to the highest severity level that occurred during the link i e 0 1 2 or 3 That isdone because this is a Guardian standard On the other hand on the PC and OSS users are accustomed to just checking whether the value is 0 or 1 and considering 1 to be an error and not caring about warnings So on the PC and O...

Page 112: ...erminates in error Messages are numbered and tell their severity level Messages can be understood in conjunction with the other material in this document including the following section that lists the messages It is not intended that people depend on the specific numbers or contents of messages since they are always subject to change Messages related to I O errors contain the message text for the ...

Page 113: ...name In such a case c89 or c99 does not need to set up argv 0 correctly for eld Instead c89 or c99 itself may print out the correct name of eld and use the no_banner option to stop eld from printing out the incorrect string that c89 or c99 passed to it The next thing in the listing is a copy of the command line without obey options expanded After that come all the messages in the four categories s...

Page 114: ...r or Bad input file not listed in this section In some cases the message may help you resolve the problem at hand If you cannot resolve such a problem or if any other message appears that is not listed in the table below or if eld terminates abnormally that is probably something to be reported as a possible eld bug to your HP representative If eld complained about an input file that might also ind...

Page 115: ...rn to say that eld should not consider this an error situation Effect Warning eld produces an output file but it might not be what you intended Recovery You don t necessarily need to do anything 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 look at the names of the symbols that eld said it couldn t find and see...

Page 116: ...n to tell eld to build a DLL rather than a program or you have given the r option to tell eld to build a linkfile i e an object file that can be used as eld input again rather than a program Or in the case that you gave the change option the filename that you specified with the change option is not a program but instead is either a DLL or a linkfile such as is created by a compilation Effect Fatal...

Page 117: ... an import library at the same time that you were making a DLL The other case is that that you gave the change incomplete option but the filename specified for the change option was not an import library The incomplete attribute only applies to import libraries Effect Fatal error eld immediately stops without creating an output file Recovery If your intention is to create an import library at the ...

Page 118: ...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 or at least not when the offset mentioned in the message is added to their addresses 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 ...

Page 119: ... set OFF Effect Warning eld produces an output file but it might not be what you intended Recovery This is only considered a warning by eld because what matters is which DLLs you will be using at runtime Determine which of your programs and DLLs should have HIGHPIN ON and which should have it OFF The rule is that a program or DLL with HIGHPIN ON cannot be a client of a DLL with HIGHPIN OFF Your pr...

Page 120: ... probably indicates that there was something wrong with the contents of the file Effect Fatal error eld immediately stops without creating an output file Recovery If the input file is bad that may or may not be a problem you can fix yourself This might indicate an error in some other tool that created the input file The problem may need to be referred to your HP representative Cause You gave the m...

Page 121: ...e not trying to create an import library then don t specify the make_import_lib option 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 There are some symbols that legitimately exist in more than one of the implicit DLLs because ...

Page 122: ...create an import library eld first creates a workfile in the same location OSS directory Guardian subvolume or PC folder as the place where you specified that the import library should be created For some reason eld had a problem writing to the workfile after it had been successfully created Effect Fatal error eld immediately stops without creating an output file Recovery Check that the indicated ...

Page 123: ...first creates a temporary file in another place and when that file is created eld then tries to rename it to the filename specified in the temp_i option That renaming failed Effect Warning eld still creates the import library but not using the file you specified with the temp_i option as an intermediate file Recovery If you are not able to rename a file to another name in the same location Guardia...

Page 124: ...ode to use one type of floating point consistently More often one or both files specifies a floating point type unnecessarily because the compilers may do that by default In that case use the set floattype option to specify the type of floating point that eld should assume is really needed or neutral if neither type is required Cause A filename was specified directly on the command line for eld to...

Page 125: ...on to read it Cause eld has found a file specified on the command line possibly through a l option and opened it and found that it was a DLL but the b static option was in effect at this point on the command line which says that it is an error if eld finds a DLL as opposed to an archive Effect Fatal error eld immediately stops without creating an output file Recovery If you really don t want to fi...

Page 126: ...tend to use the linkfile that was found the easiest thing is to just put its fully qualified name on the command line Cause eld was searching for a DLL based on a liblist entry of some other previously opened DLL to indirectly bring another DLL into this link 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 Effect Fat...

Page 127: ...rror if eld finds an archive as opposed to a DLL Effect Fatal error eld immediately stops without creating an output file Recovery If you really don t want to find an archive at this point on the command line then you need to figure out why eld did find an archive rather than a DLL If the archive was found through a l option that did a search you may need to review all the rules for how eld does t...

Page 128: ...rchive that only contains TNS E object files Cause eld tries to create a workfile in the same location OSS directory Guardian subvolume or PC folder as the place where you specified that the output file should be created For some reason eld could not create that workfile and open it for writing Effect Fatal error eld immediately stops without creating an output file Recovery Check that you have pe...

Page 129: ...code or you can specify the name of that procedure to eld with the e option I Cause You used the e option to tell eld the name of the procedure that is supposed to be the main entry point for the program that you are building but there is no symbol of that name defined within the program Effect Fatal error eld immediately stops without creating an output file Recovery If your program contains C C ...

Page 130: ...y option more than once on the command line with different attribute values The possible values are on and off 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 creating an output file Recovery If you want to specify this option decide which value you want to specify and only specify that value Cause You used t...

Page 131: ...ld command line you specified the set floattype option to say which type the file really was or to say it was neutral That s okay but eld puts out an informational message about it Effect Information This is not indicative of a problem Recovery None required assuming you know that this object file really should be marked the way you indicated because that is the type of floating point it will real...

Page 132: ...e You might want to look into this further though with people who are familiar with what that other DLL actually does need Cause You are building a DLL 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 ...

Page 133: ...er DLLs and among those other DLLs eld sees that at least one says that it requires the IEEE version of floating point at runtime Effect Warning eld produces an output file but it might not be what you intended Recovery If the version of the DLL that is used at runtime still says that it requires the IEEE type of floating point your program will not be allowed to run Even though your program may c...

Page 134: ...dialect v2 or v3 as shown in the message and you specified the set cppdialect neutral option to indicate that the program or DLL that you are building should say that it doesn t use C That is okay but eld puts out an informational message about it Effect Information This is not indicative of a problem Recovery No action required assuming you know that it would be okay for this program or DLL to be...

Page 135: ... not able to create any file whose name matched this pattern perhaps because 1000 files with names matching the pattern already existed They might exist because previous runs of eld failed and left these files behind eld doesn t delete such files that previously existed it only tries to find an unused name Effect Fatal error eld immediately stops without creating an output file Recovery Check that...

Page 136: ...ut the locations didn t match Effect Fatal error eld immediately stops without creating an output file Recovery If you really want to use the temp_ option there is no need to specify a fully qualified name You can just specify a simple name and then eld will put it in the right place But you probably also have no need for the temp_ option at all so you can just omit it Cause You used the rpath or ...

Page 137: ...dditional errors before stopping Recovery If your intention is to create a program 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 limit_runtime_paths option Cause You used the soname or dllname option which tells the DLL name to be placed inside the DLL that you are creating but you did not...

Page 138: ...ibrary but you did not specify any option to tell eld to build an import library Effect Fatal error eld immediately stops without creating an output file Recovery If your intention is to create an import library specify an appropriate option to do that If that is not your intention don t specify the temp_i option Cause You used the libname or set libname option to tell eld the name of the user lib...

Page 139: ...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 highrequestors option Cause You have specified the alf option together with the t and d options to rebase a DLL and move the two segments the code segment and data segment by different amounts Within this DLL there are cases where in one segment a word contains a value that ...

Page 140: ...entually 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 saveabend option Cause You used the set inspect option which is an attribute you can set ...

Page 141: ...ur 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 mainstack_max option Cause You have specified the import_lib and the import_lib_stripped options The import_lib option tells eld to make an import library for a DLL at the same time eld is building...

Page 142: ... Cause You used the t or d option when building a program or DLL to tell the starting addresses of its segments 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...

Page 143: ...that Cause You used the ansistreams option which affects how the program that you are building will do its I O but the file that you have told eld to create is not a program Effect Fatal error eld immediately stops without creating an output file Recovery If your intention is to create a program specify that correctly For example don t specify the dll shared or ul option which means that you are t...

Page 144: ...fied the r option which tells eld to create another object file that can be used as linker input not a DLL Effect Fatal error eld immediately stops without creating an output file Recovery If your intention is to build a DLL then don t specify the r option If your intention is to use the r option to build anoter object file that can be used as input to eld then don t specify the dll shared or ul o...

Page 145: ...ll 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 If you have unresolved references to get an error free link you need to spec...

Page 146: ...folder as the new object file that you are trying to create Effect Warning eld still creates the output object file but not using the file you specified with the temp_o option as an intermediate file Recovery If you are not able to rename a file to another name in the same location Guardian subvolume OSS directory or PC folder that is an operating system question that is beyond the scope of this d...

Page 147: ...references 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 had unresolved references It is only a warning message not an error message because the unres_symbols warn option was also specified Effect Warning eld produces an output file but it might not be what you intended Recovery This issue involves th...

Page 148: ...es of which common data is present in filename Effect For informational purposes only might indicate a problem see warning 1657 on page 6 124 Recovery See the recovery step of warning 1229 on page 6 38 Cause eld encountered global symbols of the same name of which one is common data and the other is a definition The definition overrides the common data Effect The application does not execute prope...

Page 149: ...formation might indicate a problem see warning 1233 Recovery See Recovery step of Warning 1233 on page 6 39 Cause eld encountered global symbols of the same name symbol name both of which are common data items and are of different sizes The symbol of the larger size is retained overriding the smaller common data item Effect Application might not function as expected Recovery Correct the applicatio...

Page 150: ...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 Depending on the situation you may be able to use the unres_symbols option to specify whether eld should consider unresolved re...

Page 151: ... indicative of a problem Recovery No action required Cause Procedures are contained within code sections The C compiler may create duplicate copies of procedures and eld can remove the duplicates if the compiler gives permission When this is done the entire section containing the unneeded copy of the procedure is removed There may be references to the procedure but those references should be done ...

Page 152: ...which is probably not something you meant to do The determination of whether two DLLs look like copies of each other is based on whether they contain the same export digest within them Having the same export digest means that eld could use either copy of the DLL and the resulting fixups of the file being created would come out exactly the same Effect Warning eld produces an output file but it migh...

Page 153: ...n Cause You specified an option with a parameter where the parameter began with an equal sign In the Guardian case this would be allowed where eld would treat the parameter as a Guardian DEFINE and expand it to a filename But you are running eld on the PC or on OSS and on these platforms this type of parameter is not allowed Effect Fatal error eld immediately stops without creating an output file ...

Page 154: ...on fix the syntax Cause You specified the option named in the message and this option requires a keyword parameter but the next token on the command line began with a hyphen indicating another option not the parameter for this one Effect Fatal error eld immediately stops without creating an output file Recovery If you want to specify this option fix the syntax Cause You specified the option named ...

Page 155: ...bname or change libname option to specify the name of a user library A user library name must always be a Guardian filename specified in the form a b c eld has complained because at least one of a b and c was longer than 8 characters Effect Fatal error eld immediately stops without creating an output file Recovery Are you sure you want to specify a user library name If so and you entered the user ...

Page 156: ...ve the set floattype neutral option when building a program That is allowed but questionable In fact at runtime a program is never neutral It is always set up to use either the Tandem or IEEE form of floating point So it would probably be better for you to explicitly specify which one you want to have As the message says you said neutral but that really means Tandem at runtime Effect Warning eld p...

Page 157: ... specify this option decide which value you want to specify and only specify that value Cause You gave the set float_lib_overrule 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 ...

Page 158: ...alue you want to specify and only specify that value Cause You gave the set runnamed 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 If you want to specify this option d...

Page 159: ...ich value you want to specify and only specify that value Cause You gave the set space_guarantee 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 If you want to s...

Page 160: ... this option decide which value you want to specify and only specify that value Cause You gave a set rld_unresolved or change rld_unresoloved option The next token on the command line must be either error warn or ignore 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 creati...

Page 161: ... on the command line The next token on the command line must be one of the possible attributes that you can set or change with this option but eld didn t recognize the attribute specified Effect Fatal error eld immediately stops without creating an output file Recovery Fix the spelling of the attribute Case doesn t matter but other than that it must be exactly as shown in the manual Cause You gave...

Page 162: ...er places can just be external references to that definition Review the rules for what makes a declaration a definition depending on the source language that you are using because the rules are different for each language If you really do intend to have two definitions of this data item visible across separate compilations then the sizes must be the same If the sizes are different because the two ...

Page 163: ...Effect Fatal error eld immediately stops without creating an output file Recovery If your intention is to do one of the things listed in the message provide the appropriate option to specify that If you are not doing any of those things do not specify the update_registry or check_registry option Cause You used the map option which provides information about addresses in the program or DLL that you...

Page 164: ...pecify with the local_libname option needs to be a Guardian file i e it needs to be a name such as G a b c But it wasn t so that s the error Effect Fatal error eld immediately stops without creating an output file Recovery If you don t intend for your program to use a user library don t specify the local_libname option If you are using a user library you must decide what its Guardian filename will...

Page 165: ... want to specify this option then you must enter a valid Guardian filename for its parameter Cause You gave the e option more than once on the command line This option tells eld the name of the procedure that should be where execution begins for the program you are building but you specified different names at different places on the command line You can give this option more than once but only if...

Page 166: ...hen the t or d options can be used to do that although there is rarely any reason to use the d option If you want to build a DLL and explicitly say where it should go and also have a private DLL registry updated with that information you can use the t option to build the DLL and separately put that information into the private DLL registry file by hand Or you can put the information by hand into t...

Page 167: ...t_amount or grow_percent option and these options are used to tell eld which formula to use to calculate the future growth if the grow_limit option is not given You can t give the grow_limit option at the same time as any of these other options whose names begin grow Effect Fatal error eld immediately stops without creating an output file Recovery Decide what formula you want eld to use to calcula...

Page 168: ...o represent a single DLL or that you are making the zimpimp file that represents all the implicit DLLs that constitute system library You also specified either the temp_r must_use_rname check_registry update_registry or t option and these are options that are allowed when you are creating the zimpimp file but not when creating other kinds of import libraries On the other hand you also put the name...

Page 169: ... make_implicit_lib option which means that you are building one of the DLLs that constitute system library These DLLs are not allowed to contain writeable data However the input file mentioned in the message contained writeable data Effect Fatal error eld immediately stops without creating an output file Recovery Assuming you really do want to specify the make_implicit_lib option you need to exami...

Page 170: ... during this link to fix up references from the program that it is creating There can only be one user library If you have a user library specify its name on the command line and no other name If you use this option to specify the name more than once it must be written exactly the same way each time Cause You gave the import_lib the import_lib stripped or the make_import_lib option more than once ...

Page 171: ...sible choice for the instance_data option that also makes eld create two data segments And none of this is the right thing to do for certain special programs that are called proto processes or sysgen ed processes It is similarly beyond the scope of this manual to explain what these things are but if you are creating a proto process then you should know that you are doing that In that case do not s...

Page 172: ...another link that was using the update_registry option In this situation eld waits and tries again and that should work If that doesn t work after a certain number of tries then eld gives up resulting in this message Effect Fatal error eld immediately stops without creating an output file Recovery Look into the status of the file that you specified Perhaps someone has it opened for an extended per...

Page 173: ...g to create an import library to represent a single ordinary DLL then don t use the option that was mentioned in the message If you are not trying to create an import library don t specify the make_import_lib option Cause You have specified the instance_data data1constant option which means that you want eld to consider it an error if the program or DLL that you are building contains any writeable...

Page 174: ...utput file Recovery Fix the format of the file as explained elsewhere in this manual Cause You gave the rename option which requires two symbol name parameters However the next two things on the commandline were not symbol name parameters Either there were no symbol name parameters or there was only one and then it was either the end of the command line or the next token on the command line starte...

Page 175: ...ave the strip option to tell eld to remove the DWARF symbols from an existing program or DLL The parameter to the strip option is the name of the file to be stripped When you give the strip option you can also give the o obey and temp_o options which also have filenames as parameters However except for these reasons you are not allowed to have any other filenames on the command line Effect Fatal e...

Page 176: ... the instance_data option with a parameter value other than data1constant Cause You are trying to create an object file eld first creates it in a temporary location deletes any file that previously existed with the name specified for the object file and then renames the temporary file to the final location That process failed In such a situation eld would usually leave the file in another location...

Page 177: ...cify one filename Cause The option mentioned in the message takes a numerical parameter You gave this option more than once on the command line with different numbers specified as the parameter 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 If you want...

Page 178: ...tal error eld immediately stops without creating an output file Recovery Fix the format of the file as explained elsewhere in this manual Cause You did not give an option such as dll shared or ul which would tell eld that you want to make a DLL but you specified the make_implicit_lib option which tells eld more specifically what kind of DLL to make namely one of the implicit DLLs that constitute s...

Page 179: ...DEF_OK Effect Fatal error eld immediately stops without creating an output file Recovery Check that the attributes of the symbol name are as required If not update the attributes to comply with the rules that are mandated by the cross_dll_cleanup option If the attributes are not as required the cross_dll_cleanup option cannot be used Cause Using the cross_dll_cleanup option requires that all the i...

Page 180: ...the MAIN attribute you can do that with the allow_mulitple_mains option In that case eld will choose one of those procedures to be the one where execution begins so you would need to check that eld chose the one you wanted eld will choose the first one it sees which you can control by changing the order of object files on the command line assuming the different procedures with the MAIN attribute a...

Page 181: ...auses data to be rearranged in a way that requires more data to fit in the area reserved for GP relative addressing In any case at most 4 megabytes of data can be in the area reserved for GP relative addressing and your program or DLL has exceeded that Effect Fatal error eld immediately stops without creating an output file Recovery You need to make your program or DLL smaller so that it contains ...

Page 182: ...n output file Recovery Did you really intend to define data items with the same name in each of these two files and have both definitions visible across separate compilations If not change the name of one of them or change the declaration of one of them so that it is only visible within its own compilation If you are using the same data item in more than one place only one of those places needs to...

Page 183: ...ed above If they are different kinds of data because the two files were created from different versions of the source code or by using different compiler options repeat the compilations doing things more consistently Cause A filename was specified for eld to open but either that file doesn t exist or you don t have permission to read it This particular message can come out about the existing progr...

Page 184: ...covery If your intention is to use the alf or strip option then the file that you specify must be a program or DLL A similar stripping operation on object files such as those produced by a compilation rather than a program or a DLL can be accomplished by using the s and r options together Cause You gave the alf option to repeat the fixup process on an existing program or DLL Along with the alf opt...

Page 185: ...iple of 64K bytes or 128K bytes if you are doing this to an implicit DLL Effect Warning eld produces an output file but it might not be what you intended Recovery The starting address of the data segment of a program or DLL is required to have the indicated alignment No action is required if you understand that and are satisfied with the rounding although it would be cleaner if you specified a num...

Page 186: ...ocation OSS directory Guardian subvolume or PC folder as the place where you specified that the new version of the file should be created eld could not create that workfile and open it for writing Effect Fatal error eld immediately stops without creating an output file Recovery Check that you have permission to create files in the indicated location and that it isn t a Guardian subvolume that is f...

Page 187: ...y for 64 Bit on page 4 12 Effect This is a warning message and eld continues with the link However the results are not as desired because eld performed the search for l option The search according to the ilp32 rule has produced a warning message that it has found the lp64 DLL before obtaining the lp64 linkfile and thereafter started following the lp64 rule If you are performing a lp64 build and wa...

Page 188: ... Effect Fatal error eld immediately stops without creating an output file Recovery If you want to specify one of these options decide which one you want to specify and only specify that one Cause You gave the d option more than once specifying different numerical values each time Effect Fatal error eld immediately stops without creating an output file Recovery There is rarely any reason to specify...

Page 189: ... stops without creating an output file Recovery Few people will ever need to use this option If you really are such a person then you need to create the template file typically by assembling some code that is a modfication of the assembler code used for this purpose before Cause You gave the gateway_template option specifying a filename as a p arameter That file is required to meet various conditi...

Page 190: ...n do not specify the option name option Cause The procedure named in the message has the CALLABLE or KERNEL_CALLABLE attribute And you have specified that this procedure be the main procedure where execution begins for the program that you are building either by using the e option or by the fact that the procedure is marked with the MAIN attribute in its object file However that combination is not...

Page 191: ... woudn t fit into 32 bits Or you are using the alf option to repeat the fixups on a program or DLL and you are pointing at some other DLL that uses addresses that don t fit into 32 bits In either case the program or DLL that you are fixing up contains 32 bit pointers that it is using to point at symbols either in the same DLL or in another DLL whose addresses can t be represented in 32 bits So tha...

Page 192: ... also used the r option to tell eld to build another object file that could be used as eld input rather than a program or DLL That s inconsistent Effect Fatal error eld immediately stops without creating an output file Recovery If your intention is to create a program or DLL don t use the r option If your intention is to create another object file that can be used as eld input rather than a progra...

Page 193: ...ed must_preset in the first place then you will need to investigate the reason why fixups couldn t be done as given in the message Cause You have given the alf option to update an existing program or DLL When that program or DLL was originally built it specified certain other DLLs to be used Those DLLs contained DLL names which were saved in the program or DLL being built at the time During the al...

Page 194: ...hese attributes in the first place and having this problem then it is a problem with building the NSK operating system that is beyond the scope of this manual Cause You specified the change incomplete option to mark an existing import library as an incomplete import library However the file name that you specified for the change option is in fact a zimpimp file the special import library that repr...

Page 195: ...rate compilations If not change the name of one of them or change the declaration of one of them so that it is defined and only visible within its own compilation If you are using the same symbol in more than one place all the places must agree on whether that symbol is globalized If the symbols disagree about this because the two files were created from different versions of the source code or by...

Page 196: ...file should be built as part of the process of creating the operating system which is beyond the scope of this manual Cause The zimpimp file is a file that tells eld about the symbols in system library eld has various methods of locating this file For example if you are running eld on TNS E then the operating system tells eld where the file is In other cases eld looks for it in an appropriate plac...

Page 197: ...d it 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 If you specify this option check that you spelled the name correctly and that you do have perm...

Page 198: ...ng eld on TNS E then the operating system tells eld where the file is In other cases eld looks for it in an appropriate place expecting it to have the name zreg Or you can override these methods by explicitly telling eld where it is with the public_registry option eld did find a file by these methods but the file turned out not to have the proper structure for a public DLL registry file eld parses...

Page 199: ...ed 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 The message told the name of the file that eld thought was the public DLL registry file Perhaps that will help you figure out what s wrong Cause eld uses the public DLL registry file to look up information about the operating system and other standard DLLs T...

Page 200: ...ile 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 If you specify this option it is your responsibility to provide eld with a correct public DLL r...

Page 201: ...rather than a program or DLL Effect Fatal error eld immediately stops without creating an output file Recovery If your intention is to create a program or DLL then don t specify the r option If our intention is to use the r option to create a new object file that can be used as eld input then don t specify the public_registry option Cause eld uses the public DLL registry file to look up informatio...

Page 202: ...attribute but this particular message comes out when eld saw a dll statement that did not contain a file attribute The message tells the line number at which this statement 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 becau...

Page 203: ...er cases eld looks for it in an appropriate place expecting it to have the name zimpimp Or you can simply put the name of the zimpimp file directly on the eld command line However none of these methods specified a zimpimp file to eld Effect Warning eld will continue to produce an output file but it will not be able to fix up references to system library Recovery It is not necessary to have referen...

Page 204: ...e of this manual Cause eld is searching for a DLL and you are using eld on Guardian eld found the name mentioned in the message in the public DLL registry file meaning that this DLL is one of the standard DLLs and is supposed to exist in a certain location Specifically it is required that there be a file named zxxxdll in the same location Guardian subvolume OSS directory or PC folder as the public...

Page 205: ...ard place and opened it The file however was not a DLL but instead was a linkfile i e an object file created by a compilation or by running eld with the r option Effect Fatal error eld immediately stops without creating an output file Recovery There is something wrong with your installation Files that are not DLLs have been placed in the location for the standard public DLLs The process of install...

Page 206: ...it eld has also opened another DLL whose filename is shown in the message and found that it contained the same DLL name as the user library Also it probably is the same file or a copy of the same file because it exports all the same symbols with the same addresses as the user library Effect Warning eld produces an output file but it might not be what you intended Cause This is not necessarily an e...

Page 207: ...K and the name given for local_libname is in the Guardian namespace then it s okay to omit the set libname option and eld will assume that the user library will be in the same location at runtime However on the PC it is an error to give local_libname without set libname Effect Fatal error eld immediately stops without creating an output file Recovery If you are using a user library then you must d...

Page 208: ...xport_not option tells eld the opposite You first specifed that this symbol should be exported and then later on the command line you said it shouldn t be exported Effect Fatal error eld immediately stops without creating an output file Recovery Decide whether you want this symbol to be exported and specify the proper option Cause The exported_symbol option or its synonym the export option tells e...

Page 209: ...ed 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 a new object file that can be used as eld input then don t specify the hidden_symbol option Cause You used the exported_symbol option or its synon...

Page 210: ...ontinue for the purpose of detecting additional errors before stopping Recovery The symbol must be defined not just an external reference The rules for which symbols are defined by a compilation depend on the source language and are beyond the scope of this manual Cause You gave the hidden_symbol option or its synonym the export_not option to say that a certain symbol should not be exported Howeve...

Page 211: ...n or in the case of using alf on an existing program the name for the user library could have come from the existing program itself In any case either the file mentioned in the error message does not exist or you do not have permission to read it Effect Warning eld produces an output file but it might not be what you intended Recovery Even though eld could not open the user library it will still c...

Page 212: ...rogram to tell the Guardian location where the user library will exist at runtime Then eld will let you use the alf option to update the fixups on the program If you really want to repeat the fixups but not have the program mention a user library name afterward you can then run eld with the change libname option again after doing the alf option to remove the user library name from the program Caus...

Page 213: ...ror eld immediately stops without creating any output file Recovery If eld cannot re create the private DLL registry with the name you prefer do you want that to be an error Or do you want to tell eld the name of a different place to put it Depending on what you want to do specify at most one of the temp_r and must_use_rname options Cause This message can come out either when you give the alf opti...

Page 214: ...ts on how data is protected and in such cases globalized symbols are not allowed Effect Fatal error eld immediately stops without creating an output file Recovery Assuming you do need to make the special kind of program or DLL that requires that instance_data option you probably need to look over your C source code to figure out why it has globalized symbols in it and change the code to avoid that...

Page 215: ...k_registry option which would only be possible if you were updating 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 repeat the fixup process on a program then don t specify the check_registry or update_registry option If your intention was to use the alf option on a DLL then you specified the wrong ...

Page 216: ...e size of the DLL would be the same as it was before But that didn t agree with the size of the DLL as listed in the private DLL registry So that means you are using a private DLL registry that is not the same as what might have been used when the DLL was previously created Perhaps the private DLL registry file had been edited by hand putting in smaller sizes than it had before Or as part of build...

Page 217: ...hout creating an output file Recovery If your intention is to run the alf option on the millicode DLL then you should have correctly specified the name of the millicode DLL In any other case you should not specify the update_code option Cause Each of the two files mentioned in the message defined symbols items of the same name as shown in the message However they were different types of symbols as...

Page 218: ...message defined data items of the same name as shown in the message and each of these files was written in C or C and in each case the compiler called it an initialized data item As a rule it is illegal in C or C to have duplicate initialized data items However there also are data items that are specially created by the C compiler where the compiler marks them to say that duplicates are okay but a...

Page 219: ...ternal references to that definition If you really do intend to have two definitions of this procedure visible across separate compilations then the attributes listed above must be the same If the attributes are different because the two files were created from different versions of the source code or by using different compiler options repeat the compilations doing things more consistently Cause ...

Page 220: ...e r option to build a new object file that can again be used as eld input and when you do that you can also use the set process_subtype option to assign a numerical subtype to that object file When eld is then given that object file in a subsequent link it copies over the subtype to its output object file again However in the present link some of the input files had subtypes assigned to them by pr...

Page 221: ...hout the r option to directly build a program or DLL out of them 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 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 ...

Page 222: ...ystem library The import_lib or import_lib_stripped option is used to make an import library to represet a DLL at the same time that you create that DLL However you cannot create an import library to represent one of the implicit DLLs Instead the set of implicit DLLs is represented by the zimpimp file Effect Fatal error eld immediately stops without creating an output file Recovery If your intenti...

Page 223: ...eld did that Effect Information This is not indicative of a problem Recovery No action required Cause You gave the strip option to tell eld to remove the DWARF symbols from an existing program or DLL but that file contained no DWARF symbols information Either it was built from object files none of which themselves had any DWARF symbols information or the file had already been stripped before Effec...

Page 224: ...e set user_buffers option which affects how a program performs I O 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 If your intention is to use the r option to create ...

Page 225: ...nge Cause The addresses 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 Or if the address is a...

Page 226: ...ss range given by the dllarea command or 0x70000000 if an explicit dllarea command is not present However that rule was violated by the range command on the indicated line number of the file Presumably that was because the file was incorrectly edited by hand Effect Fatal error eld immediately stops without creating an output file Recovery Fix the format of the file so that the addresses of all DLL...

Page 227: ...hatever you planned to do at such a time such as changing your decisions as to what addresses to assign to DLLs Or if you would now like to allow a larger size specify a larger size for the grow_limit option Note that the size that you specify is rounded up to a multiple of 64K if you are creating an ordinary DLL or 128K if you are making one of the implicit DLLs that constitute system library The...

Page 228: ...fect Fatal error eld immediately stops without creating or updating the output file Recovery The use of the check_registry option means that you have been using a private DLL registry to keep track of memory addresses of DLLs so that you always rebuild them at the same addresses as before and so that it will be an error if one of them grows larger than the space allocated for it Now that has happe...

Page 229: ... a block of space in the registry that was large enough for the DLL and eld has put it there This might or might not be the same starting address as before but it definitely is a larger size than before Effect Warning eld produces the DLL and updates the registry but the size and maybe also the address of the DLL has changed Recovery If the new address or size is satisfactory you don t need to do ...

Page 230: ...fault eld will start a DLL at 0x78000000 which gives 256 megabytes for its code and data before reaching the 0x80000000 boundary If you file is really larger than that it probably is too large for the operating system to handle in any case Splitting it into multiple DLLs may also not help if they all need to be in memory at the same time You probably must find some way to make your code or data sm...

Page 231: ...by explicitly telling eld where it is with the public_registry option One of the files mentioned in the message was supposed to exist in the same place as that public DLL registry file but wasn t If you gave the public_registry option then you are responsible for setting up all the files correctly Otherwise there is something wrong with your installation The procedure for creating and installing a...

Page 232: ...ptions There is never any reason to specify the call_shared option because it is the default Cause When you specify the temp_r option eld still first creates a temporary file in another place and when that file is created eld then tries to rename it to the filename specified in the temp_r option That renaming failed Effect Warning eld still re creates the private DLL registry but not using the fil...

Page 233: ...s a Guardian DEFINE and expand it to the name to use for the user library name But you are running eld on the PC or on OSS and on these platforms this type of parameter is not allowed Effect Fatal error eld immediately stops without creating an output file Recovery If you really wanted to use a name that begins with an equal sign for a user library name you can t On the PC or OSS the Guardian DEFI...

Page 234: ...t filename might not be correct As a result eld does not process the file Effect Fatal error eld stops immediately without creating an output file Recovery Contact your HP representative 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 For details on Cause and Recovery see eld Functionality for ...

Page 235: ... Bit on page 4 12 Effect Fatal error eld stops immediately without creating an output file 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 Glossary of Errors This glossary of errors provides more information about the words that appear in eld error messages Some glossary entries may also help y...

Page 236: ...at it cannot create a file or cannot open a workfile that will eventually become some file that may mean that the name you specified for such a file was invalid or that eld didn t have permission to create a file in that location Data segment A data segment is that portion of a program or DLL that contains writeable data that is allocated once before the process begins execution i e as opposed to ...

Page 237: ...4 MB as laid out by eld or else eld reports an error Data that requires GP relative addressing includes data so specified by compilers often called short data and various tables created by eld If you are building a loadfile that runs into this error situation you must try to link it a different way perhaps splitting it up into multiple DLL s rather than making it a single program or DLL If an inpu...

Page 238: ...e main program not the procedure in your own file named main needs to be linked together with the files you have compiled When you have the C or C compiler invoke the linker for you it should do that automatically In Cobol you also should not use the e option MAP DEFINE This is a feature available only on Guardian that allows a string that begins with an equal sign to represent a filename on the e...

Page 239: ...d possibly avoid the work of redoing it eld will only mark a file preset when there is a chance that the addresses could be correct at runtime Procinfo This is the name of the section of a linkfile that provides information about its procedures Program A program is an object file that contains the main code for a process eld builds programs out of linkfiles Public DLL registry This is a file that ...

Page 240: ...ating by giving the set systype option while building a program Text segment The text segment is that portion of a program or DLL that contains all the executable code other than gateways along with various header information and readonly data TNS E Tandem Non Stop E This is the name of the HP operating system for which eld processes object files Unresolved reference You can have an unresolved ref...

Page 241: ...L the usual way such as by a l option Variable data This refers to data that can be modified after the process has started running This is different from data that is constant or that contains addresses that may need to be modified when the process begins running but cannot be modified thereafter Workfile eld first creates workfiles for its output files and only at the end does it rename the workf...

Page 242: ...Output Listings and Error Handling eld Manual 527255 009 6 132 Glossary of Errors ...

Page 243: ...Work With Object Files a quick look at which HP NonStop operating system tools use object files The Object File Format Some of this general information may also be found in Sections One and Two of this manual but this appendix provides much more detail Basic Properties of Object Files User versions of TNS E tools may run in the following places All TNS E versions of the HP NonStop operating system...

Page 244: ... the user library and other DLLs is in the way the program identifies the user library that it uses For a DLL to be used as a user library at runtime its filename must be in the Guardian namespace An import library can take the place of a DLL at link time One use of import libraries is to save space Another use is for security when it is necessary for the linker to read the header information but ...

Page 245: ...of Object Files The first four bytes of an ELF file in the ELF header identify the file as an ELF file The fifth byte named e_ident EI_CLASS tells if it is the 32 bit or 64 bit version of ELF This distinguishes between TNS R and TNS E object files The e_machine field of the ELF header identifies the target platform This also distinguishes between TNS R and TNS E object files The e_type field of th...

Page 246: ... comment but it is discarded by the linker In a loadfile some of the sections are organized into segments There is always a text segment which comes at the beginning of the file There may be a gateway segment There may be either one or two data segments When there are two data segments they are called the data constant segment followed by the data variable segment The first column in the table on ...

Page 247: ...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 dynstr2 X 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 data can have more than one data segment rdata fptr srdata X got X IA_64 pltoff X sdata X sbss X bss ...

Page 248: ... the entire file It is always found at the start of an ELF file ELF Program Headers These contain information that summarizes the main parts of the object file required for loading into memory Program headers are required in loadfiles and import libraries tandem_info Section This contains more information of interest to the operating system It is required in loadfiles and import libraries It also ...

Page 249: ...ela dyn section see below but for the relocation sites whose targets are globalized symbols dynstr2 Section This is a string space that is pointed at from the dynamic liblist and dynsym gblzd sections Stack Unwinding Sections These contain information for stack unwinding Note that there are two such sections in a linkfile not counting the relocation table section named rela IA_64 unwind and three ...

Page 250: ...h Section This is a hash table for looking up symbols in the dynsym section It is required in loadfiles and import libraries dynsym Section This is the dynamic symbol table It contains information about symbols referenced in this loadfile or exported from this loadfile other than globalized symbols It is required in loadfiles and import libraries dynstr Section This is a string space that is point...

Page 251: ...ile got Section This is the global offset table which contains addresses of data items that are referenced indirectly as well as the addresses of official function descriptors and EnterPriv labels The linker creates entries in the got section as necessary The entries in the got section are found by 22 bit GP relative addressing IA_64 pltoff Section This section contains local function descriptors ...

Page 252: ...t has relocation sites For example rela data describes the relocation sites in the data section symtab Section This is the ELF symbol table It is required in linkfiles It contains information about symbols whose names are meaningful to the linker strtab Section This is a string space that is pointed at from the symtab section It is required in linkfiles procinfo Section This section provides infor...

Page 253: ... to be resident and some don t All the other things that would also need to be resident are placed before the restext section so that the restext section if present marks the end of the portion of the text segment that needs to be resident The HP NonStop operating system has also invented the rela gblzd section to handle globalized symbols in the implementation of C Other implementations take diff...

Page 254: ...ace smaller The procnames and procinfo sections provide additional information about procedures and subprocedures in linkfiles See Finding Information About Procedures and Subprocedures in Linkfiles on page A 26 for further information The size of executable code is always a multiple of 16 bytes because instructions are grouped into 128 bit bundles Actually the HP NonStop operating system compiler...

Page 255: ...ction has the name rdata but doesn t contain any relocation sites then the linker changes its name to rconst for the output file Note that a similar optimization is not done for srdata because that is GP addressable The sections named sdata srdata and sbss are called small data sections with the meaning that the compiler might choose to put small data items into them i e data items whose sizes are...

Page 256: ...s rather than code 101 files The linker sets this bit to 1 when it creates the program if the ansistreams option is specified or if the target platform is OSS The C_std_files_open bit is set to 1 rather than 0 to indicate that this program should automatically open the standard C C I O files This linker sets this bit to 1 if the program contains a main procedure that is written in C or C and the n...

Page 257: ...d is made absolute and in this case both _unwind and _unwind_size have the value 0 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 T...

Page 258: ...file and that is the address that is used for the symbol If the symbol is of type STB_GLOBAL then the definition of the symbol that is used to resolve the reference might exist in this object file or in another object file The process of figuring out the target address is called resolving the reference After a reference has been resolved the proper way to fill in the contents of the relocation sit...

Page 259: ...e same target symbol are consecutive This includes the case of relocation types whose names begin R_IA_64_REL which don t have a target symbol so that the target symbol index is 0 r_offset This tells the location of the relocation site In a linkfile r_offset is the offset into the section as the name implies In a loadfile r_offset tells the preferred virtual address of the relocation site so that ...

Page 260: ..._Rela because it means that the process of filling in the relocation site has less dependence on the contents of the site so there are fewer situations in which we need to be concerned about what happened to the relocation site if the process of filling in relocation sites got interrupted for an unpredictable reason Relocation Types The following table lists the relocation types The ones whose nam...

Page 261: ...f a local function descriptor R_IA_64_FPTR32MSB 0x44 Virtual address of an official function descriptor R_IA_64_FPTR64MSB 0x46 R_IA_64_PCREL60B 0x48 IP relative address R_IA_64_PCREL21B 0x49 R_IA_64_PCREL21M 0x4A R_IA_64_PCREL21F 0x4B R_IA_64_PCREL32MSB 0x4C R_IA_64_PCREL64MSB 0x4E R_IA_64_LTOFF_FPTR22 0x52 22 bit GP relative address of the got section entry for an official function descriptor R_I...

Page 262: ...d by the linker in loadfiles to tell what address should be in a got section entry at runtime when that got entry is to contain the address of a data item or the address of an EnterPriv label The R_IA_64_DIRx relocation types are also used in linkfiles to identify addresses that are stored in the DWARF symbol table sections R_IA_64_GPREL22 22 Bit GP Relative Address of a Data Item This applies to ...

Page 263: ...two items Here the compiler or assembler generates code that adds a signed 22 bit offset to the GP register in order to get the address of an entry in the got section which in turn contains the address of the data item The linker allocates that got section entry and fills in the 22 bit operand by subtracting the value of the GP register for this loadfile from the address of this got entry This rel...

Page 264: ...espond to four instruction varieties that can be used for this In all cases the target address is the address of a bundle which is a multiple of 16 so four 0 s are appended to the end of the operand The 21 bit forms are signed quantities that can therefore cover a region of 225 bytes or 16 megabytes forward or backward while the 60 bit form can reach any 64 bit address It is only correct to use IP...

Page 265: ...egment of the same loadfile This is the relocation type that is used for the fields in the stack unwinding sections of linkfiles Actually the relocation type is not important for this because the linker will change the format of these sections This or its 32 bit variation is also the relocation type that the linker internally uses for filling in addresses in the DWARF symbol table sections althoug...

Page 266: ...s explained above The difference is that the use of R_IA_64_LTOFF22X on that instruction and the use of R_IA_64_LDXMOV on other related instructions gives the linker permission to do an optimization Specifically the R_IA_64_LTOFF22X relocation table entry would be on an instruction with the format of addl to compute the address of a got entry by adding a 22 bit offset to the GP register The R_IA_6...

Page 267: ... an individual text section of a linkfile the compiler or assembler knows the final IP relative offsets to use These kinds of calculations do not require any relocation table entries Note 2 When there is a relocation table entry of type R_IA_64_FPTRx or R_IA_64_LTOFF_FPTR22 which are the ones that require the address of an official function descriptor and the target procedure exists in the same lo...

Page 268: ... For example it can affect which procedure is chosen as the main entry point when the allow_multiple_mains option tells the linker that it is okay to have more than one procedure with the MAIN attribute The DWARF Symbol Table The DWARF symbol table contains information used by debuggers and by the COBOL compiler whereas the symtab dynsym and dynsym gblzd sections contain information used by the li...

Page 269: ...er uses archives as a source of linkfiles Archives are not used at load time The format described here used for TNS E archives differs in various ways from what was used in the TNS R implementation An archive contains symbol table information that tells which linkfile within the archive if any provides a definition for a given symbol These would be the symbols defined in that linkfile and visible ...

Page 270: ... odd an extra zero byte at the end makes it even These strings are in the same order as the previous array of four byte integers For each name the corresponding four byte integer tells the file offset within the archive for the ar_hdr of the member that defines that symbol Symbols are only listed in the symbol table if they are defined somewhere A symbol may be defined in more than one member but ...

Page 271: ...____________ ar_hdr for the long member name string space the string space of long member names ______________________________ ar_hdr for the first member contents of the first member ______________________________ ar_hdr for the second member contents of the second member Tools That Work With Object Files Here is a list of some of the tools i e customer products that read and or write object file...

Page 272: ...h 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 ...

Page 273: ...her loadfile to resolve symbolic references at link time and or runtime It is therefore a loadfile that offers functions or data for use by other loadfiles For TNS E DLLs replace SRLs commonly associated with the TNS R architecture The object file linker eld generates DLLs for TNS E as does ld for the TNS R DLLs In UNIX this type of file is known as a shared object file or dynamic shared object DS...

Page 274: ...d execute only globally mapped address space shared by all processes without being specified to the linker or loader The public libraries on TNS E that replace System Code System Library and millicode These libraries are called implicit because every loadfile is implicitly a user of them Contrast with public DLLs which are explicit because a loadfile explicitly asks to use a public DLL although it...

Page 275: ...function is to process one or more linkfiles to create a loadfile Linker platform The system on which the linker executes Also called host or host platform LIC Library Import Characterization A data string that characterizes the information used by a linker or loader to bind the global symbols of a particular loadfile If the same loadfile is bound on two occasions and its LIC has not changed the t...

Page 276: ...In this document DLLs are such libraries A library cannot be invoked externally for example by a RUN command instead it is invoked by calls or data references from client loadfiles In TNS E functions and data can also be obtained from the system library and millicode Loader Library A public library for loading PIC programs and libraries It works in close cooperation with the operating system It is...

Page 277: ...eature allows a symbol to be moved from one DLL to another without relinking clients of the original DLL Re exporting is transitive i e if A re exports B and B re exports C then A re exports C Thus re exported libraries can re export other libraries to form a succession of re exported libraries of arbitrary length Region The Itanium architecture divides the address space into eight regions indexed...

Page 278: ... cannot have its symbol references to itself preempted See also SearchList Symbol The symbolic name of a function or data item Symbols are defined in loadfiles and referenced in the same or other loadfiles Symbol definition a function or data item whose name is the symbol Symbol value the address of a definition of that symbol Symbolic reference An occurrence in code or data of a symbol that is or...

Page 279: ...ram can be associated with at most one user library the association can be specified using the linker at link time or in a later change command or at run time using the process creation interfaces The LIB option to the RUN command in TACL uses these interfaces VHPT Virtual Hash Page Table an Itanium architecture feature that can supply missing TLB entries without generating faults VPROC The versio...

Page 280: ...Glossary eld Manual 527255 009 Glossary 8 Zreg file Zreg file This is the internal name of the public DLL registry file which lists the names of all the public DLL s ...

Page 281: ...tables 3 16 Enterprise Toolkit NonStop Edition See ETK Example of Use 1 9 Explicit library Glossary 1 Export Glossary 2 F 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 G Gateway Glossary 2 gateway segment 2 6 Gblzd Glossary 2 Globalized import Glossary 2 Globalized symbol Glossary 2 H host platforms 2 1 HP ...

Page 282: ...Multiply defined symbols 3 17 N non PIC libraries 3 22 O obey files 1 7 Object Files basic properties A 1 On OSS 2 17 Options and Tokens definition 1 5 output object files 2 4 Output Object files creation 2 5 P PIC Glossary 4 Position independent code PIC in general 1 5 Preempt Glossary 5 Presetting Glossary 4 presetting loadfiles 3 5 Process Glossary 5 Program Glossary 5 Public DLL Registry 3 23 ...

Page 283: ...lved references 3 8 unresolved references 3 8 unwind function 4 15 unwind information 4 15 User library Glossary 7 user library 3 10 user library definition 2 4 V VHPT Glossary 7 Visual Studio NET 1 3 VPROC Glossary 7 W When eld is creating a new object file 2 17 Z Zimpimp file Glossary 7 Zreg file Glossary 8 Special Characters alf option looks for DLLs 4 3 b globalized 3 3 b localized 3 3 b semi_...

Reviews: