Skip to content

Instantly share code, notes, and snippets.

@XMPPwocky
Created January 16, 2015 16:33
Show Gist options
  • Save XMPPwocky/c64a5339f440d9207b08 to your computer and use it in GitHub Desktop.
Save XMPPwocky/c64a5339f440d9207b08 to your computer and use it in GitHub Desktop.
fn main() {
let x = unsafe {
std::rt::heap::allocate(4, 4)
};
}
.text
.file "rust-out.0.rs"
.section .text._ZN4main20h192b90aae64a142feaaE,"ax",@progbits
.align 16, 0x90
.type _ZN4main20h192b90aae64a142feaaE,@function
_ZN4main20h192b90aae64a142feaaE:
.cfi_startproc
movl $4, %edi
xorl %esi, %esi
jmp je_mallocx@PLT
.Ltmp0:
.size _ZN4main20h192b90aae64a142feaaE, .Ltmp0-_ZN4main20h192b90aae64a142feaaE
.cfi_endproc
.section .text.main,"ax",@progbits
.globl main
.align 16, 0x90
.type main,@function
main:
.cfi_startproc
movq %rsi, %rax
movq %rdi, %rcx
leaq _ZN4main20h192b90aae64a142feaaE(%rip), %rdi
movq %rcx, %rsi
movq %rax, %rdx
jmp _ZN2rt10lang_start20h099797e429a886b1iZzE@PLT
.Ltmp1:
.size main, .Ltmp1-main
.cfi_endproc
.section ".note.GNU-stack","",@progbits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment