How do I build a cross-ldd?

Dave Dodge dododge at dododge.net
Tue Dec 19 08:25:19 UTC 2006


On Mon, Dec 18, 2006 at 01:19:23AM -0500, Rob Landley wrote:
> I want an x86 version of ldd that does a proper dump for non-x86 binaries.  
> What am I doing wrong?

It could be tricky.  Bear in mind that ldd normally takes the names of
the required shared libraries and actually finds the library files (on
the target system) that match.  I think it also tracks down
dependencies recursively, for example if the executable requires
libABC then it also looks for any libraries that libABC says it needs.
I don't know how ldd is normally implemented, but if it expects to use
the loader itself to do this then that's even more trouble due to the
loader being cross-compiled to target code.

If you just want a simple list of library names that the executable
needs, you could try "readelf -d" instead.

                                                  -Dave Dodge



More information about the uClibc mailing list