Skip to contentSkip to conversation

ldd

DISCUSSION Uwe Geuder 1 participant 1 message May 22, 2018

lore
Share & tools
lore

Uwe Geuder

author
#0 lore raw

Hi!

When searching for "yocto ldd" Google brings up this old posting

Quoted 6 lines · On Mon Nov 11 05:25:08 PST 2013 Chris Hallinan challinan at gmail.com wrote:
Quoted 4 lines · Gary Thomas
Quoted 2 lines · Seth Bollinger

Hello All,

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

I don't see that ldd is part of the cross toolchain build anywhere. Am I missing something?

It's built with the eglibc recipe and is packaged separately.

Right, and the command to locate it is

$ oe-pkgdata-util find-path /usr/bin/ldd
ldd: /usr/bin/ldd

So the package name is indeed ldd.

Quoted 10 lines

Gosh, I though ldd, originally a hard-to-maintain script, was obsoleted a long time ago. This command:

$ readelf --dynamic <binary>

provides the same information, and readelf can be found in every cross toolchain.

-Chris

I don't think that is correct. readelf only shows static information embedded into the binary. ldd does runtime lookup obeying e.g. the LD_LIBRARY_PATH environment variable. It also has options -r and -u for actually doing the relocations and it will report errors if they don't succeed. So ldd is more useful than readelf for some use cases.

Regards,

Uwe Geuder
Neuro Event Labs Oy
Tampere, Finland
[email protected] (Bot check: fix one obvious typo)