jon.recoil.org

Module Binary_emitter.Encode_directive

val resolve_local_label_for_elf : all_sections:All_section_states.t -> target:Arm64_ast.Ast.Symbol.target -> sym_offset:int -> string * int

On Linux ELF, local labels (starting with .L) don't have symbol table entries. The assembler converts them to section symbol + offset. This function performs that conversion. Returns (symbol_name, addend) where symbol_name is either the original label or the section name, and addend includes the offset within the section plus any original offset. On macOS, returns the original label name and offset unchanged.