GAS LISTING /tmp/ccXO3l7R.s page 1 1 .file "anon-function.cpp" 2 .text 3 .Ltext0: 4 .align 2 6 _ZZ12anonFunctionvENKUliiE_clEii: 7 .LFB1244: 8 .file 1 "anon-function.cpp" 1:anon-function.cpp **** #include <iostream> 2:anon-function.cpp **** 3:anon-function.cpp **** void anonFunction() { 4:anon-function.cpp **** 5:anon-function.cpp **** auto f = [](int a, int b) -> int { return a + b; }; 9 .loc 1 5 0 10 .cfi_startproc 11 .LVL0: 12 .LBB2: 13 .loc 1 5 0 14 0000 8D0416 leal (%rsi,%rdx), %eax 15 .LBE2: 16 0003 C3 ret 17 .cfi_endproc 18 .LFE1244: 21 _Z41__static_initialization_and_destruction_0ii: 22 .LFB1401: 6:anon-function.cpp **** 7:anon-function.cpp **** auto n = f(1, 2); 8:anon-function.cpp **** 9:anon-function.cpp **** std::cout << "anonFunction = " << n << std::endl; 10:anon-function.cpp **** } 23 .loc 1 10 0 24 .cfi_startproc 25 .LVL1: 26 0004 83FF01 cmpl $1, %edi 27 0007 752E jne .L6 28 .loc 1 10 0 discriminator 1 29 0009 81FEFFFF cmpl $65535, %esi 29 0000 30 000f 7526 jne .L6 31 .loc 1 10 0 is_stmt 0 32 0011 4883EC08 subq $8, %rsp 33 .cfi_def_cfa_offset 16 34 .file 2 "/usr/include/c++/4.8/iostream" 1:/usr/include/c++/4.8/iostream **** // Standard iostream objects -*- C++ -*- 2:/usr/include/c++/4.8/iostream **** 3:/usr/include/c++/4.8/iostream **** // Copyright (C) 1997-2013 Free Software Foundation, Inc. 4:/usr/include/c++/4.8/iostream **** // 5:/usr/include/c++/4.8/iostream **** // This file is part of the GNU ISO C++ Library. This library is free 6:/usr/include/c++/4.8/iostream **** // software; you can redistribute it and/or modify it under the 7:/usr/include/c++/4.8/iostream **** // terms of the GNU General Public License as published by the 8:/usr/include/c++/4.8/iostream **** // Free Software Foundation; either version 3, or (at your option) 9:/usr/include/c++/4.8/iostream **** // any later version. 10:/usr/include/c++/4.8/iostream **** 11:/usr/include/c++/4.8/iostream **** // This library is distributed in the hope that it will be useful, 12:/usr/include/c++/4.8/iostream **** // but WITHOUT ANY WARRANTY; without even the implied warranty of 13:/usr/include/c++/4.8/iostream **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14:/usr/include/c++/4.8/iostream **** // GNU General Public License for more details. 15:/usr/include/c++/4.8/iostream **** GAS LISTING /tmp/ccXO3l7R.s page 2 16:/usr/include/c++/4.8/iostream **** // Under Section 7 of GPL version 3, you are granted additional 17:/usr/include/c++/4.8/iostream **** // permissions described in the GCC Runtime Library Exception, version 18:/usr/include/c++/4.8/iostream **** // 3.1, as published by the Free Software Foundation. 19:/usr/include/c++/4.8/iostream **** 20:/usr/include/c++/4.8/iostream **** // You should have received a copy of the GNU General Public License and 21:/usr/include/c++/4.8/iostream **** // a copy of the GCC Runtime Library Exception along with this program; 22:/usr/include/c++/4.8/iostream **** // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23:/usr/include/c++/4.8/iostream **** // <http://www.gnu.org/licenses/>. 24:/usr/include/c++/4.8/iostream **** 25:/usr/include/c++/4.8/iostream **** /** @file include/iostream 26:/usr/include/c++/4.8/iostream **** * This is a Standard C++ Library header. 27:/usr/include/c++/4.8/iostream **** */ 28:/usr/include/c++/4.8/iostream **** 29:/usr/include/c++/4.8/iostream **** // 30:/usr/include/c++/4.8/iostream **** // ISO C++ 14882: 27.3 Standard iostream objects 31:/usr/include/c++/4.8/iostream **** // 32:/usr/include/c++/4.8/iostream **** 33:/usr/include/c++/4.8/iostream **** #ifndef _GLIBCXX_IOSTREAM 34:/usr/include/c++/4.8/iostream **** #define _GLIBCXX_IOSTREAM 1 35:/usr/include/c++/4.8/iostream **** 36:/usr/include/c++/4.8/iostream **** #pragma GCC system_header 37:/usr/include/c++/4.8/iostream **** 38:/usr/include/c++/4.8/iostream **** #include <bits/c++config.h> 39:/usr/include/c++/4.8/iostream **** #include <ostream> 40:/usr/include/c++/4.8/iostream **** #include <istream> 41:/usr/include/c++/4.8/iostream **** 42:/usr/include/c++/4.8/iostream **** namespace std _GLIBCXX_VISIBILITY(default) 43:/usr/include/c++/4.8/iostream **** { 44:/usr/include/c++/4.8/iostream **** _GLIBCXX_BEGIN_NAMESPACE_VERSION 45:/usr/include/c++/4.8/iostream **** 46:/usr/include/c++/4.8/iostream **** /** 47:/usr/include/c++/4.8/iostream **** * @name Standard Stream Objects 48:/usr/include/c++/4.8/iostream **** * 49:/usr/include/c++/4.8/iostream **** * The <iostream> header declares the eight <em>standard stream 50:/usr/include/c++/4.8/iostream **** * objects</em>. For other declarations, see 51:/usr/include/c++/4.8/iostream **** * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html 52:/usr/include/c++/4.8/iostream **** * and the @link iosfwd I/O forward declarations @endlink 53:/usr/include/c++/4.8/iostream **** * 54:/usr/include/c++/4.8/iostream **** * They are required by default to cooperate with the global C 55:/usr/include/c++/4.8/iostream **** * library's @c FILE streams, and to be available during program 56:/usr/include/c++/4.8/iostream **** * startup and termination. For more information, see the HOWTO 57:/usr/include/c++/4.8/iostream **** * linked to above. 58:/usr/include/c++/4.8/iostream **** */ 59:/usr/include/c++/4.8/iostream **** //@{ 60:/usr/include/c++/4.8/iostream **** extern istream cin; /// Linked to standard input 61:/usr/include/c++/4.8/iostream **** extern ostream cout; /// Linked to standard output 62:/usr/include/c++/4.8/iostream **** extern ostream cerr; /// Linked to standard error (unbuffered) 63:/usr/include/c++/4.8/iostream **** extern ostream clog; /// Linked to standard error (buffered) 64:/usr/include/c++/4.8/iostream **** 65:/usr/include/c++/4.8/iostream **** #ifdef _GLIBCXX_USE_WCHAR_T 66:/usr/include/c++/4.8/iostream **** extern wistream wcin; /// Linked to standard input 67:/usr/include/c++/4.8/iostream **** extern wostream wcout; /// Linked to standard output 68:/usr/include/c++/4.8/iostream **** extern wostream wcerr; /// Linked to standard error (unbuffered) 69:/usr/include/c++/4.8/iostream **** extern wostream wclog; /// Linked to standard error (buffered) 70:/usr/include/c++/4.8/iostream **** #endif 71:/usr/include/c++/4.8/iostream **** //@} 72:/usr/include/c++/4.8/iostream **** GAS LISTING /tmp/ccXO3l7R.s page 3 73:/usr/include/c++/4.8/iostream **** // For construction of filebuffers for cout, cin, cerr, clog et. al. 74:/usr/include/c++/4.8/iostream **** static ios_base::Init __ioinit; 35 .loc 2 74 0 is_stmt 1 36 0015 BF000000 movl $_ZStL8__ioinit, %edi 36 00 37 .LVL2: 38 001a E8000000 call _ZNSt8ios_base4InitC1Ev 38 00 39 .LVL3: 40 001f BA000000 movl $__dso_handle, %edx 40 00 41 0024 BE000000 movl $_ZStL8__ioinit, %esi 41 00 42 0029 BF000000 movl $_ZNSt8ios_base4InitD1Ev, %edi 42 00 43 002e E8000000 call __cxa_atexit 43 00 44 .LVL4: 45 .loc 1 10 0 46 0033 4883C408 addq $8, %rsp 47 .cfi_def_cfa_offset 8 48 .L6: 49 0037 C3 ret 50 .cfi_endproc 51 .LFE1401: 53 .section .rodata.str1.1,"aMS",@progbits,1 54 .LC0: 55 0000 616E6F6E .string "anonFunction = " 55 46756E63 55 74696F6E 55 203D2000 56 .text 57 .globl _Z12anonFunctionv 59 _Z12anonFunctionv: 60 .LFB1243: 3:anon-function.cpp **** 61 .loc 1 3 0 62 .cfi_startproc 63 0038 53 pushq %rbx 64 .cfi_def_cfa_offset 16 65 .cfi_offset 3, -16 66 0039 4883EC10 subq $16, %rsp 67 .cfi_def_cfa_offset 32 68 .LBB3: 7:anon-function.cpp **** 69 .loc 1 7 0 70 003d BA020000 movl $2, %edx 70 00 71 0042 BE010000 movl $1, %esi 71 00 72 0047 488D7C24 leaq 15(%rsp), %rdi 72 0F 73 004c E8AFFFFF call _ZZ12anonFunctionvENKUliiE_clEii 73 FF 74 .LVL5: 75 0051 89C3 movl %eax, %ebx 76 .LVL6: GAS LISTING /tmp/ccXO3l7R.s page 4 9:anon-function.cpp **** } 77 .loc 1 9 0 78 0053 BE000000 movl $.LC0, %esi 78 00 79 0058 BF000000 movl $_ZSt4cout, %edi 79 00 80 005d E8000000 call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc 80 00 81 .LVL7: 82 0062 89DE movl %ebx, %esi 83 0064 4889C7 movq %rax, %rdi 84 0067 E8000000 call _ZNSolsEi 84 00 85 .LVL8: 86 006c BE000000 movl $_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_, %esi 86 00 87 0071 4889C7 movq %rax, %rdi 88 0074 E8000000 call _ZNSolsEPFRSoS_E 88 00 89 .LVL9: 90 .LBE3: 91 .loc 1 10 0 92 0079 4883C410 addq $16, %rsp 93 .cfi_def_cfa_offset 16 94 007d 5B popq %rbx 95 .cfi_def_cfa_offset 8 96 .LVL10: 97 007e C3 ret 98 .cfi_endproc 99 .LFE1243: 102 _GLOBAL__sub_I__Z12anonFunctionv: 103 .LFB1402: 104 .loc 1 10 0 105 .cfi_startproc 106 007f 4883EC08 subq $8, %rsp 107 .cfi_def_cfa_offset 16 108 .loc 1 10 0 109 0083 BEFFFF00 movl $65535, %esi 109 00 110 0088 BF010000 movl $1, %edi 110 00 111 008d E872FFFF call _Z41__static_initialization_and_destruction_0ii 111 FF 112 .LVL11: 113 0092 4883C408 addq $8, %rsp 114 .cfi_def_cfa_offset 8 115 0096 C3 ret 116 .cfi_endproc 117 .LFE1402: 119 .section .init_array,"aw" 120 .align 8 121 0000 00000000 .quad _GLOBAL__sub_I__Z12anonFunctionv 121 00000000 122 .local _ZStL8__ioinit 123 .comm _ZStL8__ioinit,1,1 124 .text 125 .Letext0: GAS LISTING /tmp/ccXO3l7R.s page 5 126 .file 3 "/usr/include/libio.h" 127 .file 4 "/usr/include/stdio.h" 128 .file 5 "<built-in>" 129 .file 6 "/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h" 130 .file 7 "/usr/include/wchar.h" 131 .file 8 "/usr/include/c++/4.8/cwchar" 132 .file 9 "/usr/include/c++/4.8/bits/exception_ptr.h" 133 .file 10 "/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++config.h" 134 .file 11 "/usr/include/c++/4.8/bits/char_traits.h" 135 .file 12 "/usr/include/c++/4.8/cstdint" 136 .file 13 "/usr/include/c++/4.8/clocale" 137 .file 14 "/usr/include/c++/4.8/cstdlib" 138 .file 15 "/usr/include/c++/4.8/cstdio" 139 .file 16 "/usr/include/c++/4.8/bits/ios_base.h" 140 .file 17 "/usr/include/c++/4.8/cwctype" 141 .file 18 "/usr/include/c++/4.8/bits/ostream.tcc" 142 .file 19 "/usr/include/c++/4.8/ostream" 143 .file 20 "/usr/include/c++/4.8/iosfwd" 144 .file 21 "/usr/include/x86_64-linux-gnu/bits/wchar2.h" 145 .file 22 "/usr/include/time.h" 146 .file 23 "/usr/include/c++/4.8/ext/new_allocator.h" 147 .file 24 "/usr/include/c++/4.8/ext/numeric_traits.h" 148 .file 25 "/usr/include/c++/4.8/debug/debug.h" 149 .file 26 "/usr/include/stdint.h" 150 .file 27 "/usr/include/locale.h" 151 .file 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 152 .file 29 "/usr/include/x86_64-linux-gnu/c++/4.8/bits/atomic_word.h" 153 .file 30 "/usr/include/stdlib.h" 154 .file 31 "/usr/include/x86_64-linux-gnu/bits/stdlib.h" 155 .file 32 "/usr/include/_G_config.h" 156 .file 33 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 157 .file 34 "/usr/include/wctype.h" 158 .file 35 "/usr/include/c++/4.8/bits/stl_pair.h" GAS LISTING /tmp/ccXO3l7R.s page 6 DEFINED SYMBOLS *ABS*:0000000000000000 anon-function.cpp /tmp/ccXO3l7R.s:6 .text:0000000000000000 _ZZ12anonFunctionvENKUliiE_clEii /tmp/ccXO3l7R.s:21 .text:0000000000000004 _Z41__static_initialization_and_destruction_0ii .bss:0000000000000000 _ZStL8__ioinit /tmp/ccXO3l7R.s:59 .text:0000000000000038 _Z12anonFunctionv /tmp/ccXO3l7R.s:102 .text:000000000000007f _GLOBAL__sub_I__Z12anonFunctionv UNDEFINED SYMBOLS _ZNSt8ios_base4InitC1Ev __dso_handle _ZNSt8ios_base4InitD1Ev __cxa_atexit _ZSt4cout _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc _ZNSolsEi _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_ _ZNSolsEPFRSoS_E