pub enum AsmDialect {
LinuxElf,
MachO,
}Expand description
Assembler/object-format dialect (design §9). Everything the two supported
platforms disagree on — C symbol prefixes, private-label spelling, adrp
relocation syntax, and data-section directives — routes through here; the
instruction stream itself is identical.
Variants§
LinuxElf
Linux GNU as + ELF (also what the playground shows).
MachO
macOS Apple Silicon: clang assembler + Mach-O.
Implementations§
Source§impl AsmDialect
impl AsmDialect
Sourcepub fn global_symbol(self, name: &str) -> String
pub fn global_symbol(self, name: &str) -> String
Spells a C-ABI symbol the way the platform assembler expects it:
Mach-O prefixes every C-visible name with _ (_main, _rt_add),
ELF uses the bare name.
Trait Implementations§
Source§impl Clone for AsmDialect
impl Clone for AsmDialect
Source§fn clone(&self) -> AsmDialect
fn clone(&self) -> AsmDialect
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AsmDialect
Source§impl Debug for AsmDialect
impl Debug for AsmDialect
impl Eq for AsmDialect
Source§impl PartialEq for AsmDialect
impl PartialEq for AsmDialect
impl StructuralPartialEq for AsmDialect
Auto Trait Implementations§
impl Freeze for AsmDialect
impl RefUnwindSafe for AsmDialect
impl Send for AsmDialect
impl Sync for AsmDialect
impl Unpin for AsmDialect
impl UnsafeUnpin for AsmDialect
impl UnwindSafe for AsmDialect
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