jon.recoil.org

Module Partition

Partition types for the dissector.

A partition groups object files together for partial linking. The first partition (Main) contains code that must be addressable within the small code model's 2GB limit. Additional partitions (Large_code) are placed at higher addresses and use an intermediate GOT/PLT to bridge calls.

type kind =
  1. | Main
    (*

    The main partition. Sections keep their original names (.text, .data, etc.) and are placed by default linker rules at low addresses.

    *)
  2. | Large_code of int
    (*

    A large code partition with the given index (1, 2, ...). Sections are renamed with a prefix (e.g., .caml.p1.text) and placed after .bss by the linker script.

    *)

The kind of partition, determining how sections are named and placed.

val symbol_prefix : Partition.kind -> string

Returns the symbol prefix for IGOT/IPLT symbols in this partition.

val section_prefix : Partition.kind -> string

Returns the section prefix for this partition. Empty for Main, ".caml.pN" for Large_code N.

type t

A partition before partial linking, containing files with their sizes.

Returns the kind of this partition.

Returns the files in this partition.

val total_size : Partition.t -> int64

Returns the total size of allocated sections across all files.

Create a partition from a list of files with the given kind.

module Linked : sig ... end

A partition after partial linking, with the path to the partially linked object file.