> Dear all: > I try to build a kernel with -O and I try to modify below lines in Makefile: > > ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE > KBUILD_CFLAGS += -O > else > KBUILD_CFLAGS += -O > endif > > My uclinux is uClinux-dist-20080808.tar.bz2, and toolchain is > arm-linux-tools-20061213.tar.gz. > but the result will fail like below. > > calibrate.c:(.init.text+0x1338): undefined reference to > `__you_cannot_kmalloc_that_much' > init/built-in.o: In function `rd_load_image': > calibrate.c:(.init.text+0x1810): undefined reference to > `__you_cannot_kmalloc_that_much'
Hi: I use gcc to compile normal linux kernel and it works. I check where my problem comes from. the compile complain he cannot find the function call, "__you_cannot_kmalloc_that_much." as below: include/linux/slab_def.h:48: undefined reference to `__you_cannot_kmalloc_that_much' ...... I grep the kernel source code, no matter normal linux or uclinux I download, there is no definition of function call "__you_cannot_kmalloc_that_much" in them. (below are the results I get: /media/sda6/uclinux/uClinux-dist/linux-2.6.x$ find . -type f -iname '*.[ch]' | xargs grep -n '__you_cannot_kmalloc_that_much' ./include/linux/slab_def.h:47: extern void __you_cannot_kmalloc_that_much(void); ./include/linux/slab_def.h:48: __you_cannot_kmalloc_that_much(); ./include/linux/slab_def.h:81: extern void __you_cannot_kmalloc_that_much(void); ./include/linux/slab_def.h:82: __you_cannot_kmalloc_that_much(); /media/sda6/uclinux/uClinux-dist/linux-2.6.x$ [EMAIL PROTECTED] linux-2.6.16.2]# find . -type f -iname '*.[ch]' | xargs grep -n '__you_cannot_kmalloc_that_much' ./include/linux/slab.h:100: extern void __you_cannot_kmalloc_that_much(void); ./include/linux/slab.h:101: __you_cannot_kmalloc_that_much(); [EMAIL PROTECTED] linux-2.6.16.2]# This makes me more curious. In the beginning, I thought maybe uclinux change some prototype to meet some requirement, since the .h file in uclinux called slab_def.h instead of slab.h in normal kernel. But I find both of them don't define the function. I know the unoptimized kernel is pretty big and useless under practical situation but I want to trace assembly code of kernel and the optimization will make me confuse. Would someone have the problem before or find I lost something to set, please let me know. appreciate your kind help, miloody _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
