https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118806
Bug ID: 118806 Summary: [avr] Optimize running main (-mo-call-main) Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: gjl at gcc dot gnu.org Target Milestone: --- Add a new command line option -mno-call-main that uses a more efficient way of running main as provided by the startup code from libmcu.a XCALL main XJMP exit Instead, main can be put in .init9 so no call is required to run it. Specifying -mno-call-main asserts that main does not return. This option is useful for devices with very limited resources.