Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

relocation_info

Format of a relocation entry of a Mach-O file. Modified from the 4.3BSD format. The modifications from the original format were changing the value of the r_symbolnum field for "local" (r_extern == 0) relocation entries. This modification is required to support symbols in an arbitrary number of sections not just the three sections (text, data and bss) in a 4.3BSD file. Also the last 4 bits have had the r_type tag added to them.

macho.relocation_info
pub const relocation_info = packed struct

File

lib/std/macho.zig:932

Code

pub const relocation_info = packed struct {
    /// offset in the section to what is being relocated
    r_address: i32,

    /// symbol index if r_extern == 1 or section ordinal if r_extern == 0
    r_symbolnum: u24,

    /// was relocated pc relative already
    r_pcrel: u1,

    /// 0=byte, 1=word, 2=long, 3=quad
    r_length: u2,

    /// does not include value of sym referenced
    r_extern: u1,

    /// if not 0, machine specific relocation type
    r_type: u4,
}