https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105830
Roger Sayle <roger at nextmovesoftware dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |roger at nextmovesoftware dot com --- Comment #2 from Roger Sayle <roger at nextmovesoftware dot com> --- Hi AK, The executive summary is that you need to specify -ffreestanding (which affects code generation) instead of -nostdlib and -nodefaultlibs (which affect linking). With -ffreestanding (on your godbolt URL), there are no calls to memcpy.