pub struct Alias {
pub name: String,
pub target: String,
pub binding: Binding,
}Expand description
A second name for something the same file defines.
Not a section and not a byte of anything, which is the whole point of it: an alias is a symbol
table entry pointing at an address something else already occupies, so a file with one in it is
no larger than the same file without. .set b, a is what an assembler is told and a second
entry at the first one’s section, value and size is what a writer produces, and the two say the
same thing.
The target is a name rather than an index into anything above, because the two output paths find it in different places: a listing hands the name to an assembler that resolves it, and a writer looks it up among the symbols it has already added.
Fields§
§name: StringThe name being defined, as the C program spelled it.
target: StringThe name it stands for, which has to be something this same file defines.
binding: BindingHow the linker sees the new name, which is not always how it sees the old one: the target
of extern int b __attribute__((alias("a"))) may be a static.
Trait Implementations§
impl Eq for Alias
impl StructuralPartialEq for Alias
Auto Trait Implementations§
impl Freeze for Alias
impl RefUnwindSafe for Alias
impl Send for Alias
impl Sync for Alias
impl Unpin for Alias
impl UnsafeUnpin for Alias
impl UnwindSafe for Alias
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.