https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118136
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Torbjorn SVENSSON from comment #7) > So, if I understand you correctly Andrew, it's impossible to write the start > code in C for a free-standing application and build it with -flto into a > library and then reuse that? > I.e. think of the case where newlib is built with -flto -ffat-lto-objects > and then the consumer of the library is built with -flto. It is possible to write the start code in C code for a free standing application. Just the C rules for main for hosted env don't applies then; it becomes a normal function.