13 MPLAB XC32 Object Archiver/Librarian
The MPLAB XC32 Object Archiver/Librarian (xc32-ar
)
creates, modifies and extracts files from archives. This tool is one of several utilities.
An “archive” is a single file holding a collection of other files in a structure that makes
it possible to retrieve the original individual files (called “members” of the
archive).
The 32-bit archiver/librarian can maintain archives whose members have names of any length; however, if an f
modifier is used, the file names will be truncated to 15 characters.
The archiver is considered a binary utility because archives of this sort are most often used as “libraries” holding commonly needed subroutines.
The archiver creates an index to the symbols defined in relocatable object modules in the archive when you specify the modifier s
. Once created, this index is updated in the archive whenever the archiver makes a change to its contents (save for the q
update operation). An archive with such an index speeds up linking to the library and allows routines in the library to call each other without regard to their placement in the archive.
You may use xc32-nm -s
or xc32-nm --print-armap
to list this index table. If an archive lacks the table, another form of the 32-bit archiver/librarian called xc32-ranlib
can be used to add only the table.
The 32-bit archiver/librarian is designed to be compatible with two different facilities. You can control its activity using command-line options or, if you specify the single command line option -M
, you can control it with a script supplied via standard input.