Skip to content

Instantly share code, notes, and snippets.

@martinomburajr
Created February 16, 2022 06:00
Show Gist options
  • Save martinomburajr/8c95bd253d962aed2282f9ba015702f0 to your computer and use it in GitHub Desktop.
Save martinomburajr/8c95bd253d962aed2282f9ba015702f0 to your computer and use it in GitHub Desktop.
The Rust Runtime - Medium Article's Code Snippets
00000001000010f0 _main:
1000010f0: 55 pushq %rbp
1000010f1: 48 89 e5 movq %rsp, %rbp
1000010f4: 48 89 f2 movq %rsi, %rdx
1000010f7: 48 63 f7 movslq %edi, %rsi
1000010fa: 48 8d 3d 8f ff ff ff leaq -113(%rip), %rdi
100001101: e8 4a 05 00 00 callq 1354 <__ZN3std2rt10lang_start17h25bc31422b914902E>
100001106: 5d popq %rbp
100001107: c3 retq
100001108: 90 nop
100001109: 90 nop
#[cfg(not(test))]
#[lang = "start"]
fn lang_start<T: crate::process::Termination + 'static>(
main: fn() -> T,
argc: isize,
argv: *const *const u8,
) -> isize {
lang_start_internal(
&move || crate::sys_common::backtrace::__rust_begin_short_backtrace(main).report(),
argc,
argv,
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment