extern structstd.macho.nlist_64[src]

Fields

n_strx: u32
n_type: u8
n_sect: u8
n_desc: u16
n_value: u64

Functions

Functionstab[src]

pub fn stab(sym: nlist_64) bool

Parameters

Source Code

Source code
pub fn stab(sym: nlist_64) bool {
    return N_STAB & sym.n_type != 0;
}

Functionpext[src]

pub fn pext(sym: nlist_64) bool

Parameters

Source Code

Source code
pub fn pext(sym: nlist_64) bool {
    return N_PEXT & sym.n_type != 0;
}

Functionext[src]

pub fn ext(sym: nlist_64) bool

Parameters

Source Code

Source code
pub fn ext(sym: nlist_64) bool {
    return N_EXT & sym.n_type != 0;
}

Functionsect[src]

pub fn sect(sym: nlist_64) bool

Parameters

Source Code

Source code
pub fn sect(sym: nlist_64) bool {
    const type_ = N_TYPE & sym.n_type;
    return type_ == N_SECT;
}

Functionundf[src]

pub fn undf(sym: nlist_64) bool

Parameters

Source Code

Source code
pub fn undf(sym: nlist_64) bool {
    const type_ = N_TYPE & sym.n_type;
    return type_ == N_UNDF;
}

Functionindr[src]

pub fn indr(sym: nlist_64) bool

Parameters

Source Code

Source code
pub fn indr(sym: nlist_64) bool {
    const type_ = N_TYPE & sym.n_type;
    return type_ == N_INDR;
}

Functionabs[src]

pub fn abs(sym: nlist_64) bool

Parameters

Source Code

Source code
pub fn abs(sym: nlist_64) bool {
    const type_ = N_TYPE & sym.n_type;
    return type_ == N_ABS;
}

FunctionweakDef[src]

pub fn weakDef(sym: nlist_64) bool

Parameters

Source Code

Source code
pub fn weakDef(sym: nlist_64) bool {
    return sym.n_desc & N_WEAK_DEF != 0;
}

FunctionweakRef[src]

pub fn weakRef(sym: nlist_64) bool

Parameters

Source Code

Source code
pub fn weakRef(sym: nlist_64) bool {
    return sym.n_desc & N_WEAK_REF != 0;
}

Functiondiscarded[src]

pub fn discarded(sym: nlist_64) bool

Parameters

Source Code

Source code
pub fn discarded(sym: nlist_64) bool {
    return sym.n_desc & N_DESC_DISCARDED != 0;
}

FunctionnoDeadStrip[src]

pub fn noDeadStrip(sym: nlist_64) bool

Parameters

Source Code

Source code
pub fn noDeadStrip(sym: nlist_64) bool {
    return sym.n_desc & N_NO_DEAD_STRIP != 0;
}

Functiontentative[src]

pub fn tentative(sym: nlist_64) bool

Parameters

Source Code

Source code
pub fn tentative(sym: nlist_64) bool {
    if (!sym.undf()) return false;
    return sym.n_value != 0;
}

Source Code

Source code
pub const nlist_64 = extern struct {
    n_strx: u32,
    n_type: u8,
    n_sect: u8,
    n_desc: u16,
    n_value: u64,

    pub fn stab(sym: nlist_64) bool {
        return N_STAB & sym.n_type != 0;
    }

    pub fn pext(sym: nlist_64) bool {
        return N_PEXT & sym.n_type != 0;
    }

    pub fn ext(sym: nlist_64) bool {
        return N_EXT & sym.n_type != 0;
    }

    pub fn sect(sym: nlist_64) bool {
        const type_ = N_TYPE & sym.n_type;
        return type_ == N_SECT;
    }

    pub fn undf(sym: nlist_64) bool {
        const type_ = N_TYPE & sym.n_type;
        return type_ == N_UNDF;
    }

    pub fn indr(sym: nlist_64) bool {
        const type_ = N_TYPE & sym.n_type;
        return type_ == N_INDR;
    }

    pub fn abs(sym: nlist_64) bool {
        const type_ = N_TYPE & sym.n_type;
        return type_ == N_ABS;
    }

    pub fn weakDef(sym: nlist_64) bool {
        return sym.n_desc & N_WEAK_DEF != 0;
    }

    pub fn weakRef(sym: nlist_64) bool {
        return sym.n_desc & N_WEAK_REF != 0;
    }

    pub fn discarded(sym: nlist_64) bool {
        return sym.n_desc & N_DESC_DISCARDED != 0;
    }

    pub fn noDeadStrip(sym: nlist_64) bool {
        return sym.n_desc & N_NO_DEAD_STRIP != 0;
    }

    pub fn tentative(sym: nlist_64) bool {
        if (!sym.undf()) return false;
        return sym.n_value != 0;
    }
}