This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

printf size requirement


Hi,

Someone asked a question on the RTEMS list this morning.
I did a quick experiment and wanted to pass it along for
feedback.  Maybe it will trip someone into thinking of
areas for improvement.

Pick your favorite target. :D

arm-rtems4.8-ld -u printf \
 /opt/rtems-4.8/arm-rtems4.8/lib/libc.a -r -o printf.rel
arm-rtems4.8-size printf.rel

+ -u printf yields size of "25,320 + 1044 + 12"

+ Using -u iprintf yields "12,040 + 1044 + 12"

+ wide character support is in both and is about .75K

+ printf version includes the "mprec" code, references
 soft float, etc.

+ both include locale code

+ The symbols in the iprintf .rel include memmove,
 memchr, memset, strcmp, strlen, fwalk, fclose,
 and fflush

+ The undefined symbols in the iprintf .rel include
  _close_r, _free_r, _fstat_r, isatty, _lseek_r,
  _malloc_r, _read_r, _realloc_r, _write_r.

I'm not complaining as much as I am reporting and
wondering about newlib and low memory targets.  I
didn't custom compile this newlib.  It is just how
*-rtems* is configured.

Even on a bare, minimal target, by the time you flesh
out all the missing symbols, how small is "hello world"?

And the USD64K question: Can it be smaller?

--joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]