package owee

  1. Overview
  2. Docs

Module Owee_elf_notesSource

Sourcetype 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

    *)
}
Sourceval read_header : Owee_buf.cursor -> header
Sourceval 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.

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

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

Sourceexception Section_not_found of string
Sourcemodule Stapsdt : sig ... end
Sourceval 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.

OCaml

Innovation. Community. Security.