#[non_exhaustive]pub enum SymbolSection {
Undefined,
Absolute,
Common,
Section(SectionId),
}Expand description
Where a symbol is defined.
§Examples
use object_lang::{Symbol, SymbolSection};
assert_eq!(Symbol::undefined("x").section, SymbolSection::Undefined);
assert_eq!(Symbol::absolute("PAGE", 4096).section, SymbolSection::Absolute);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Undefined
Not defined here: another object must define it (or, if weak, it may stay undefined and resolve to zero).
Absolute
A constant value that relocation does not change.
Common
A tentative definition (a C “common” symbol): the linker allocates size bytes
of zeroed storage, aligned to the symbol’s value, unless an object defines the
name properly. Only in relocatable objects.
Section(SectionId)
Defined in this section of the object.
Trait Implementations§
Source§impl Clone for SymbolSection
impl Clone for SymbolSection
impl Copy for SymbolSection
Source§impl Debug for SymbolSection
impl Debug for SymbolSection
impl Eq for SymbolSection
Source§impl Hash for SymbolSection
impl Hash for SymbolSection
Source§impl PartialEq for SymbolSection
impl PartialEq for SymbolSection
impl StructuralPartialEq for SymbolSection
Auto Trait Implementations§
impl Freeze for SymbolSection
impl RefUnwindSafe for SymbolSection
impl Send for SymbolSection
impl Sync for SymbolSection
impl Unpin for SymbolSection
impl UnsafeUnpin for SymbolSection
impl UnwindSafe for SymbolSection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more