Kaisa is a C# parser for Windows .lib
archive/library files. It is primarily intended to read import libraries, but it does provide basic support for parsing object files too.
This project is licensed under the MIT License. See the license file for details.
The parser should tolerate any library file, but only the following information is explicitly parsed and exposed:
- V1 index files (AKA "first linker member")
- V2 index files (AKA "second linker member")
- The longnames file
- Import objects
- COFF objects
- Header (all members)
- Extended names from the string table (IE:
/123
) are not resolved
- Extended names from the string table (IE:
- The section table
- The symbol table, including the string table.
- Note that the string table is not exposed on the API surface. It is discarded after the symbol table is read.
- Header (all members)
The following are explicitly not parsed or exposed for COFF objects: (Although enough information is exposed that you should be able to parse them yourself.)
- The optional (image-only) COFF header
- Section data
- COFF relocations
- COFF line numbers
- The (image-only) attribute certificate table
- Delay-load import only tables (image-only)
There is currently no attempt at parsing System V or GNU AR archives since it is currently implemented from the Microsoft spec. Some AR archive fields that are meaningless to the Microsoft spec (such as the UID and GID) are skipped when parsing.
There is no support for PE (image) files. (You can probably use System.Reflection.PortableExecutable for those.)
This library primarily exists to support the librarian functionality in Biohazrd. Not a ton of thought went into the API, especially for things not needed by Biohazrd. As such I might tweak the API to better support these needs as they evolve. I consider this library to be pretty niche, so if you use this library in a major way consider posting a discussion or DMing me so I know to avoid breaking you.