Porting newlib.
Paul Chavent
paul.chavent@free.fr
Sat Jan 8 08:59:00 GMT 2005
Good morning.
I have some questions about porting Newlib. It seems that for a new
platfrom support we typicaly need :
- a linkscript (no deal with newlib, but with binutils/ld)
- a start code and syscalls implementation (that must be provided for
newlib).
- some other thing ?
Moreover, your online doc on libc tells us to implement a minimum set of
syscalls. For example _exit close etc...
In this doc, some function begin with an underscore and other not.
In the syscall.c and libcfunc.c (in the newlib/libc/sys/arm directory)
it is explain :
- Functions which begin with an underscore are in the system
namespace and go in the syscall.c file.
- Functions without leading underscore are in the C namespace and go
in the libcfunc.c file.
I don't understand the difference between the system namespace and C
namespace and my questions are :
Are system namespace and C namespaces equivalent to user space and
kernel space in the Linux kernel ?
Which minimum syscalls should we provide : with underscore or without ?
If we provide some underscore functions, should we provide the sames
without underscore ?
Ok, a last thing : in the newlib/configure.host there is
[code]
arm-*-*)
if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
sys_dir=arm
fi
;;
[/code]
and in newlib/libc/sys/arm/Makefile.am :
[code]
if MAY_SUPPLY_SYSCALLS
extra_objs = syscalls.o
else
extra_objs =
endif
lib_a_SOURCES = libcfunc.c trap.S
[code]
The facts :
If newlib may not supply syscalls, the sys_dir is not set and neither
syscalls.c or libcfunc.c are used.
If newlib may supply syscalls either syscalls.c and libcfunc.c are used.
The question :
Is there any case where syscalls.c is used and libcfunc is not or the
oposite ?
Thank you.
Paul.
More information about the Newlib
mailing list