[uClibc]no symbols in .so libraries
Brendan J Simon
brendan.simon at ctam.com.au
Wed Jul 10 07:51:09 UTC 2002
I am using uClibc maintained under a configuration management system
called Aegis. The uClibc binaries are called from the baseline of the
uClibc Aegis project. Unfortuantely the DEVEL_PREFIX changes during
various stages of building uClibc under Aegis and thus the final
wrappers reference a directory that no longer exists :(
The work around is for me to us nostdinc, nostdlib, etc and manually
specify all the libraries, included files, startup files, etc. I have
no problem with this as this is what I was doing when using glibc. My
programs now compile but do not link. I get undefined references to
printf, etc. It looks like it can't find the libraries but the command
line looks OK to me. On closer inspection I notice that all the
lib*.so.0 files do not have any symbols. This is surely incorrect for
dynamic linking, isn't it ???
Here's the output (I have formatted the options for better readability)
/home/aegis/uclibc/branch.0/branch.9/branch.12/branch.0/baseline/myproject/devel/bin/gcc
-nostdlib
-nodefaultlibs
-nostartfiles
-Linstall/lib
-L/home/aegis/uclibc/branch.0/branch.9/branch.12/branch.0/baseline/myproject/devel/usr/lib
-L/home/aegis/uclibc/branch.0/branch.9/branch.12/branch.0/baseline/myproject/devel/lib
-o build/drivers/usi/tools/testr
build/drivers/usi/tools/testr.o
/home/aegis/uclibc/branch.0/branch.9/branch.12/branch.0/baseline/myproject/devel/lib/crt0.o
/home/aegis/uclibc/branch.0/branch.9/branch.12/branch.0/baseline/myproject/devel/lib/crti.o
/usr/lib/gcc-lib/powerpc-linux/2.95.4/crtbegin.o
-lpthread
-lc
/usr/lib/gcc-lib/powerpc-linux/2.95.4/libgcc.a
/usr/lib/gcc-lib/powerpc-linux/2.95.4/crtend.o
/home/aegis/uclibc/branch.0/branch.9/branch.12/branch.0/baseline/myproject/devel/lib/crtn.o
build/drivers/usi/tools/testr.o: In function `printb':
build/drivers/usi/tools/testr.o(.text+0x50): undefined reference to `printf'
build/drivers/usi/tools/testr.o(.text+0x50): relocation truncated to
fit: R_PPC_REL24 printf
build/drivers/usi/tools/testr.o(.text+0x64): undefined reference to `printf'
build/drivers/usi/tools/testr.o(.text+0x64): relocation truncated to
fit: R_PPC_REL24
How do I get my programs to link with shared libraries that have no
symbols ???
Thanks,
Brendan Simon.
More information about the uClibc
mailing list