pub enum Reference {
Call,
Data,
Address {
bytes: u8,
},
}Expand description
What kind of thing a relocation is asking the linker for.
The first two are the distance from the end of an instruction to something, which is what every reference the code makes is, because this compiler generates position independent code and nothing else. They are told apart because the linker may answer one of them with a stub and may not answer the other one that way. The third is not a distance at all and is the only kind an image asks for, since an initializer holding the address of something holds the address itself.
Variants§
Call
A call, which the linker may satisfy with a stub that reaches further than the four bytes
would. R_X86_64_PLT32 on ELF, and the same relocation a branch gets on the other two.
Data
A datum, reached from the instruction pointer. R_X86_64_PC32 on ELF.
Address
The address itself, written into an image. int *p = &y; and nothing else in C.
Trait Implementations§
impl Copy for Reference
impl Eq for Reference
impl StructuralPartialEq for Reference
Auto Trait Implementations§
impl Freeze for Reference
impl RefUnwindSafe for Reference
impl Send for Reference
impl Sync for Reference
impl Unpin for Reference
impl UnsafeUnpin for Reference
impl UnwindSafe for Reference
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.