Bug 216864 - ldd -u gives false positives on x86_64
Summary: ldd -u gives false positives on x86_64
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 6
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-22 13:47 UTC by Arjan van de Ven
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-11-22 20:47:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Arjan van de Ven 2006-11-22 13:47:08 UTC
Description of problem:

[root@benny tmp]# cat test.c
#include <stdio.h>

void main()
{
        printf("hello world\n");
}
[root@benny tmp]# make test
cc     test.c   -o test
[root@benny tmp]# ldd -u test
Unused direct dependencies:
        /lib64/libc.so.6


(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...

Comment 1 Jakub Jelinek 2006-11-22 20:31:41 UTC
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.

Comment 2 Ulrich Drepper 2006-11-22 20:47:11 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.