Symbol

Enum Symbol 

Source
pub enum Symbol<'a> {
    Undefined {
        name: Option<&'a str>,
        external: bool,
        desc: u16,
    },
    Absolute {
        name: Option<&'a str>,
        external: bool,
        desc: u16,
        entry: usize,
    },
    Defined {
        name: Option<&'a str>,
        external: bool,
        section: Option<Rc<Section>>,
        desc: u16,
        entry: usize,
    },
    Prebound {
        name: Option<&'a str>,
        external: bool,
        desc: u16,
    },
    Indirect {
        name: Option<&'a str>,
        external: bool,
        desc: u16,
        symbol: Option<&'a str>,
    },
    Debug {
        name: Option<&'a str>,
        section: Option<Rc<Section>>,
        desc: u16,
        addr: usize,
    },
}
Expand description

the link-edit 4.3BSD “stab” style symbol

Variants§

§

Undefined

Fields

§name: Option<&'a str>
§external: bool
§desc: u16
§

Absolute

Fields

§name: Option<&'a str>
§external: bool
§desc: u16
§entry: usize
§

Defined

Fields

§name: Option<&'a str>
§external: bool
§section: Option<Rc<Section>>
§desc: u16
§entry: usize
§

Prebound

Fields

§name: Option<&'a str>
§external: bool
§desc: u16
§

Indirect

Fields

§name: Option<&'a str>
§external: bool
§desc: u16
§symbol: Option<&'a str>
§

Debug

Fields

§name: Option<&'a str>
§section: Option<Rc<Section>>
§desc: u16
§addr: usize

Implementations§

Source§

impl<'a> Symbol<'a>

Source

pub fn name(&self) -> Option<&str>

Source

pub fn is_external(&self) -> bool

Trait Implementations§

Source§

impl<'a> Debug for Symbol<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Display for Symbol<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> SymbolReference for Symbol<'a>

Source§

fn desc(&self) -> u16

raw desc value
Source§

fn ref_type(&self) -> u8

types of references
Source§

fn is_ref_dyn(&self) -> bool

To simplify stripping of objects that use are used with the dynamic link editor, the static link editor marks the symbols defined an object that are referenced by a dynamicly bound object (dynamic shared libraries, bundles). With this marking strip knows not to strip these symbols.
Source§

fn lib_ordinal(&self) -> u8

The ordinal recorded references the libraries listed in the Mach-O file
Source§

fn is_no_dead_strip(&self) -> bool

symbol is not to be dead stripped
Source§

fn is_discarded(&self) -> bool

symbol is discarded
Source§

fn is_weak_ref(&self) -> bool

symbol is weak referenced
Source§

fn is_weak_def(&self) -> bool

coalesed symbol is a weak definition
Source§

fn is_ref_to_weak(&self) -> bool

reference to a weak symbol
Source§

fn is_arm_thumb_def(&self) -> bool

symbol is a Thumb function (ARM)
Source§

fn is_resolver(&self) -> bool

the function is actually a resolver function and should be called to get the address of the real function to use.
Source§

fn is_alt_entry(&self) -> bool

symbol is pinned to the previous content.

Auto Trait Implementations§

§

impl<'a> Freeze for Symbol<'a>

§

impl<'a> RefUnwindSafe for Symbol<'a>

§

impl<'a> !Send for Symbol<'a>

§

impl<'a> !Sync for Symbol<'a>

§

impl<'a> Unpin for Symbol<'a>

§

impl<'a> UnwindSafe for Symbol<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.