AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
I�
AR( 4 ) AR ( 4) NAME ar - common archive file format DESCRIPTION The archive command ar(1) is used to combine several files into one. Archives are used mainly as libraries to be searched by the link editor ld ( 1 ). Each archive begins with the archive magic string. #define ARMAG #define SARMAG 8 "! n" /* magic string*/ /*length of magic string*/ Each archive which contains common object files (see a. out(4)) includes an archive symbol table. This symbol table is used by the link editor ld(1) to determine which archive members must be loaded during the link edit process. The archive symbol table (if it exists) is always the first file in the archive (but is never listed) and is automatically created and/or updated by ar. Following the archive magic string are the archive file members. Each file member is preceded by a file member header which is of the following format: #define ARFMAG ,, n" /*header trailer string*/ struct ar_hdr /*file member header*/ { char ar_name[16J; /*'/' terminated file member name */ char ar_date[12j; /* file member date * / char ar_uid[BJ; /* file member user identification*/ char ar __gid[Bj; /* file member group identification*/ char ar_mode[8J; /* file member mode (octal)*/ char ar_size[lOj; /* file member size * / char ar _fmag(2); f* header trailer string * / }; All information in the file member headers is in printable ASCII. The numeric information contained in the headers is stored as decimal numbers (except for ar_mode which is in octal). Thus, if the archive contains printable files, the archive itself is printable. The ar_name field is blank-padded and slash (/) terminated. The ar_date field is the modification date of the file at the time of its insertion into the archive. Common format archives can be moved from system to system as long as the portable archive command ar(1) is used. Each archive file member begins on an even byte boundary; a newline is inserted between files if necessary. Nevertheless the size given reflects the actual size of the file exclusive of padding. Notice there is no provision for empty areas in an archive file. If the archive symbol table exists, the first file in the archive has a zero length name (i.e., ar_name[O] =='/'). The contents of this file are as follows: - 1 -
- Page 1004 and 1005: TAM (3T) wputc() wputs() wprintf()
- Page 1006 and 1007: TAM (3T) (AT&T UNIX PC only ) TAM(3
- Page 1008 and 1009: I I I I I I I II I I I I � r"j I
- Page 1010 and 1011: TMPNAM (3S) TMPNAM (3S) SEE ALSO cr
- Page 1012 and 1013: TRACK (3T) (AT&T UNIX PC only ) TRA
- Page 1015: TRIG ( 3M ) TRIG ( 3M) NAME sin, co
- Page 1018 and 1019: TSEARCH ( 3C ) TSEARCH ( 3C ) data
- Page 1021: TTYNAME ( 3C ) TTYNAME ( 3C ) NAME
- Page 1025 and 1026: UNGETC ( 3S ) UNGETC ( 3S ) NAME un
- Page 1027 and 1028: VPRINTF ( 3S ) VPRINTF ( 3S ) NAME
- Page 1029 and 1030: WIND ( 3T ) ( AT&T UNIX PC only ) W
- Page 1031 and 1032: WRASTOP ( 3T ) ( AT&T UNIX PC only
- Page 1033: INTRO ( 4) INTRO ( 4) NAME intro -
- Page 1036 and 1037: A.OUT ( 4) A.OUT ( 4) data segment
- Page 1038 and 1039: A.OUT (4) A.OUT (4) char n_numaux;
- Page 1041 and 1042: ADF ( 4) (AT&T UNIX PC only ) ADF (
- Page 1043 and 1044: ADF ( 4 ) (AT&T UNIX PC only ) \ \
- Page 1045 and 1046: ADF ( 4) (AT&T UNIX PC only ) FORMA
- Page 1047 and 1048: ADF (4) (AT&T UNIX PC only ) ADF (4
- Page 1049 and 1050: ADF (4) (AT&T UNIX PC only ) ADF (
- Page 1051 and 1052: ADF ( 4) (AT&T UNIX PC only ) ADF (
- Page 1053: ADF ( 4 ) (AT&T UNIX PC only ) Toke
- Page 1057: CHECKLIST ( 4 ) CHECKLIST ( 4 ) NAM
- Page 1060 and 1061: I I I I I I II I I I I I I I I I I
- Page 1063 and 1064: Dffi ( 4 ) Dffi ( 4 ) NAME dir - fo
- Page 1065: FILEHDR (4) (not. on PDP-11) FILEHD
- Page 1068 and 1069: FONT ( 4) (AT&T UNIX PC only ) FONT
- Page 1070 and 1071: I�
- Page 1072 and 1073: FS (4) FS (4) S_type indicates the
- Page 1074 and 1075: (�
- Page 1076 and 1077: FSPEC ( 4) FSPEC ( 4) Several UNIX
- Page 1078 and 1079: GETTYDEFS ( 4) GETTYDEFS ( 4 ) sett
- Page 1080 and 1081: � , __
- Page 1082 and 1083: INITTAB ( 4) INITTAB ( 4) I etclini
- Page 1084 and 1085: I I �I I I I I � I I 1� 1 1 I
- Page 1086 and 1087: (� .
- Page 1089 and 1090: � LDFCN( 4) LDFCN( 4) NAME ldfcn
- Page 1091: LDFCN( 4) LDFCN{4) REWIND(Idptr) FE
- Page 1095 and 1096: MASTER ( 4) MASTER (4) NAME master
- Page 1097: MNTTAB (4) MNTTAB (4) NAME mnttab -
- Page 1100 and 1101: PASSWD (4) PASSWD ( 4) Haphazard mo
- Page 1102 and 1103: PHONE (4) 02 (short) 03 (short) 04
AR( 4 ) AR ( 4)<br />
NAME<br />
ar - common archive file format<br />
DESCRIPTION<br />
The archive command ar(1) is used to combine several files into<br />
one. Archives are used mainly as libraries to be searched by the<br />
link editor ld ( 1 ).<br />
Each archive begins with the archive magic string.<br />
#define ARMAG<br />
#define SARMAG 8<br />
"! n" /* magic string*/<br />
/*length of magic string*/<br />
Each archive which contains common object files (see a. out(4))<br />
includes an archive symbol table. This symbol table is used by<br />
the link editor ld(1) to determine which archive members must be<br />
loaded during the link edit process. The archive symbol table (if<br />
it exists) is always the first file in the archive (but is never listed)<br />
and is automatically created and/or updated by ar.<br />
Following the archive magic string are the archive file members.<br />
Each file member is preceded by a file member header which is of<br />
the following format:<br />
#define ARFMAG ,, n" /*header trailer string*/<br />
struct ar_hdr /*file member header*/<br />
{<br />
char ar_name[16J; /*'/' terminated file member name */<br />
char ar_date[12j; /* file member date * /<br />
char ar_uid[BJ; /* file member user identification*/<br />
char ar __gid[Bj; /* file member group identification*/<br />
char ar_mode[8J; /* file member mode (octal)*/<br />
char ar_size[lOj; /* file member size * /<br />
char ar _fmag(2); f* header trailer string * /<br />
};<br />
All information in the file member headers is in printable ASCII.<br />
The numeric information contained in the headers is stored as<br />
decimal numbers (except for ar_mode which is in octal). Thus, if<br />
the archive contains printable files, the archive itself is printable.<br />
The ar_name field is blank-padded and slash (/) terminated. The<br />
ar_date field is the modification date of the file at the time of its<br />
insertion into the archive. Common format archives can be<br />
moved from system to system as long as the portable archive command<br />
ar(1) is used.<br />
Each archive file member begins on an even byte boundary; a<br />
newline is inserted between files if necessary. Nevertheless the size<br />
given reflects the actual size of the file exclusive of padding.<br />
Notice there is no provision for empty areas in an archive file.<br />
If the archive symbol table exists, the first file in the archive has a<br />
zero length name (i.e., ar_name[O] =='/'). The contents of this<br />
file are as follows:<br />
- 1 -