eld Manual
Table Of Contents
- eld Manual
- Legal Notices
- Contents
- What’s New in This Manual
- Manual Information
- New and Changed Information
- About This Manual
- Notation Conventions
- 1 Introduction to eld
- 2 eld Input and Output
- 3 Binding of References
- Overview
- Presetting Loadfiles
- To Preset or Not to Preset, and Creation of the LIC
- Handling Unresolved References
- Using User Libraries
- Creating Import Libraries
- Ignoring Optional Libraries
- Merging Symbols Found in Input Linkfiles
- Accepting Multiply-Defined Symbols
- Using the -cross_dll_cleanup option
- Specifying Which Symbols to Export, and Creating the Export Digest
- Public Libraries and DLLs
- The Public Library Registry
- 4 Other eld Processing
- Adjusting Loadfiles: The -alf Option
- Additional rules about -alf
- The -set and -change Options
- eld Functionality for 64-Bit
- Checking the C++ Language Dialect
- Renaming Symbols
- Creating Linker-Defined Symbols
- Updating Or Stripping DWARF Symbol Table Information
- Modifying the Data Sections that Contain Stack Unwinding Information
- Creating the MCB
- Processing of Floating Point Versions and Data Models
- Specification of the Main Entry Point
- Specifying Runtime Search Path Information for DLLs
- Merging Source RTDUs
- 5 Summary of Linker Options
- 6 Output Listings and Error Handling
- A TNS/E Native Object Files
- Glossary
- Index
TNS/E Native Object Files
eld Manual—527255-009
A-28
Archives
Here is the declaration for the ar_hdr structure:
typedef struct ar_hdr {
char ar_name [16];
char ar_date [12];
char ar_uid [6];
char ar_gid [6];
char ar_mode [8];
char ar_size [10];
char ar_fmag [2];
} ar_hdr;
The size of this structure is 60 bytes.
The ar_size field tells the size of the contents of this piece of the archive, and the
ar_name field tells its name. When the name is less than 16 characters long, the rest
of the field is filled with blanks. The other fields of the ar_hdr are all readable ASCII
character fields.
In the ar_hdr for the symbol table piece, the ar_name is a single slash ("/").
The contents of the symbol table piece are the following (in this order):
a four-byte integer that tells the number of symbols in the symbol table piece
an array of four-byte integers
a string space (see below)
The integers mentioned above are binary integers (big endian).
The string space is a concatenation of strings, telling the names of the symbols in the
symbol table piece. Each name is terminated by a zero byte. If the total size is 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 the symbol table
only points at one place.
In the ar_hdr for the long member name string space, the ar_name is two slashes ("//").
The long member name string space is a concatenation of strings, telling the names of
the members whose names are longer than 16 bytes. Each name is terminated by a
slash ("/") and a newline character. If the total size is odd, an extra newline character
at the end makes it even.
In the ar_hdr for an archive member, the ar_name tells the name of the file that was
placed into the archive. If the name is longer than 16 bytes then it is stored instead in
the long member name string space and the ar_name field for the member consists of
a slash ("/") followed by an ASCII string for the integer value that is the byte offset of
the member's name in the long member name string space. Leading zeroes are
removed from this string, and it is blank filled on the right.










