]> git.ipfire.org Git - thirdparty/glibc.git/commit
elf: ld.so --help calls _dl_init_paths without a main map [BZ #27577]
authorFlorian Weimer <fweimer@redhat.com>
Mon, 15 Mar 2021 09:33:43 +0000 (10:33 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 16 Mar 2021 09:27:53 +0000 (10:27 +0100)
commitdd8023c2ac0af28a6e391a2eb5038bb351694243
tree5ac1f106866f4b9e01a7a2fe7cf0fbae20227f2a
parentea5a537e879bb667e03435a2308d915dc89448a6
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)").

(cherry picked from commit 4e6db99c665d3b82a70a3e218860ef087b1555b4)
NEWS
elf/Makefile
elf/dl-load.c