Module Arm64_binary_emitter.Section_state
module Asm_label = Asm_targets.Asm_labelmodule Asm_section = Asm_targets.Asm_sectionmodule Asm_symbol = Asm_targets.Asm_symbolmodule Symbol = Arm64_ast.Ast.Symbolval create : unit -> tval offset_in_bytes : t -> intval set_offset_in_bytes : t -> int -> unitval add_relocation_at_current_offset :
t ->
reloc_kind:Relocation.Kind.t ->
unitval add_relocation : t -> Relocation.t -> unitval define_symbol : t -> Asm_symbol.t -> unitDefine a symbol at the current offset.
val define_label : t -> Asm_label.t -> unitDefine a label at the current offset.
val mark_global : t -> Asm_symbol.t -> unitMark a symbol as global (called for Global and Weak directives). Global symbols get symbol table entries in ELF.
val is_global : t -> Asm_symbol.t -> boolCheck if a symbol is explicitly global (has Global or Weak directive). File-scope symbols defined only via New_label return false.
val find_symbol_offset_in_bytes : t -> Asm_symbol.t -> int optionFind the offset of a symbol.
val find_label_offset_in_bytes : t -> Asm_label.t -> int optionFind the offset of a label.
val find_global_symbol_at : t -> int -> (Asm_symbol.t * int) optionFind a global symbol at the exact offset, if one exists.
val find_nearest_symbol_before : t -> int -> (Asm_symbol.t * int) optionFind the nearest global symbol strictly before a given offset. Returns the symbol and its offset.
val find_global_symbol_at_or_before : t -> int -> (Asm_symbol.t * int) optionFind a global symbol at the exact offset if one exists, otherwise find the nearest global symbol before the offset.
val find_target_offset_in_bytes : t -> Symbol.target -> int optionLook up a target (symbol or label).
val relocations : t -> Relocation.t listval iter_symbols : t -> f:(Asm_symbol.t -> int -> unit) -> unitIterate over all defined symbols with their offsets.
val iter_labels : t -> f:(Asm_label.t -> int -> unit) -> unitIterate over all defined labels with their offsets.
val add_patch : t -> offset:int -> size:patch_size -> data:int64 -> unitval contents_mut : t -> bytesval contents : t -> string