[uClibc]mipsel ldd address 0x00000000?

Jon Loeliger jdl at vivato.net
Wed Jun 18 22:28:52 UTC 2003


> On Wed Jun 18, 2003 at 12:52:54PM -0700, Jon Loeliger wrote:
> > But then, should ldd on the box show where the load will happen
> > when not cross-ldd'ing?  It currently prints nothing.
> 
> Yes it should print something...

Thought so...

>   This is what I see on my mipsel box...

Heh.  Tried to do that earlier... :-)

> $ uname -a
> Linux phoenix 2.4.21-pre4 #1 Fri Jun 13 01:36:16 MDT 2003 mips unknown
unknown
> GNU/Linux
> $ /usr/mipsel-linux-uclibc/bin/mipsel-uclibc-gcc -Wall -Os hello.c -o
hello
> $ /usr/mipsel-linux-uclibc/bin/mipsel-uclibc-ldd ./hello
>         libc.so.0 => /usr/mipsel-linux-uclibc/lib/libc.so.0
(0x0x2aaee000)
>         ld-uClibc.so.0 => /usr/mipsel-linux-uclibc/lib/ld-uClibc.so.0
> (0x0x2aaa8000)
> $ ./hello
> hello world

So, I see lines _like_ those on the build box, but with zero addresses.
(Nice 0x0x in there, btw! :-)  The actual paths are hard coded paths
relative to the build environment and toolset that I just built.
Like:

%
/localstore0/jdl/mumble/vbs/build_mipsel/staging_dir/bin/mipsel-uclibc-l
dd /tmp/jdl/div
        libc.so.0 =>
/localstore0/jdl/mumble/vbs/build_mipsel/staging_dir/lib/libc.so.0
(0x00000000)
        /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000)

But on the mipsel target box, ldd is totally silent.
Is it possible that I don't have an install path or prefix correct?
In that way, when it is time to resolve symbols on the box, it is
library-lost in some way?  For information overload, my root FS /lib
is ls -lsa'ed below too. (*sigh*)  Yes, there's a bad symlink in
there...
(But that shouldn't cause ldd grief, right?)

Thanks,
jdl


% cat /tmp/jdl/div.c
#include <stdio.h>

float f;

float a = 1.0, b = 5.0;

union {
    float u_f;
    long long u_i;
} fi;

main()
{
    printf("Before the divide\n");
    f = a / b;
    printf("After the divide!\n");


    printf("a is now 0x%08llx\n", a);
    printf("b is now 0x%08llx\n", b);

    fi.u_f = 1.0;
    printf("u val 1.0 is 0x%08llx\n", fi.u_i);
    fi.u_f = 5.0;
    printf("u val 5.0 is 0x%08llx\n", fi.u_i);

    fi.u_f = 0.2;
    printf("a fifth is 0x%08llx\n", fi.u_i);

    fi.u_f = a / b;
    printf("u val div is 0x%08llx\n", fi.u_i);

    printf("f is now %g\n", f); /* toast */
}


build_mipsel/root_g/lib:
total 888
   4 drwxr-xr-x    3 jdl      users        4096 Jun 18 12:46 .
   4 drwxr-xr-x   13 jdl      users        4096 Jun 18 12:46 ..
  24 -rwxr-xr-x    1 jdl      users       23652 Jun 18 12:37
ld-uClibc-0.9.19.so
   0 lrwxrwxrwx    1 jdl      users          19 Jun 18 12:37
ld-uClibc.so.0 -> ld-uClibc-0.9.19.so
   0 lrwxrwxrwx    1 jdl      users          19 Jun 18 12:37 libc.so.0
-> libuClibc-0.9.19.so
  16 -rw-r--r--    1 jdl      users       13700 Jun 18 12:37
libcrypt-0.9.19.so
   0 lrwxrwxrwx    1 jdl      users          18 Jun 18 12:37
libcrypt.so.0 -> libcrypt-0.9.19.so
  12 -rw-r--r--    1 jdl      users        8356 Jun 18 12:37
libdl-0.9.19.so
   0 lrwxrwxrwx    1 jdl      users          15 Jun 18 12:37 libdl.so.0
-> libdl-0.9.19.so
   0 lrwxrwxrwx    1 jdl      users          64 Jun 18 12:46 libiw.so ->
/localstore0/jdl/mumble/vbs/build_mipsel/root_g/lib/libiw.so.24
 100 -rwxr-xr-x    1 jdl      users       96977 Jun 18 12:46 libiw.so.24
 132 -rw-r--r--    1 jdl      users      130436 Jun 18 12:37
libm-0.9.19.so
   0 lrwxrwxrwx    1 jdl      users          14 Jun 18 12:37 libm.so.0
-> libm-0.9.19.so
   4 -rw-r--r--    1 jdl      users        2168 Jun 18 12:37
libnsl-0.9.19.so
   0 lrwxrwxrwx    1 jdl      users          16 Jun 18 12:37 libnsl.so.0
-> libnsl-0.9.19.so
 104 -rw-r--r--    1 jdl      users      100312 Jun 18 12:37
libpthread-0.9.19.so
   0 lrwxrwxrwx    1 jdl      users          20 Jun 18 12:37
libpthread.so.0 -> libpthread-0.9.19.so
   4 -rw-r--r--    1 jdl      users        2172 Jun 18 12:37
libresolv-0.9.19.so
   0 lrwxrwxrwx    1 jdl      users          19 Jun 18 12:37
libresolv.so.0 -> libresolv-0.9.19.so
 404 -rw-r--r--    1 jdl      users      407940 Jun 18 12:37
libuClibc-0.9.19.so
   8 -rw-r--r--    1 jdl      users        5528 Jun 18 12:37
libutil-0.9.19.so
   0 lrwxrwxrwx    1 jdl      users          17 Jun 18 12:37
libutil.so.0 -> libutil-0.9.19.so
   0 lrwxrwxrwx    1 jdl      users          13 Jun 18 12:44 libz.so ->
libz.so.1.1.4
   0 lrwxrwxrwx    1 jdl      users          13 Jun 18 12:44 libz.so.1
-> libz.so.1.1.4
  68 -rw-r--r--    1 jdl      users       61616 Jun 18 12:44
libz.so.1.1.4
   4 drwxr-xr-x    3 jdl      users        4096 Jun 18 12:46 modules



More information about the uClibc mailing list