Red Hat Bugzilla – Bug 216864
ldd -u gives false positives on x86_64
Last modified: 2007-11-30 17:11:49 EST
Description of problem:
[root@benny tmp]# cat test.c
[root@benny tmp]# make test
cc test.c -o test
[root@benny tmp]# ldd -u test
Unused direct dependencies:
(minimal testcase; this happens with a real big program as well)
ldd -u somehow doesn't think any of the direct dependencies are used even though
they really are...
Use ldd -u -r if you want to take into account also PLT relocations.
I agree ldd -u alone doesn't make much sense, but if I remember well that's
to much Solaris ldd behavior.
Indeed, this functionality is modelled after the Solaris version. There are
situations conceivable where -u without -r might be useful. It won't be
changed, learn to live with it.