https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107500
--- Comment #20 from R. Diez <rdiezmail-gcc at yahoo dot de> --- I had to modify the patch slightly. I guess that union member "unsigned char unused;" was removed after GCC 12.2 was released. But otherwise, the patch does work, at least in my bare-metal scenario. The atexit entry is no longer being generated, and I haven't seen any other side-effects yet.