Each piece of a library file is stored in a separate, identifiable chunk, named as follows:
-------------------------------------------------------- Chunk |Chunk Name -------------------------------------------------------- Directory |LIB_DIRY -------------------------------------------------------- Time stamp |LIB_TIME -------------------------------------------------------- Version |LIB_VSRN -------------------------------------------------------- Data |LIB_DATA -------------------------------------------------------- Symbol table |OFL_SYMT (object code libraries only) -------------------------------------------------------- Time stamp |OFL_TIME(object code libraries only) --------------------------------------------------------
There may be many LIB_DATA chunks in a library, one for each library member. In all chunks, word values are stored with the same byte order as the target system; strings are stored in ascending address order, which is independent of target byte order.
----------------------------------------------------- ChunkIndex | ----------------------------------------------------- EntryLength |the size of this LIB_DIRY chunk |(an integral number of words) ----------------------------------------------------- DataLength |the size of the Data (an |integral number of words) ----------------------------------------------------- Data | -----------------------------------------------------
ChunkIndex is a word containing the 0-origin index within the chunk file header of the corresponding LIB_DATA chunk. Conventionally, the first 3 chunks of an OFL file are LIB_DIRY, LIB_TIME and LIB_VSRN, so ChunkIndex is at least 3. A ChunkIndex of 0 means the directory entry is unused.
The corresponding LIB_DATA chunk entry gives the offset and size of the library module in the library file.
EntryLength is a word containing the number of bytes in this LIB_DIRY entry, always a multiple of 4.
DataLength is a word containing the number of bytes used in the data section of this LIB_DIRY entry, also a multiple of 4.
The Data section consists of, in order:
The string field is the name used to identify this library module. Typically it is the name of the file from which the library member was created.
The format of the time stamp is described in Time stamps. Its value is an encoded version of the last-modified time of the file from which the library member was created.
To ensure maximum robustness with respect to earlier, now obsolete, versions of the ARM object library format:
Time stamps
A library time stamp is a pair of words encoding the following:
The first word stores the most significant 4 bytes of the 6-byte count; the least significant 2 bytes of the count are in the most significant half of the second word.
The least significant half of the second word contains the microsecond count and is usually 0.
Time stamp words are stored in target system byte order: they must have the same endianness as the containing chunk file.
No other interpretation is placed on the contents of a member by the library management tools. A member could itself be a file in chunk file format or even another library.