[uClibc]compiling and using uClibc-0.9.11 for arm-nommu

Geoffrey Espin espin at idiom.com
Thu May 16 16:16:14 UTC 2002


Stephan,

> I'm new at uClibc. Today I started to build a sample application with uClibc 
> and uClinux at ARM architecture. So I'm trying to compile the uClibc-0.9.11 
> and then linking an application statically with following result:

I can testify that boa does build statically on the mipsel version
of uClibc-0.9.11, and _init and _fini show up as "w" (weak) in
the boa executable.

> arm-elf-gcc -Os -g  -Dlinux -D__linux__ -Dunix -D__uClinux__	\

I always use the handy wrapper provided by uclibc:

 CC=/usr/mipsel-linux-uclibc/usr/bin/mipsel-uclibc-gcc
	 ^^^arm                      ^^^arm

Then you don't have to mess with adding library (-L) ugliness.
In fact the Makefile doesn't have to be touched just:

    make CC=/usr/mipsel-linux-uclibc/usr/bin/mipsel-uclibc-gcc

Will do it in 90% of cross compilations.  Possibly, adding "-static".

> In both cases the references _init and _fini couldn't found. Why? I don't 

Looking back in the uclibc.mbox, this may be an 'arm' problem that
a few people are still trying to track down.

Just FYI, in my uClibc-0.9.11 (mipsel) directory I do a:

    % find . -name "*.o" -print | xargs mipsel-linux-nm -o | grep _fini
    ./lib/crti.o:00000000 T _fini
    ./lib/crtn.o:         U _fini
    ./libc/misc/internals/__uClibc_main.o:         w _fini
    ./libc/sysdeps/linux/common/crti.o:00000000 T _fini
    ./libc/sysdeps/linux/common/crtn.o:         U _fini
    ./libm/s_finite.o:         U _gp_disp
    ./libm/s_finite.o:00000000 T finite

Actually I use an alias:

    alias nmfind 'find . -name "*.o" -print | xargs mipsel-linux-nm -o | grep'

for finding troublesome symbols.


Geoff
-- 
Geoffrey Espin
espin at idiom.com
--



More information about the uClibc mailing list