[uClibc] link problem with toolchain gcc 3.2.1 cross compiler for arm

Wen Yang weny at promise.com
Thu Jul 31 01:21:16 UTC 2003


Hello,

I have a problem using the arm-uclibc-ld linking a simple hello world
program. Can anyone help? Thanks a lot!

My testing environment is Pentium 4 running linux kernel 2.4.18

What I have done are:

1. get the toolchain gcc 3.2.1 tarball, and make it compile for arm, and
without FPU, and install it to /usr/toolchain_arm. I did the following
to make it compile: 

	a. in the root Makefile, I changed
		ARCH=arm
		USE_UCLIBC_SNAPSHOT=false
		EXTRA_GCC_CONFIG_OPTION=--with-cpu=xscale --nfp
--without-fp
		(I also tried --with-cpu=xscale only)
	b. make binutils
	c. make gcc_initial, after it unzipped the gcc, Ctrl-C to stop
it
	d. manually add -msoft-float through out gcc-3.2.1 and
uClibc-0.9.20 for the CFLAGS for target
	e. enable the MULTILIB as msoft-float
	f. make

2. write a simple program hello.c

#include <stdio.h>

int main(int argc, char ** argv)
{
	printf("hello world!\n");
	return 0;
}

3. /usr/toolchain_arm/bin/arm-uclibc-gcc hello.c -c -o hello.o

4. /usr/toolchain_arm/bin/arm-uclibc-ld -L/usr/toolchain_arm/lib -o
hello hello.o -lc

it reported the following errors:

/usr/toolchain_arm/bin/arm-uclibc-ld: warning: cannot find entry symbol
_start: defaulting to 000082a8
/usr/toolchain_arm/lib/libc.so: undefined reference to '__eqdf2'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__floatsidf'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__ltdf2'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__udivsi3'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__adddf3'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__fixdfsi'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__umodsi3'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__negdf2'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__divdf3'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__truncdefsf2'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__divsi3'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__nedf2'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__modsi3'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__gedf2'
/usr/toolchain_arm/lib/libc.so: undefined reference to '__subdf3'


Wen



More information about the uClibc mailing list