Description

ax [options] archive-file input-files

The ax command creates library archives of .o object files for use by the linker.

By convention, archives of object files for use by the linker are given the extension .a. The linker can search such library archives and extract only those object files which are needed to provide definitions of undefined symbols. This provides a convenient way to make a number of object files available to the linker while linking in only those which are necessary.

There are two important features supported for version 1.8.9:

  1. Filenames longer than 15 characters are now fully supported by ax and by all Green Hills tools which operate on archives. This is accomplished by storing the full name of the file in a hidden member of the archive called //. The filename field of the archive header for the file with a long name will have an entry of the form /nnn where nnn is a decimal integer representing an offset into the // file where the entire filename can be found.
  2. A table of contents, also known as a symbol table, is now generated by ax whenever the archive is modified by either the d or r option. This table of contents is stored in the form of a hidden file named / which is always the first file in the archive. In 1.8.8 the granlib utility was provided to generate this table of contents, but in 1.8.9, the granlib utility is no longer needed, because this operation is integrated within ax. The new options s and S are provided to force or prevent the creation of a table of contents.

The lx linker supports archives with or without a table of contents, but the

table of contents is necessary for the -rescan option to lx to have any effect.

Future linkers will require the table of contents in order to process an

archive.


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.