This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add --print-dirs option for ldconfig
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Dan Nicholson <dbn dot lists at gmail dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Sat, 31 Mar 2012 16:38:31 -0400
- Subject: Re: [PATCH] Add --print-dirs option for ldconfig
- References: <1333225410-20724-1-git-send-email-dbn.lists@gmail.com>
On Sat, Mar 31, 2012 at 4:23 PM, Dan Nicholson <dbn.lists@gmail.com> wrote:
> In order to debug linking issues, it's often beneficial to know the
> current linker path. This can be difficult since the platform's
> trusted directories may not be known, and parsing the ld.so.conf
> entries is error prone. Fortunately, ldconfig already does this.
>
> Add a -P|--print-dirs option to ldconfig for printing the linker
> search directories. Here is sample output from a Fedora 16 x86_64
> system:
>
> $ ./elf/ldconfig -P
> /usr/lib64/llvm
> /usr/lib64/tracker-0.12
> /usr/lib64/xulrunner-2
> /lib
> /lib64
> /usr/lib
> /usr/lib64
> ---
> ?ChangeLog ? ? ?| ? ?4 ++++
> ?elf/ldconfig.c | ? 16 ++++++++++++++++
> ?2 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index ba7b2cd..6eacf90 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,7 @@
> +2012-03-28 ?Dan Nicholson ?<dbn.lists@gmail.com>
> +
> + ? ? ? * elf/ldconfig.c: Add option to print linker path.
> +
This looks like a sensible new feature. I agree that finding out the
default search paths is difficult and probably involves running the
dynamic linker with LD_DEBUG to to an appropriately high value to show
the object searches.
Do you have copyright assignment for glibc?
I'd like to see some comments from other developers before we choose
to accept this enhancement.
Cheers,
Carlos.