uClibc, libstdc++, and readdir()
Jeff Warren
tiny.laser at comcast.net
Fri May 26 22:43:53 UTC 2006
On Thu, 2006-05-25 at 20:07, Mike Frysinger wrote:
> the uClibc ldd app isnt perfect ... sometimes it's better if you just use
> `readelf -d` and look at the DT_NEEDED entries
> -mike
arm-linux-readelf -d flyermarker (one of my C++ programs...)
Dynamic segment at offset 0x31fb4 contains 22 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library:
[libstdc++.so.5]
0x00000001 (NEEDED) Shared library: [libfloat.so.1]
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000c (INIT) 0x98c4
0x0000000d (FINI) 0x350c0
0x00000004 (HASH) 0x8130
0x00000005 (STRTAB) 0x8ec0
0x00000006 (SYMTAB) 0x8590
0x0000000a (STRSZ) 1622 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000015 (DEBUG) 0x0
0x00000003 (PLTGOT) 0x42128
0x00000002 (PLTRELSZ) 344 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0x976c
0x00000011 (REL) 0x969c
0x00000012 (RELSZ) 208 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x6ffffffe (VERNEED) 0x963c
0x6fffffff (VERNEEDNUM) 2
0x6ffffff0 (VERSYM) 0x9516
0x00000000 (NULL) 0x0
arm-linux-readelf -d bin/busybox (this is version 1.1.2, which works
fine).
Dynamic segment at offset 0x6d960 contains 17 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libfloat.so.1]
0x0000000c (INIT) 0x902c
0x0000000d (FINI) 0x63490
0x00000004 (HASH) 0x8130
0x00000005 (STRTAB) 0x8960
0x00000006 (SYMTAB) 0x83b0
0x0000000a (STRSZ) 1091 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000015 (DEBUG) 0x0
0x00000003 (PLTGOT) 0x7da24
0x00000002 (PLTRELSZ) 168 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0x8f84
0x00000011 (REL) 0x8da4
0x00000012 (RELSZ) 480 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x00000000 (NULL) 0x0
Actually it looks like ldd is fine as readelf -d reports the same thing.
And I don't understand it but I could remove the libuClibc.so from the
rootfs and bootup, like I said it would eventually hang, but that is the
ONLY C library on my system, libc.so and all others are links pointing
to uClibc. Even BusyBox would run. Eventually the system will hang,
but I would expect something more catastrophic and immediate. I don't
understand it as using readdir() is obviously using the CLibrary, but it
would still work.
Now if I removed the libstdc++ library the effect on the program was
immediate and they would not run.
The end result is good for me now and everything is working. I just
wanted to understand more what was going on as I would expect the
program to link to uClibc and it does not, so as far as that goes, I
still don't get it.
Regards,
Jeff Warren
More information about the uClibc
mailing list