GNU toolchain 5.4 2016q3 in use and compiling c/c++ project to M4. Compiling with --specs=nano.specs flag so Newlib nano is in use.
I am working to optimize code and looking output binary data to clean all unwanted read-only constant string out of my project. I noticed following string:"not enough space for format expansion (Please submit full bug report at http://gcc.gnu.org/bugs.html)"
Searching map file and found this string is coming from "arm-none-eabi/lib/armv7e-m/fpu\libstdc++_nano.a(snprintf_lite.o)"This is really something I don't want to be stored in any memory. Project is not having exceptions and flag -fno-exceptions is in use. String is there even compiling for size using -Os flag.
My question: Is it possible to drop that string out from flash?
Everything defined in newlib can be redefined in your application.
namespace __gnu_cxx { int __snprintf_lite(char *__buf, size_t __bufsize, const char *__fmt, va_list __ap) {} } // namespace __gnu_cxx
This safes 486 bytes on my machine.