[U-Boot-Users] u-boot 1.1.2 and atoi in exports not working

John Davis davisjf at gmail.com
Thu Nov 24 15:23:08 CET 2005


Hello

I am trying to use atoi in my code.  I can not get the image to link
properly when i try to add it.  Here is my setup.

Addded to include/_exports.h
EXPORT_FUNC(atoi)

Added to include/exports.h
int atoi(const char *);

Added to common/exports.c
gd->jt[XF_atoi] = (void *)atoi;

But when I do the make of u-boot, I get :


/gcc-lib/ppc-linux/3.3.3/pic -lgcc --end-group \
                -Map u-boot.map -o u-boot
common/libcommon.a(exports.o)(.got2+0x20): In function `jumptable_init':
/home/davis/progs/c/u-boot-1.1.2/common/exports.c:14: undefined
reference to `atoi'
make: *** [u-boot] Error 1


However, I did the same thing for get_dcr and set_dcr and it worked.

Please advise,

JD




More information about the U-Boot mailing list