HP eld Manual page 270

Table of Contents

Advertisement

TNS/E Native Object Files
Here is the declaration for the ar_hdr structure:
typedef struct ar_hdr {
char
char
char
char
char
char
char
} ar_hdr;
The size of this structure is 60 bytes.
The ar_size fi
eld
ar_name fi
eld
of the fi
is filled with blanks. The other fi
eld
character fi
eld
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 fi
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.
ar_name [16];
ar_date [12];
ar_uid [6];
ar_gid [6];
ar_mode [8];
ar_size [10];
ar_fmag [2];
tells the size of the contents of this piece of the archive, and the
tells its name. When the name is less than 16 characters long, the rest
s.
eld Manual—527255-009
s of the ar_hdr are all readable ASCII
eld
eld
A-28
for the member consists of
Archives

Advertisement

Table of Contents
loading

Table of Contents