https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83967
--- Comment #7 from RafaĆ Mszal <hurwic8 at gmail dot com> --- Thanks for response. I've send some basic example of the failure. However, it needs some others file to compile and link, like linker, SystemInit function decalration and so on. I've just send you most important files, now I am working on removing sources that are not important, but this will take me a while, since i need to remove lot of dependencies between those files, makefile and linker. I've checked 'used' attribute, it doesn't solve the problem. Same with the suggested '-fuse-linker-plugin' flag.