Skip to content

A C# library for reading Windows .lib archives

License

Notifications You must be signed in to change notification settings

PathogenPlayground/Kaisa

 
 

Repository files navigation

Kaisa the Sharp Librarian

MIT Licensed CI Status Sponsor

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.

License

This project is licensed under the MIT License. See the license file for details.

Library file feature support

The parser should tolerate any library file, but only the following information is explicitly parsed and exposed:

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.)

API Stability

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.