Tag: AR
The archiver (also known simply as ar) is a Unix utility that maintains groups of files as a single archive file. Today, ar is generally used only to create and update static library files that the link editor or linker uses; it can be used to create archives for any purpose, but has been largely replaced by tar for purposes other than static libraries. An implementation of ar is included as one of the GNU Binutils.
The ar format has never been standardized; modern archives are based on a common format with two known variants, BSD and GNU.
Historically there have been other variants including AIX (small), AIX (big) and Coherent, which all vary significantly from the common format.
Debian “.deb” archives use the common format.
An ar file begins with a global header, followed by a header and data section for each file stored within the ar file.
The data section is 2 byte aligned. If it would end on an odd offset, a ‘n’ is used as filler.
The global header is a single field containing…