package owee

  1. Overview
  2. Docs
type header = {
  1. owner : string;
  2. typ : int;
    (*

    each owner defines its own types

    *)
  3. size : int;
    (*

    size of the note's descriptor that follows the header

    *)
}
val read_header : Owee_buf.cursor -> header
val read_desc_size : Owee_buf.cursor -> expected_owner:string -> expected_type:int -> int

Reads the header and returns the size of the note's descriptor. Raises if the expected_owner or expected_type does not match the header.

val find_notes_section : Owee_elf.section array -> string -> Owee_elf.section

Wrapper around Owee_elf.find_section that checks section type is SHT_NOTE.

exception Section_not_found of string
module Stapsdt : sig ... end
val read_buildid : Owee_buf.t -> Owee_elf.section array -> string

get_buildid buf sections Reads ".note.gnu.build-id" section, checks that the owner is "GNU" and that the type is NT_GNU_BUILD_ID=3 and returns the content. Expects buf to point to the beginning of an elf file.