pub struct Extent {
pub name: String,
pub start: usize,
pub len: usize,
pub align: u32,
pub binding: Binding,
pub visibility: Visibility,
pub patch: Option<Patch>,
pub hooked: usize,
pub landings: Vec<Site>,
}Expand description
Where one function ended up.
How long a function is is a fact ELF records and Mach-O has no way to, so it is handed over rather than worked out again: the writer that wants it has it and the one that does not ignores it.
Fields§
§name: StringThe function’s name, as the C program spelled it. The underscore an Apple symbol carries is the object writer’s business, not this one’s.
start: usizeWhere its first instruction is.
len: usizeHow many bytes of instructions it is, not counting the padding in front of the next one.
align: u32What this one function asked to be aligned to, which is not always what the section it is in was aligned to.
The two are the same number only when this function is the one that asked for the most.
Under Sections::functions each function is a section of its own and this is what that
section is aligned to, so the number has to survive the trip rather than be recovered from
the offset, which says nothing once the function is at zero in a section of its own.
binding: BindingHow the linker sees the name, which is what the C static reaches the object file as.
visibility: VisibilityHow far outside a shared library holding this the name reaches.
patch: Option<Patch>Where the room a patcher was promised is, or None in a function promised none, which is
every function on a command line that did not ask. See Patch.
hooked: usizeHow many bytes of int3 a hot patcher was promised in front of Extent::start, from
__attribute__((ms_hook_prologue)), which are in front of the room Patch says is there
too. Zero in every other function.
landings: Vec<Site>Each call an unwind lands somewhere from, in the order they are in the function, which is
empty in every function with no cleanup handler to run on the way out. See Site.
Implementations§
Source§impl Extent
impl Extent
Sourcepub fn ahead(&self) -> usize
pub fn ahead(&self) -> usize
How many of the function’s bytes are in front of Self::start, which is where its own
section begins under Sections::functions rather than where its symbol is.
Trait Implementations§
impl Eq for Extent
impl StructuralPartialEq for Extent
Auto Trait Implementations§
impl Freeze for Extent
impl RefUnwindSafe for Extent
impl Send for Extent
impl Sync for Extent
impl Unpin for Extent
impl UnsafeUnpin for Extent
impl UnwindSafe for Extent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.