
Matthias Fuchs matthias.fuchs@esd-electronics.com wrote:
Here is the U-Boot size for the PLU405 board (405EP-based) with and without
#define CFG_64BIT_VSPRINTF #define CFG_64BIT_STRTOUL .
without: # ppc_4xx-size u-boot text data bss dec hex filename 289568 17532 301312 608412 9489c u-boot
with 64bit format handling: # ppc_4xx-size u-boot text data bss dec hex filename 291368 17532 301312 610212 94fa4 u-boot
So the difference is 1800 bytes on this architecture.
Thanks.
That's a bit more than expected. Is this with or without --gc-sections? Linking with --gc-sections should make simple_strtoull() go away unless it's actually used.
Another thing that might hurt is that lib_generic/vsprintf.c reinvents do_div() without the out-of-line __div_64_32() bit. Converting it to use do_div() from include/div64.h should help.
In fact, enabling CFG_64BIT_VSPRINTF unconditionally without fixing this first will probably break all architectures that don't link with libgcc.
Haavard