public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/25846] New: Provide method to show loader search directories
@ 2020-04-17 22:38 nicholson at endlessm dot com
  2020-04-17 22:38 ` [Bug dynamic-link/25846] " nicholson at endlessm dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: nicholson at endlessm dot com @ 2020-04-17 22:38 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=25846

            Bug ID: 25846
           Summary: Provide method to show loader search directories
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: nicholson at endlessm dot com
  Target Milestone: ---

Created attachment 12478
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12478&action=edit
ldconfig: Add --print-dirs option

Currently there's no way to know the exact search path that the dynamic loader
uses. You can parse the entries in /etc/ld.so.conf (following any include
statements), but that doesn't include the "standard" builtin directories. A
good guess can be made with /lib and /usr/lib, but ultimately it depends on how
glibc was built. This can often miss things like /usr/lib64 or
/usr/lib/$(arch_triplet) in common use.

There should be a method to obtain the directories that the dynamic loader
searches. This would also absolve users from having to parse /etc/ld.so.conf in
an error prone way. This information is particularly useful to tools that deal
with building or installing libraries such as libtool.

The attached patch adds an option to ldconfig to handle this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug dynamic-link/25846] Provide method to show loader search directories
  2020-04-17 22:38 [Bug dynamic-link/25846] New: Provide method to show loader search directories nicholson at endlessm dot com
@ 2020-04-17 22:38 ` nicholson at endlessm dot com
  2020-04-17 22:47 ` ijaffery7 at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: nicholson at endlessm dot com @ 2020-04-17 22:38 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=25846

Dan Nicholson <nicholson at endlessm dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unspecified                 |2.33

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug dynamic-link/25846] Provide method to show loader search directories
  2020-04-17 22:38 [Bug dynamic-link/25846] New: Provide method to show loader search directories nicholson at endlessm dot com
  2020-04-17 22:38 ` [Bug dynamic-link/25846] " nicholson at endlessm dot com
@ 2020-04-17 22:47 ` ijaffery7 at gmail dot com
  2020-04-20  9:13 ` fweimer at redhat dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ijaffery7 at gmail dot com @ 2020-04-17 22:47 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=25846

Martinking <ijaffery7 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ijaffery7 at gmail dot com

--- Comment #1 from Martinking <ijaffery7 at gmail dot com> ---
I have seen few authentic reviews here
https://techypes.com/best-wireless-chargers/

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug dynamic-link/25846] Provide method to show loader search directories
  2020-04-17 22:38 [Bug dynamic-link/25846] New: Provide method to show loader search directories nicholson at endlessm dot com
  2020-04-17 22:38 ` [Bug dynamic-link/25846] " nicholson at endlessm dot com
  2020-04-17 22:47 ` ijaffery7 at gmail dot com
@ 2020-04-20  9:13 ` fweimer at redhat dot com
  2020-05-03 20:49 ` nicholson at endlessm dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2020-04-20  9:13 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=25846

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-
                 CC|                            |fweimer at redhat dot com
           Severity|normal                      |enhancement

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
Thanks for the patch. I agree that this is a useful feature.

Please note that we generally discuss patches on the mailing list:
https://sourceware.org/mailman/listinfo/libc-alpha

For a contribution of this size, we will need FSF paperwork unfortunately:
https://sourceware.org/glibc/wiki/Contribution%20checklist#FSF_copyright_Assignment

Regarding the change itself, I think the printing has to be added to ld.so
(elf/rtld.c). ldconfig is statically linked, so could get out of sync with the
dynamic loader. There can also be multiple dynamic loaders with different
search paths be installed on the same system.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug dynamic-link/25846] Provide method to show loader search directories
  2020-04-17 22:38 [Bug dynamic-link/25846] New: Provide method to show loader search directories nicholson at endlessm dot com
                   ` (2 preceding siblings ...)
  2020-04-20  9:13 ` fweimer at redhat dot com
@ 2020-05-03 20:49 ` nicholson at endlessm dot com
  2020-05-04  4:14 ` fw at deneb dot enyo.de
  2022-01-27 15:45 ` fweimer at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: nicholson at endlessm dot com @ 2020-05-03 20:49 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=25846

--- Comment #3 from Dan Nicholson <nicholson at endlessm dot com> ---
OK, I'll bring the patch over to the mailing list and see about the copyright
assignment.

I see what you're saying about having it in ld.so instead of ldconfig.
Unfortunately, knowing the path to ld.so can be difficult. What do you think
about calling ld.so in the appropriate mode from a well known tool like ldd
does as a convenience?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug dynamic-link/25846] Provide method to show loader search directories
  2020-04-17 22:38 [Bug dynamic-link/25846] New: Provide method to show loader search directories nicholson at endlessm dot com
                   ` (3 preceding siblings ...)
  2020-05-03 20:49 ` nicholson at endlessm dot com
@ 2020-05-04  4:14 ` fw at deneb dot enyo.de
  2022-01-27 15:45 ` fweimer at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: fw at deneb dot enyo.de @ 2020-05-04  4:14 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=25846

Florian Weimer <fw at deneb dot enyo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fw at deneb dot enyo.de

--- Comment #4 from Florian Weimer <fw at deneb dot enyo.de> ---
(In reply to Dan Nicholson from comment #3)
> OK, I'll bring the patch over to the mailing list and see about the
> copyright assignment.

Thanks.

> I see what you're saying about having it in ld.so instead of ldconfig.

I think we eventually need both, so starting with ldconfig is fine.

> Unfortunately, knowing the path to ld.so can be difficult. What do you think
> about calling ld.so in the appropriate mode from a well known tool like ldd
> does as a convenience?

We could install ld.so as a program in /usr/bin, as a separate change.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug dynamic-link/25846] Provide method to show loader search directories
  2020-04-17 22:38 [Bug dynamic-link/25846] New: Provide method to show loader search directories nicholson at endlessm dot com
                   ` (4 preceding siblings ...)
  2020-05-04  4:14 ` fw at deneb dot enyo.de
@ 2022-01-27 15:45 ` fweimer at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2022-01-27 15:45 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=25846

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
           Assignee|unassigned at sourceware dot org   |fweimer at redhat dot com
   Target Milestone|---                         |2.33
         Resolution|---                         |FIXED

--- Comment #5 from Florian Weimer <fweimer at redhat dot com> ---
This information is now included in --help:

commit 10b39a5124aea509dfeef2f39a0835adb0fb2296
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Oct 9 10:13:14 2020 +0200

    elf: Add library search path information to ld.so --help

    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

I disagree that this would help libtool. libtool should not try to guess this
stuff, but rely on a correctly set up toolchain. That's why I'm hesitant to
provide machine-parseable output here.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-01-27 15:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 22:38 [Bug dynamic-link/25846] New: Provide method to show loader search directories nicholson at endlessm dot com
2020-04-17 22:38 ` [Bug dynamic-link/25846] " nicholson at endlessm dot com
2020-04-17 22:47 ` ijaffery7 at gmail dot com
2020-04-20  9:13 ` fweimer at redhat dot com
2020-05-03 20:49 ` nicholson at endlessm dot com
2020-05-04  4:14 ` fw at deneb dot enyo.de
2022-01-27 15:45 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).