link error with uclibc

Mike Frysinger vapier at gentoo.org
Fri Oct 9 06:19:23 UTC 2009


On Friday 09 October 2009 00:15:10 loody wrote:
> 2009/10/5 Mike Frysinger <vapier at gentoo.org>:
> > On Sunday 04 October 2009 12:16:16 loody wrote:
> >> I cross-compile a standalone test program with toolchain build with
> >> uclibc. and there are some errors as what I attach at the end of letter.
> >> I search the uclibc source and I find the  there is no variable,
> >> __nedf2, in _fpmaxtostr.c.
> >> but why linker tell me he cannot find it?
> >> should I link some other libraries before -lc for variable, __nedf2?
> >
> > those symbols are from gcc, not uClibc.  if you link statically, it's
> > your problem to make sure you link everything needed.  especially when
> > invoking the linker directly.
> 
> Why will uClibc need gcc header files while linking?
> In my opinion, the header files which the static or dynamic lib of
> uClibc need should already be compiled when building uClibc.
> Are my assumptions wrong?

i didnt say gcc header files as i wasnt referring to them, but in reality, yes 
gcc provides headers, objects, and libraries that always get used.  you really 
shouldnt be invoking ld directly let alone making your own linker script.  i 
cant really imagine any valid use case of doing either of things when creating 
Linux applications.

you can use the -v flag with gcc to see how it links things and then you can 
use that to figure out what you're doing wrong.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20091009/6d7ce590/attachment.pgp>


More information about the uClibc mailing list