[uClibc] gcc-3.4.x toolchain from uClibc.org result error when make zImage for uClinux-2.4.24

Rick LU relsewhere-uc at yahoo.com.cn
Fri Aug 27 01:41:10 UTC 2004


Hi list,

I modified as Brad said. The code is like this now

     81 #define EXPORT_SYMBOL_ALIAS(sym,orig)           \
     82  const char __kstrtab_##sym[]                   \
     83   __attribute__((section(".kstrtab"))) =        \
     84     __MODULE_STRING(sym);                       \
     85  const struct module_symbol __ksymtab_##sym     \
     86   __attribute__((section("__ksymtab"))) =       \
     87     { (unsigned long)&orig, __kstrtab_##sym };

and this problem is solved.

Thanks and best regards.

-rick

 --- Brad Kemp <bkemp at ucentric.com> wrote:
> 
> >-- Original Message --
> >Date: Wed, 25 Aug 2004 14:27:30 +0800 (CST)
> >From: Rick LU <relsewhere-uc at yahoo.com.cn>
> >To: uclibc at uclibc.org
> >Subject: [uClibc] gcc-3.4.x toolchain from uClibc.org result error
> when
> make
> >	zImage for uClinux-2.4.24
> >Reply-To: relsewhere-uc at yahoo.com.cn
> >
> >
> >
> >Hi list,
> >
> >I had install toolchain and uc-libc shipped with the SMDK2510
> >board. They worked well until I want to begin to use uClibc.
> >
> >I exported the gcc-3.4.x toolchain from uClibc.org and modify the
> >Makefile to generate a toolchain and uClibc for my board. During
> make
> >process I choose:
> >  * no PIC
> >  * generic ARM CPU
> >  * no large file support, etc.
> >
> >I have not modified other configurations including the value of
> >KERNEL_SOURCE in
> >toolchain/gcc-3.4.x/toolchain_build_arm/uClibc/.config, which means
> >the toolchain is compiled with the kernel-headers-2.4.25.tar.bz2
> >downloaded automatically.
> >
> >After the toolchain is built, I do
> >[root at localhost include]# pwd
> >/opt/toolchain/gcc-3.4.x/toolchain_arm/include
> >[root at localhost include]# mv asm OFF.asm
> >[root at localhost include]# mv linux/ OFF.linux
> >[root at localhost include]# ln -s /home/linux-2.4.24/include/linux/
> linux
> >[root at localhost include]# ln -s /home/linux-2.4.24/include/asm
> >
> >Where /home/linux-2.4.24 is the uClinux kernel source for my board.
> >
> >Then I compile my userland with this new gcc, binutils, and uClibc,
> I
> >met minor problems, but after fixing them, I can succeed in builing
> >the userland. The flthdr message of some of the binaries in userland
> >compiled by the original toolchain and the ones compiled by the new
> >toolchain are identical.
> >
> >After that I go to /home/linux-2.4.24 and make clean and make
> >zImage. Here I get some error:
> >
> >make[1]: Entering directory
> `/home/linux-2.4.24/arch/armnommu/kernel'
> >arm-linux-gcc -D__KERNEL__ -I/home/linux-2.4.24/include -Wall
> >-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing
> >-fno-common -fno-common -pipe -fno-builtin -D__linux__ -DNO_MM
> >-mapcs-32 -march=armv4 -malignment-traps -msoft-float -nostdinc
> >-iwithprefix include -DKBUILD_BASENAME=armksyms -DEXPORT_SYMTAB -c
> >armksyms.c armksyms.c:93:1: pasting "__kstrtab_kern_fp_enter" and
> "["
> >does not give a valid preprocessing token armksyms.c:93:1: pasting
> "&"
> >and "fp_enter" does not give a valid preprocessing token
> >armksyms.c:94:1: pasting "__kstrtab_fp_printk" and "[" does not give
> a
> >valid preprocessing token armksyms.c:94:1: pasting "&" and "printk"
> >does not give a valid preprocessing token armksyms.c:95:1: pasting
> >"__kstrtab_fp_send_sig" and "[" does not give a valid preprocessing
> >token armksyms.c:95:1: pasting "&" and "send_sig" does not give a
> >valid preprocessing token make[1]: *** [armksyms.o] Error 1 make[1]:
> >Leaving directory `/home/linux-2.4.24/arch/armnommu/kernel' make:
> ***
> >[_dir_arch/armnommu/kernel] Error 2
> >
> >The relative lines are as following:
> >
> >     80 
> >     81 #define EXPORT_SYMBOL_ALIAS(sym,orig)           \
> >     82  const char __kstrtab_##sym##[]                 \
> >     83   __attribute__((section(".kstrtab"))) =        \
> >     84     __MODULE_STRING(sym);                       \
> >     85  const struct module_symbol __ksymtab_##sym     \
> >     86   __attribute__((section("__ksymtab"))) =       \
> >     87     { (unsigned long)&##orig, __kstrtab_##sym };
> >     88 
> >     89 /*
> >     90  * floating point math emulator support.
> >     91  * These symbols will never change their calling
> convention...
> >     92  */
> >     93 EXPORT_SYMBOL_ALIAS(kern_fp_enter,fp_enter);
> >     94 EXPORT_SYMBOL_ALIAS(fp_printk,printk);
> >     95 EXPORT_SYMBOL_ALIAS(fp_send_sig,send_sig);
> >
> >
> >I tried not to create links in toolchain as shown above but the
> result
> >is same. I tried to let the KERNEL_SOURCE in
> >toolchain/gcc-3.4.x/toolchain_build_arm/uClibc/.config equal to
> >/home/linux-2.4.24 but get some include-file error when building the
> >toolchain, which I can't fix.
> >
> >I have no idea on this error. Any advise is appreciated. Thanks in
> >advance.
> >
> >Rick
> >
> Rick,
> Try removing the ## after sym. gcc 4.1 is very strict about the use
> of ##
> >     82  const char __kstrtab_##sym##[]                 
> becomes
> >     82  const char __kstrtab_##sym[]                 
> In gcc 4.1 you cannot trail a symbol with the ## operation.
> Brad

_________________________________________________________
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://image.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/



More information about the uClibc mailing list