14.3.2. LIB_DIRY

The LIB_DIRY chunk contains a directory of the modules in the library, each of which is stored in a LIB_DATA chunk. The directory size is fixed when the library is created. The directory consists of a sequence of variable length entries, each an integral number of words long. The number of directory entries is determined by the size of the LIB_DIRY chunk. Table 14.2 shows the layout.

Table 14.2. The LIB_DIRY chunk

ChunkIndex 
EntryLengthThe size of this LIB_DIRY chunk (an integral number of words).
DataLengthThe size of the Data (an integral number of words).
Data 

where:

ChunkIndex

is a word containing the zero-origin index within the chunk file header of the corresponding LIB_DATA chunk. Conventionally, the first three chunks of an OFL file are LIB_DIRY, LIB_TIME and LIB_VRSN, 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.

Data

consists of, in order:

  • a zero-terminated string (the name of the library member). Strings should contain only ISO-8859 non-control characters (codes [0-31], 127 and 128+[0-31] are excluded). 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.

  • any other information relevant to the library module (often empty).

  • a two-word, word-aligned time stamp. 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.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C
Non-Confidential