Closed fkjagodzinski closed 4 years ago
@artokin @JarkkoPaso Please review and merge, this blocks one of 5.15 PRs to Mbed OS
Eventually, I was able to find a less intrusive solution for the undefined reference to 'main'
problem.
Please see: https://github.com/ARMmbed/mbed-os/pull/11856#issuecomment-559097300
Big thanks to the reviewers for the quick response and apologies for any inconvenience I might have caused with this PR. Feel free to revert this patch.
Update the main() to be compatible with the declaration from platform/mbed_toolchain.h that adds the MBED_USED attribute. Without the attribute the main() symbol is not emitted with the GCC toolchain using "-Wl,--wrap,main" and "-flto" flags.
This patch is required by https://github.com/ARMmbed/mbed-os/pull/11856.