[En-Nut-Discussion] Realy strange linker problem with NutOS 4.4.0 for Ethernut 3.0 (ARM)
Harald Kipp
harald.kipp at egnite.de
Tue Feb 12 15:59:44 CET 2008
Ole Reinhardt schrieb:
> Strange is, that all other funcions provided in nut/c/string/ are not
> linked either and seem to be provided by newlib. Using them does not
> trigger this problem.
nut/c/ provides all required function in case the toolchain comes
without any runtime library. This had been the case in early times when
Nut/OS was ported to the GameBoy Advance.
Today the ARM runtime library is provided by newlib and the AVR runtime
by avrlibc. nut/c/ is not used in these cases.
Those runtime functions, which need special OS support, are located in
nut/crt, like stdio functions as well as malloc() and friends.
Unfortunately strdup() is not just a simple string function, but
requires malloc(). However, libraries like newlib do not simply
reference malloc() within strdup() but do more complex things, which in
turn create additional system specific references like syscall().
Actually strdup() should be in nut/crt, although the header string.h
refers to functions in nut/c/string. Actually the strdup() prototype
should be in memory.h, but that would break well established standards.
Harald
More information about the En-Nut-Discussion
mailing list