[uClibc]Problem with uClibc and shared libraries on ARM

Alex Holden alex at linuxhacker.org
Mon Jan 28 17:28:06 UTC 2002


Erik Andersen wrote:

> I believe I've found and fixed the source of this problem.  It
> turns out that older toolchains can't cope with 'ld -nostdlib'
> and silently produce complete crap instead of doing the right
> thing.  I'd recently switched to using 'ld' to link the libraries
> instead of gcc, and had left in the -nostdlib flag which worked
> fine on my system.   But with older toolchains it was just not a
> good thing.  Anyways, I've fixed thing up in CVS now, so the
> segfaults should be all gone now...  


Something else seems to have broken which is making the standalone build 
fail (it worked earlier today):

gcc -O2 -Wall -DUCLIBC_TARGET_PREFIX=\"/\" \
	-DUCLIBC_DEVEL_PREFIX=\"/usr/arm-linux-uclibc\" \
	-DUCLIBC_BUILD_DIR=\"/usr/src/uClibc\" \
	-DUCLIBC_LDSO=\"ld-uClibc.so.0\" \
	ldd.c -o ldd
arm-linux-strip -x -R .note -R .comment ldd
arm-linux-strip: Warning: Output file cannot represent architecture UNKNOWN!
../../extra/gcc-uClibc/i386-uclibc-gcc -Wall -Os  -fstrict-aliasing 
-fno-builtin -nostdinc -pipe -nostdinc -I../../include 
-I/usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/include -I. -D_LIBC 
  -DNDEBUG  -static -s -DUCLIBC_TARGET_PREFIX=\"/\" \
	-DUCLIBC_DEVEL_PREFIX=\"/usr/arm-linux-uclibc\" \
	-DUCLIBC_BUILD_DIR=\"/usr/src/uClibc\" \
	-DUCLIBC_LDSO=\"ld-uClibc.so.0\" \
	ldd.c -o ldd.target
make[2]: ../../extra/gcc-uClibc/i386-uclibc-gcc: Command not found
make[2]: *** [ldd.target] Error 127
make[2]: Leaving directory `/usr/src/uClibc/ldso/util'
make[1]: *** [utils] Error 2
make[1]: Leaving directory `/usr/src/uClibc/ldso'
make: *** [install_toolchain] Error 2

The buildroot-tux script completed anyway (I think the libraries have 
already finished building by the time the above error occurs), but the 
resulting system segfaults in the same way as before.

BTW, what do you regard as an "older toolchain"? I'm currently using GCC 
2.95.3 and binutils 2.11.2 from ftp.arm.linux.org.uk. What toolchain are 
you using?

Oh, and the "-z combreloc" failure in ldso/ldso is still there. It looks 
like arm-linux-ld understands the flag but arm-linux-gcc doesn't (it 
says "arm-linux-gcc: combreloc: No such file or directory"). Removing 
that allows the build to complete (or it did before the most recent 
breakage), and doesn't stop the library from working when I build it 
from within the uClibc directory without the buildroot script.

-- 
------------ Alex Holden - http://www.linuxhacker.org ------------
If it doesn't work, you're not hitting it with a big enough hammer




More information about the uClibc mailing list