The IAR Archive Tool—iarchive—creates and manipulates a library (anarchive) of several ELF object files.
Usage: iarchive [command] archive obj1 ... objN iarchive [command] obj1 ... objN -o archive iarchive [command] archiveAvailable command line options:--create Create new archive--delete-d Delete module(s) from archive--extract-x Extract module(s) from archive--output archive-o archive Name of archive file--replace-r Replace or add module(s) to archive--symbols List symbol table of archive--toc-t List archive table of content--verbose-V verbose operation-f file Read command line options from file
The IAR Archive Tool, iarchive, can create a library (an archive) file from several ELF object files.
You can also use iarchaive to manipulate ELF libraries.
A library file contains several relocatable ELF object modules, each of which can be independently used by a linker.
In contrast with object modules specified directly to the linker, each module in a library is only included if it is needed.
The invocation syntax for the archive builder is:
iarchive parameters
command Command line options that define an operation to be performed. Such an option must be specified before the name of the library file.
libraryfile The library file to be operated on.
objectfile1 ... objectfileN The object file(s) that the specified command operates on.
options Command line options that define actions to be performed. These options can be placed anywhere on the command line.
This example creates a library file called mylibrary.a from the source object files module1.o, module.2.o, and module3.o:
iarchive mylibrary.a module1.o module2.o module3.o
This example lists the contents of mylibrary.a:
iarchive --toc mylibrary.a
This example replaces module3.o in the library with the content in the module3.o file and appends module4.o to mylibrary.a:
iarchive --replace mylibrary.a module3.o module4.o
command
--create Creates a library that contains the listed object files.
--create libraryfile objectfile1 ... objectfileN
--delete, -d Deletes the listed object files from the library.--delete libraryfile objectfile1 ... objectfileN
--extract, -x Extracts the listed object files from the library.--extract libraryfile [objectfile1 ... objectfileN]
--replace, -r Replaces or appends the listed object files to the library.--replace libraryfile objectfile1 ... objectfileN
--symbols Lists all symbols defined by files in the library.--symbols libraryfile Use this command to list the names of all object files (modules) in a specified library
--toc, -t Lists all files in the library.--toc libraryfile
options
-f Extends the command line.
-f filename
--output, -o Specifies the library file.-o {filename|directory}
By default, iarchive assumes that the first argument after the iarchive command is the name of the destination library.
Use this option to explicitly specify a different filename for the library.
--silent Sets silent operation.
Causes the tool to operate without sending any messages to the standard output stream
--verbose, -V Reports all performed operations.Use this option to make the tool report which operations it performs, in addition to giving diagnostic messages.