This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Does Newlib support printf for float/double numbers?
- From: Qihang Huang <qihang dot huang at gmail dot com>
- To: newlib at sourceware dot org
- Date: Thu, 20 May 2010 17:47:33 +1200
- Subject: Does Newlib support printf for float/double numbers?
Hi everyone,
On a 64 bit AMD machine with Linux 2.6.30, I installed newlib by
filling the system call stubs with Linux system calls. Everything
works fine, except when a C program uses printf for floating point
numbers, it gets a segmentation fault. But printf works fine with
integer. So does Newlib support it? Do I need to define some macro for
supporting floating point in the initial build of newlib?
The specific place where the seg fault happened (by tracing with gdb)
is (in newlib/libc/stdio/printf.c:45)
0x0000000000400b6c <+92>: movaps %xmm0,-0x7f(%rdx)
Please help. What possible reason could cause that? I really run out
of ideas. Thank you very much!
Cheers,
Tim