Source of main.cpp:
typedef void (* fun_t)( void ); static const fun_t fun = [] { for (;;); }; int main( void ) { fun(); }
Listing:
... Region$$Table$$Base Region$$Table$$Limit main ** Section #2 '.debug_frame' (SHT_PROGBITS) Size : 68 bytes ...
Map file:
... Removing main.o(.text), (0 bytes). Removing main.o(.ARM.exidx.text.main), (8 bytes). Removing main.o(.ARM.use_no_argv), (4 bytes). ...
Why main function was removed?
C++11, Lambda?
static const fun_t fun = [] { for (;;); };
Yes, but ARM Compiler 5 and GCC 6.3.1 do it properly.