<s>
The	O
archiver	O
,	O
also	O
known	O
simply	O
as	O
ar	B-Application
,	O
is	O
a	O
Unix	B-Application
utility	I-Application
that	O
maintains	O
groups	O
of	O
files	O
as	O
a	O
single	O
archive	B-Application
file	I-Application
.	O
</s>
<s>
Today	O
,	O
ar	B-Application
is	O
generally	O
used	O
only	O
to	O
create	O
and	O
update	O
static	B-Library
library	I-Library
files	O
that	O
the	O
link	B-Application
editor	I-Application
or	O
linker	B-Application
uses	O
and	O
for	O
generating	O
.deb	O
packages	O
for	O
the	O
Debian	O
family	O
;	O
it	O
can	O
be	O
used	O
to	O
create	O
archives	O
for	O
any	O
purpose	O
,	O
but	O
has	O
been	O
largely	O
replaced	O
by	O
tar	B-Application
for	O
purposes	O
other	O
than	O
static	B-Library
libraries	I-Library
.	O
</s>
<s>
An	O
implementation	O
of	O
ar	B-Application
is	O
included	O
as	O
one	O
of	O
the	O
GNU	B-Application
Binutils	I-Application
.	O
</s>
<s>
In	O
the	O
Linux	B-Application
Standard	I-Application
Base	I-Application
(	O
LSB	O
)	O
,	O
ar	B-Application
has	O
been	O
deprecated	O
and	O
is	O
expected	O
to	O
disappear	O
in	O
a	O
future	O
release	O
of	O
that	O
standard	O
.	O
</s>
<s>
The	O
rationale	O
provided	O
was	O
that	O
"	O
the	O
LSB	O
does	O
not	O
include	O
software	O
development	O
utilities	O
nor	O
does	O
it	O
specify	O
.o	B-Application
and	O
.a	B-Library
file	O
formats.	O
"	O
</s>
<s>
The	O
ar	B-Application
format	O
has	O
never	O
been	O
standardized	O
;	O
modern	O
archives	O
are	O
based	O
on	O
a	O
common	O
format	O
with	O
two	O
main	O
variants	O
,	O
BSD	B-Operating_System
and	O
System	B-Operating_System
V	I-Operating_System
(	O
initially	O
known	O
as	O
COFF	O
,	O
and	O
used	O
as	O
well	O
by	O
GNU	B-Operating_System
,	O
ELF	O
,	O
and	O
Windows	B-Library
.	O
)	O
</s>
<s>
Historically	O
there	O
have	O
been	O
other	O
variants	O
including	O
V6	B-Operating_System
,	O
V7	B-Operating_System
,	O
AIX	O
(	O
small	O
and	O
big	O
)	O
,	O
and	O
Coherent	O
,	O
which	O
all	O
vary	O
significantly	O
from	O
the	O
common	O
format	O
.	O
</s>
<s>
An	O
ar	B-Application
file	O
begins	O
with	O
a	O
global	O
header	B-General_Concept
,	O
followed	O
by	O
a	O
header	B-General_Concept
and	O
data	O
section	O
for	O
each	O
file	O
stored	O
within	O
the	O
ar	B-Application
file	O
.	O
</s>
<s>
Each	O
file	O
stored	O
in	O
an	O
ar	B-Application
archive	B-Application
includes	O
a	O
file	B-General_Concept
header	I-General_Concept
to	O
store	O
information	O
about	O
the	O
file	O
.	O
</s>
<s>
As	O
the	O
headers	B-General_Concept
only	O
include	O
printable	O
ASCII	O
characters	O
and	O
line	O
feeds	O
,	O
an	O
archive	B-Application
containing	O
only	O
text	O
files	O
therefore	O
still	O
appears	O
to	O
be	O
a	O
text	O
file	O
itself	O
.	O
</s>
<s>
"	O
Each	O
archive	B-Application
file	I-Application
member	O
begins	O
on	O
an	O
even	O
byte	O
boundary	O
;	O
a	O
newline	O
is	O
inserted	O
between	O
files	O
if	O
necessary	O
.	O
</s>
<s>
Due	O
to	O
the	O
limitations	O
of	O
file	O
name	O
length	O
and	O
format	O
,	O
both	O
the	O
GNU	B-Operating_System
and	O
BSD	B-Operating_System
variants	O
devised	O
different	O
methods	O
of	O
storing	O
long	O
filenames	O
.	O
</s>
<s>
Although	O
the	O
common	O
format	O
does	O
not	O
suffer	O
from	O
the	O
year	B-Application
2038	I-Application
problem	I-Application
,	O
many	O
implementations	O
of	O
the	O
ar	B-Application
utility	O
do	O
and	O
may	O
need	O
to	O
be	O
modified	O
in	O
the	O
future	O
to	O
handle	O
correctly	O
timestamps	O
in	O
excess	O
of	O
2147483647	O
.	O
</s>
<s>
Depending	O
on	O
the	O
format	O
,	O
many	O
ar	B-Application
implementations	O
include	O
a	O
global	O
symbol	O
table	O
(	O
aka	O
armap	O
,	O
directory	O
or	O
index	O
)	O
for	O
fast	O
linking	B-Application
without	O
needing	O
to	O
scan	O
the	O
whole	O
archive	B-Application
for	O
a	O
symbol	O
.	O
</s>
<s>
POSIX	O
recognizes	O
this	O
feature	O
,	O
and	O
requires	O
ar	B-Application
implementations	O
to	O
have	O
an	O
option	O
for	O
updating	O
it	O
.	O
</s>
<s>
BSD	B-Operating_System
ar	B-Application
stores	O
filenames	O
right-padded	O
with	O
ASCII	O
spaces	O
.	O
</s>
<s>
4.4BSD	O
ar	B-Application
stores	O
extended	O
filenames	O
by	O
placing	O
the	O
string	O
"	O
#1	O
/	O
"	O
followed	O
by	O
the	O
file	O
name	O
length	O
in	O
the	O
file	O
name	O
field	O
,	O
and	O
storing	O
the	O
real	O
filename	O
in	O
front	O
of	O
the	O
data	O
section	O
.	O
</s>
<s>
BSD	B-Operating_System
ar	B-Application
utility	O
traditionally	O
does	O
not	O
handle	O
the	O
building	O
of	O
a	O
global	O
symbol	O
lookup	O
table	O
,	O
and	O
delegates	O
this	O
task	O
to	O
a	O
separate	O
utility	O
named	O
ranlib	O
,	O
which	O
inserts	O
an	O
architecture-specific	O
file	O
named	O
__.SYMDEF	O
as	O
first	O
archive	B-Application
member	O
.	O
</s>
<s>
A	O
64-bit	O
variant	O
called	O
exists	O
on	O
Darwin	B-Operating_System
.	O
</s>
<s>
Since	O
POSIX	O
added	O
the	O
requirement	O
for	O
the	O
option	O
as	O
an	O
replacement	O
of	O
ranlib	O
,	O
however	O
,	O
newer	O
BSD	B-Operating_System
ar	B-Application
implementations	O
have	O
been	O
rewritten	O
to	O
have	O
this	O
feature	O
.	O
</s>
<s>
FreeBSD	O
in	O
particular	O
ditched	O
the	O
SYMDEF	O
table	O
format	O
and	O
embraced	O
the	O
System	B-Operating_System
V	I-Operating_System
style	O
table	O
.	O
</s>
<s>
System	B-Operating_System
V	I-Operating_System
ar	B-Application
uses	O
a	O
'	O
/	O
'	O
character	O
(	O
0x2F	O
)	O
to	O
mark	O
the	O
end	O
of	O
the	O
filename	O
;	O
this	O
allows	O
for	O
the	O
use	O
of	O
spaces	O
without	O
the	O
use	O
of	O
an	O
extended	O
filename	O
.	O
</s>
<s>
Then	O
it	O
stores	O
multiple	O
extended	O
filenames	O
in	O
the	O
data	O
section	O
of	O
a	O
file	O
with	O
the	O
name	O
"	O
//	O
"	O
,	O
this	O
record	O
is	O
referred	O
to	O
by	O
future	O
headers	B-General_Concept
.	O
</s>
<s>
A	O
header	B-General_Concept
references	O
an	O
extended	O
filename	O
by	O
storing	O
a	O
"	O
/	O
"	O
followed	O
by	O
a	O
decimal	O
offset	O
to	O
the	O
start	O
of	O
the	O
filename	O
in	O
the	O
extended	O
filename	O
data	O
section	O
.	O
</s>
<s>
System	B-Operating_System
V	I-Operating_System
ar	B-Application
uses	O
the	O
special	O
filename	O
"	O
/	O
"	O
to	O
denote	O
that	O
the	O
following	O
data	O
entry	O
contains	O
a	O
symbol	O
lookup	O
table	O
,	O
which	O
is	O
used	O
in	O
ar	B-Application
libraries	O
to	O
speed	O
up	O
access	O
.	O
</s>
<s>
One	O
for	O
each	O
symbol	O
,	O
recording	O
the	O
position	O
within	O
the	O
archive	B-Application
of	O
the	O
header	B-General_Concept
for	O
the	O
file	O
containing	O
this	O
symbol	O
.	O
</s>
<s>
Some	O
System	B-Operating_System
V	I-Operating_System
systems	O
do	O
not	O
use	O
the	O
format	O
described	O
above	O
for	O
the	O
symbol	O
lookup	O
table	O
.	O
</s>
<s>
For	O
operating	O
systems	O
such	O
as	O
HP-UX	B-Application
11.0	O
,	O
this	O
information	O
is	O
stored	O
in	O
a	O
data	O
structure	O
based	O
on	O
the	O
SOM	B-Application
file	O
format	O
.	O
</s>
<s>
To	O
overcome	O
the	O
4	O
GiB	O
file	O
size	O
limit	O
some	O
operating	O
system	O
like	O
Solaris	O
11.2	O
and	O
GNU	B-Operating_System
use	O
a	O
variant	O
lookup	O
table	O
.	O
</s>
<s>
The	O
Windows	B-Library
(	O
PE/COFF	O
)	O
variant	O
is	O
based	O
on	O
the	O
SysV/GNU	O
variant	O
.	O
</s>
<s>
The	O
first	O
entry	O
"	O
/	O
"	O
has	O
the	O
same	O
layout	O
as	O
the	O
SysV/GNU	O
symbol	O
table	O
.	O
</s>
<s>
The	O
third	O
entry	O
is	O
the	O
optional	O
"	O
//	O
"	O
long	O
name	O
data	O
as	O
in	O
SysV/GNU	O
.	O
</s>
<s>
The	O
version	O
of	O
in	O
GNU	B-Application
binutils	I-Application
and	O
Elfutils	O
have	O
an	O
additional	O
"	O
thin	O
archive	B-Application
"	O
format	O
with	O
the	O
magic	O
number	O
.	O
</s>
<s>
A	O
thin	O
archive	B-Application
only	O
contains	O
a	O
symbol	O
table	O
and	O
references	O
to	O
the	O
file	O
.	O
</s>
<s>
The	O
file	O
format	O
is	O
essentially	O
a	O
System	B-Operating_System
V	I-Operating_System
format	O
archive	B-Application
where	O
every	O
file	O
is	O
stored	O
without	O
the	O
data	O
sections	O
.	O
</s>
<s>
Every	O
filename	O
is	O
stored	O
as	O
a	O
"	O
long	O
"	O
filename	O
and	O
they	O
are	O
to	O
be	O
resolved	O
as	O
if	O
they	O
were	O
symbolic	B-Application
links	I-Application
.	O
</s>
<s>
To	O
create	O
an	O
archive	B-Application
from	O
files	O
,	O
,	O
,	O
the	O
following	O
command	B-Application
would	O
be	O
used	O
:	O
</s>
