buzzlightyear726 / owl

An ELF parser in pure OCaml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ELF Parser in Pure OCaml

Build and Test

This is a work-in-progress library for reading ELF files. Once complete, at minimum, it will allow the user to read the symbol table, associate source code location information with instruction addresses, etc.

Goals, In Decreasing Order of Importance

  • Get better at writing OCaml and document key lessons
  • Make the library feature complete
  • Make it fast

Non-Goals, At Least for Now

  • Make the code production-ready

Key Features of this Library

  • Uses the Result monad (instead of exceptions) for error handling
  • Uses true 64-bit unsigned integer types for uint64 fields, instead of int64
  • Checks for buffer overflows before reading bytes
  • Supports both little- and big-endian encoding

Acknowledgements

  • let-def/owee: Owee is an excellent library with identical goals, but Owee has limited support for DWARF5.

  • golang/go: I am using the ELF and DWARF code as the reference implementation for my project.

  • elftoolchain: The ELF Toolchain project contains a handy elfc script, which generates binary ELF files based on a YAML description.

LICENSE

Owl is licensed under CC0. No rights reserved.

About

An ELF parser in pure OCaml

License:Creative Commons Zero v1.0 Universal


Languages

Language:OCaml 52.9%Language:Python 47.1%