Created
September 11, 2015 19:02
-
-
Save steveklabnik/ebe7955db38a57eaa0ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct Foo; | |
| impl Foo { | |
| fn hello(&self) -> &str { | |
| "hello" | |
| } | |
| } | |
| fn main() { | |
| let f = Foo; | |
| f.hello(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .text | |
| .file "foo.0.rs" | |
| .section .text._ZN3Foo5hello20h1cf7b179571872b4iaaE,"ax",@progbits | |
| .align 16, 0x90 | |
| .type _ZN3Foo5hello20h1cf7b179571872b4iaaE,@function | |
| _ZN3Foo5hello20h1cf7b179571872b4iaaE: | |
| .cfi_startproc | |
| movb $61, -25(%rsp) | |
| movq %rdi, -40(%rsp) | |
| movups const2530(%rip), %xmm0 | |
| movaps %xmm0, -24(%rsp) | |
| movq -24(%rsp), %rax | |
| movq -16(%rsp), %rdx | |
| retq | |
| .Lfunc_end0: | |
| .size _ZN3Foo5hello20h1cf7b179571872b4iaaE, .Lfunc_end0-_ZN3Foo5hello20h1cf7b179571872b4iaaE | |
| .cfi_endproc | |
| .section .text._ZN4main20h67861e821a641acftaaE,"ax",@progbits | |
| .align 16, 0x90 | |
| .type _ZN4main20h67861e821a641acftaaE,@function | |
| _ZN4main20h67861e821a641acftaaE: | |
| .cfi_startproc | |
| subq $24, %rsp | |
| .Ltmp0: | |
| .cfi_def_cfa_offset 32 | |
| leaq 16(%rsp), %rdi | |
| movb $61, 23(%rsp) | |
| callq _ZN3Foo5hello20h1cf7b179571872b4iaaE | |
| movq %rax, 8(%rsp) | |
| movq %rdx, (%rsp) | |
| addq $24, %rsp | |
| retq | |
| .Lfunc_end1: | |
| .size _ZN4main20h67861e821a641acftaaE, .Lfunc_end1-_ZN4main20h67861e821a641acftaaE | |
| .cfi_endproc | |
| .section .text.main,"ax",@progbits | |
| .globl main | |
| .align 16, 0x90 | |
| .type main,@function | |
| main: | |
| .cfi_startproc | |
| subq $24, %rsp | |
| .Ltmp1: | |
| .cfi_def_cfa_offset 32 | |
| leaq _ZN4main20h67861e821a641acftaaE(%rip), %rax | |
| movq %rdi, 16(%rsp) | |
| movq %rax, %rdi | |
| movq 16(%rsp), %rax | |
| movq %rsi, 8(%rsp) | |
| movq %rax, %rsi | |
| movq 8(%rsp), %rdx | |
| callq _ZN2rt10lang_start20h46248b0221ecaad5blxE@PLT | |
| addq $24, %rsp | |
| retq | |
| .Lfunc_end2: | |
| .size main, .Lfunc_end2-main | |
| .cfi_endproc | |
| .type str2529,@object | |
| .section .rodata.str2529,"a",@progbits | |
| str2529: | |
| .ascii "hello" | |
| .size str2529, 5 | |
| .type const2530,@object | |
| .section .data.rel.ro.local.const2530,"aw",@progbits | |
| .align 8 | |
| const2530: | |
| .quad str2529 | |
| .quad 5 | |
| .size const2530, 16 | |
| .type const2531,@object | |
| .section .rodata.const2531,"a",@progbits | |
| .align 8 | |
| const2531: | |
| .size const2531, 0 | |
| .section ".note.GNU-stack","",@progbits |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .text | |
| .file "foo.0.rs" | |
| .section .text._ZN4main20h67861e821a641acftaaE,"ax",@progbits | |
| .align 16, 0x90 | |
| .type _ZN4main20h67861e821a641acftaaE,@function | |
| _ZN4main20h67861e821a641acftaaE: | |
| .cfi_startproc | |
| retq | |
| .Lfunc_end0: | |
| .size _ZN4main20h67861e821a641acftaaE, .Lfunc_end0-_ZN4main20h67861e821a641acftaaE | |
| .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 _ZN4main20h67861e821a641acftaaE(%rip), %rdi | |
| movq %rcx, %rsi | |
| movq %rax, %rdx | |
| jmp _ZN2rt10lang_start20h46248b0221ecaad5blxE@PLT | |
| .Lfunc_end1: | |
| .size main, .Lfunc_end1-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