Where can I find a document which describes which routines are in the
I had it linked to my project for years, but I removed it and I saved 2300 bytes and all still compiles without issue.
Where can I find a document which describes which routines are in the libprintf_flt.a library?
It does not provide any additional functions, but additional functionality.
all still compiles without issue.
If you are using any printf function together with floats, you will now get only question marks as output.
As Stefan says the manual tells you about libprintf_flt.a:
but to answer your specific question:
which routines are in the
you don't really need a "document" for that. The .a file is self documenting:
The T there shows exported function(s). In this case just one function - vfprintf(). This is exactly what the documentation in the stdio.h manual suggests. The core of all printf() and sprintf() functions is vfprintf(). It's also the same reason why you use -Wl,-u,vfprintf (again from the manual) to say to the linker - forget the instance of that function you saw from libc.a, search instead in the additional library I am specifying"
What the above also show is that vfprintf() itself makes calls to __prologue_saves__(), __epilogue_restores__(), __ftoa_engine(), __ultoa_invert(), fputc(), strlen() and strlen_p() so when any form of printf() that invokes vfprintf() is used it will also pull in those function too.
If you run avr-nm on libc.a then for that you see:
So it invokes most of those functions too (but not __ftoa_engine()) but its version of vfprintf() is clearly smaller and less complex too.
So your additional bytes are in the "extra bits" of the larger vfprintf() and the __ftoa_engine(). __ftoa_engine() itself can also be found in libc.a:
If you want to know even more about it:
So of your 2300 bytes, 682 of them are coming form ftoa_engine.o and if you want to know what's in those then:
But like Stefan says, you can revert from the vfprintf() in libprintf_flt.a to the standard one in libc.a but now anywhere you have used any form of "%f" you are going to see just "?" in the displayed output and not the floating point value you hoped for because of the code at line 543 in this file:
No where is my source files are the strings "printf" or "%f". I could not really follow what's in the ftoa_engine.
I guess I will need to test it to know for sure, but its a lot of older code and it will not be trivial.
Could well be that float printing was just a debug thing in early development
© 2020 Microchip Technology Inc.