jon.recoil.org

Module Igot

Intermediate GOT (Global Offset Table) for the dissector.

The intermediate GOT provides local GOT entries that are within range of PC-relative addressing from the code in a partition. Each entry holds the absolute address of an external symbol, filled in by an R_X86_64_64 relocation at final link time.

val entry_size : int

Size of each IGOT entry in bytes.

module Entry : sig ... end

An entry in the intermediate GOT.

type t

A built intermediate GOT section.

val build : prefix:string -> symbols:string list -> Igot.t

build ~prefix symbols builds an intermediate GOT from a list of symbols that need GOT entries.

  • parameter prefix

    A unique prefix for this partition (e.g., "0", "1")

  • parameter symbols

    List of original symbol names needing GOT entries

val entries : Igot.t -> Igot.Entry.t list

Returns the list of entries in the IGOT.

val section_data : Igot.t -> bytes

Returns the section data (zero-initialized).

val section_size : Igot.t -> int

Returns the size of the section in bytes.

val find_entry : Igot.t -> symbol:string -> Igot.Entry.t option

find_entry t ~symbol returns the entry for symbol, or None if not found.

val igot_symbol_name : prefix:string -> symbol:string -> string

igot_symbol_name ~prefix ~symbol returns the IGOT symbol name for the given original symbol.

module Relocation : sig ... end

A relocation for an IGOT entry.

val relocations : Igot.t -> Igot.Relocation.t list

relocations t returns the list of R_X86_64_64 relocations needed to fill the IGOT entries with the addresses of the original symbols.