public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/27577] New: elf/ld.so --help doesn't work
@ 2021-03-13 20:09 hjl.tools at gmail dot com
  2021-03-14 12:22 ` [Bug dynamic-link/27577] " fw at deneb dot enyo.de
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2021-03-13 20:09 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 27577
           Summary: elf/ld.so --help doesn't work
           Product: glibc
           Version: 2.34
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

[hjl@gnu-tgl-1 build-x86_64-linux.orig]$ ./elf/ld.so  --help
Usage: ./elf/ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked 'ld.so', the program interpreter for dynamically-linked
ELF programs.  Usually, the program interpreter is invoked automatically
when a dynamically-linked executable is started.

You may invoke the program interpreter program directly from the command
line to load and run an ELF executable file; this is like executing that
file itself, but always uses the program interpreter you invoked,
instead of the program interpreter specified in the executable file you
run.  Invoking the program interpreter directly provides access to
additional diagnostics, and changing the dynamic linker behavior without
setting environment variables (which would be inherited by subprocesses).

  --list                list all dependencies and how they are resolved
  --verify              verify that given object really is a dynamically linked
                        object we can handle
  --inhibit-cache       Do not use /etc/ld.so.cache
  --library-path PATH   use given PATH instead of content of the environment
                        variable LD_LIBRARY_PATH
  --glibc-hwcaps-prepend LIST
                        search glibc-hwcaps subdirectories in LIST
  --glibc-hwcaps-mask LIST
                        only search built-in subdirectories if in LIST
  --inhibit-rpath LIST  ignore RUNPATH and RPATH information in object names
                        in LIST
  --audit LIST          use objects named in LIST as auditors
  --preload LIST        preload objects named in LIST
  --argv0 STRING        set argv[0] to STRING before running
  --list-tunables       list all tunables with minimum and maximum values
  --list-diagnostics    list diagnostics information
  --help                display this help and exit
  --version             output version information and exit

This program interpreter self-identifies as: /lib64/ld-linux-x86-64.so.2
Segmentation fault (core dumped)
[hjl@gnu-tgl-1 build-x86_64-linux.orig]$

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

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

* [Bug dynamic-link/27577] elf/ld.so --help doesn't work
  2021-03-13 20:09 [Bug dynamic-link/27577] New: elf/ld.so --help doesn't work hjl.tools at gmail dot com
@ 2021-03-14 12:22 ` fw at deneb dot enyo.de
  2021-03-15 10:03 ` fweimer at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: fw at deneb dot enyo.de @ 2021-03-14 12:22 UTC (permalink / raw)
  To: glibc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fw at deneb dot enyo.de
             Status|NEW                         |ASSIGNED
              Flags|                            |security-
           Assignee|unassigned at sourceware dot org   |fweimer at redhat dot com

--- Comment #1 from Florian Weimer <fw at deneb dot enyo.de> ---
Crash happens here:

  /* This points to the map of the main object.  */
  l = GL(dl_ns)[LM_ID_BASE]._ns_loaded;
  assert (l->l_type != lt_loaded);

l is NULL. The analysis leading to

commit 332421312576bd7095e70589154af99b124dd2d1 (origin/master, origin/HEAD)
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Fri Mar 12 16:44:47 2021 +0100

    elf: Always set l in _dl_init_paths (bug 23462)

was wrong that this could not happen (well, it was correct when the patch was
first written).

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

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

* [Bug dynamic-link/27577] elf/ld.so --help doesn't work
  2021-03-13 20:09 [Bug dynamic-link/27577] New: elf/ld.so --help doesn't work hjl.tools at gmail dot com
  2021-03-14 12:22 ` [Bug dynamic-link/27577] " fw at deneb dot enyo.de
@ 2021-03-15 10:03 ` fweimer at redhat dot com
  2021-03-15 13:44 ` fweimer at redhat dot com
  2021-03-16  9:27 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2021-03-15 10:03 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
Patch posted:
https://sourceware.org/pipermail/libc-alpha/2021-March/123835.html

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

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

* [Bug dynamic-link/27577] elf/ld.so --help doesn't work
  2021-03-13 20:09 [Bug dynamic-link/27577] New: elf/ld.so --help doesn't work hjl.tools at gmail dot com
  2021-03-14 12:22 ` [Bug dynamic-link/27577] " fw at deneb dot enyo.de
  2021-03-15 10:03 ` fweimer at redhat dot com
@ 2021-03-15 13:44 ` fweimer at redhat dot com
  2021-03-16  9:27 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2021-03-15 13:44 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.34
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for 2.34:

commit 4e6db99c665d3b82a70a3e218860ef087b1555b4
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Mar 15 10:33:43 2021 +0100

    elf: ld.so --help calls _dl_init_paths without a main map [BZ #27577]

    In this case, use the link map of the dynamic loader itself as
    a replacement.  This is more than just a hack: if we ever support
    DT_RUNPATH/DT_RPATH for the dynamic loader, reporting it for
    ld.so --help (without further command line arguments) would be the
    right thing to do.

    Fixes commit 332421312576bd7095e70589154af99b124dd2d1 ("elf: Always
    set l in _dl_init_paths (bug 23462)").

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

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

* [Bug dynamic-link/27577] elf/ld.so --help doesn't work
  2021-03-13 20:09 [Bug dynamic-link/27577] New: elf/ld.so --help doesn't work hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2021-03-15 13:44 ` fweimer at redhat dot com
@ 2021-03-16  9:27 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2021-03-16  9:27 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=23462

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

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

end of thread, other threads:[~2021-03-16  9:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13 20:09 [Bug dynamic-link/27577] New: elf/ld.so --help doesn't work hjl.tools at gmail dot com
2021-03-14 12:22 ` [Bug dynamic-link/27577] " fw at deneb dot enyo.de
2021-03-15 10:03 ` fweimer at redhat dot com
2021-03-15 13:44 ` fweimer at redhat dot com
2021-03-16  9:27 ` 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).