Symbol conflict between libc and libpthread
Hi,
I am trying to build a small program that needs both libc and libpthread as follows -
UCLINUXBASE=/usr/local/uClinux
ARMTOOLS=/usr/local/arm-uclinux-tools
CROSS_COMPILE=arm-uclinux
CR_CC=$ARMTOOLS/bin/$CROSS_COMPILE-gcc
CR_LD=$ARMTOOLS/bin/$CROSS_COMPILE-ld
CR_OBJCOPY=$ARMTOOLS/bin/$CROSS_COMPILE-objcopy
$CR_LD -r -T ${ARMTOOLS}/lib/elf2flt.ld \
${UCLINUXBASE}/arm-uclinux/lib/crt0pic.o \
thread.o \
-L${ARMTOOLS}/lib/gcc-lib/arm-uclinux/2.96/soft \
-L${UCLINUXBASE}/arm-uclinux/lib -lpthread -lc -lgcc -m armelf_uclinux \
-o thread.elf
Linker throws the following errors
/usr/local/uClinux//arm-uclinux/lib/libc.a(errno.o): In function '__errno_location': errno.o(.text+0x0): multiple definition of '__errno_location'
/usr/local/uClinux//arm-uclinux/lib/libpthread.a(errno.o)(.text+0x0): firstd efined here
/usr/local/uClinux//arm-uclinux/bin/arm-uclinux-ld: Warning: size of symbol '__errno_location' changed from 100 to 28 in errno.o
Can't open thread.elf
Any clues on why there is a symbol clash between libc and libpthread?
Thanks,
Ruchika
|