Directory header |
Directory entry 0 |
Directory entry 1 |
. |
. |
. |
Directory entry n |
2 | 2 | 4 | 4 | 4 |
cbDirHeader | cbDirEntry | cDir | lfoNextDir | flags |
cbDirHeader Length of the directory header
cbDirEntry Length of each directory entry
cDir Number of directory entries
lfoNextDir Offset from lfaBase of next directory. This field is currently unused. It is intended for use by the incremental linker to point to the next directory containing Symbol and Type OMF information from an incremental link.
flags Flags describing directory and subsection tables. No values have been defined for this field.
The directory header structure is followed by the directory entries which specify the subsection type, module index if applicable, the subsection offset, and subsection size.2 | 2 | 4 | 4 |
subsection | iMod | lfo | cb |
subsection Subdirectory index. See the table below for a listing of the valid subsection indices.
iMod Module index. This number is 1 based and zero is never a valid index. The index 0xffff is reserved for tables that are not associated with a specific module. These tables include sstLibraries, sstGlobalSym, sstGlobalPub and sstGlobalTypes.
lfo Offset from the base address lfaBase
cb Number of bytes in subsection
There is no requirement for a particular subsection to exist for a particular module. There is a preferred order for subsections within the Symbol and Type OMF portion and the subsection directory of the file as emitted by the linker (NB05 signature). The preferred order is:
sstModule1 | Module 1 |
. | . |
sstModulen | Module n |
sstTypes1 | Module 1 |
sstPublics1 | Module 1 |
sstSymbols1 | Module 1 |
sstSrcModule1 | Module 1 |
. | |
sstTypesn | Module n |
sstPublicsn | Module n |
sstSymbolsn | Module n |
sstSrcModulen | Module n |
sstLibraries | |
directory |
NBxx | signature |
lfoDir | directory offset |
sstModule1 | Module 1 |
. | . |
sstModulen | Module n |
sstAlignSym1 | Module 1 |
sstSrcModule1 | Module 1 |
. | |
sstAlignSymn | Module n |
sstSrcModulen | Module n |
sstGlobalPub | Global Publics |
sstGlobalSym | Global Symbols |
sstLibraries | Libraries |
sstGlobalTypes | Global Types |
Directory | |
NBxx | signature if OMF executable |
lfoBase | offset of base if OMF executable |
NBxx | signature |
lfoDir | directory offset |
sstModule1 | Module 1 |
. | . |
sstModulen | Module n |
sstAlignSym1 | Module 1 |
sstSrcModule1 | Module 1 |
. | |
sstAlignSymn | Module n |
sstSrcModulen | Module n |
sstGlobalPub | Global Publics |
sstGlobalSym | Global Symbols |
sstLibraries | Libraries |
sstGlobalTypes | Global Types |
sstStaticSym | Static Symbols |
sstFileIndex | File Index |
sstOffsetMap16 sstOffsetMat32 | |
Directory | |
NBxx | signature |
lfoBase | offset |