public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Properly handle DT_RUNPATH
@ 2021-12-08 15:24 H.J. Lu
  2021-12-08 15:24 ` [PATCH v3 1/3] Add and use link-test-modules-rpath-link [BZ #28455] H.J. Lu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: H.J. Lu @ 2021-12-08 15:24 UTC (permalink / raw)
  To: libc-alpha

DT_RUNPATH is only used to find the immediate dependencies of the
executable or shared object containing the DT_RUNPATH entry:

1. Define link-test-modules-rpath-link if $(build-hardcoded-path-in-tests)
is yes.
2. Use $(link-test-modules-rpath-link) in build-module-helper so that
test modules can dlopen modules with DT_RUNPATH.
3. Add a test to show why link-test-modules-rpath-link is needed.
4. The glibc internal NSS functions should always load NSS modules from
the system.  For testing purpose, disable DT_RUNPATH on NSS tests so
that the glibc internal NSS functions can load testing NSS modules
via DT_RPATH.
5. Update glibc LD_AUDIT dlopen call to try the DT_RUNPATH entry of the
executable.

H.J. Lu (3):
  Add and use link-test-modules-rpath-link [BZ #28455]
  Disable DT_RUNPATH on NSS tests [BZ #28455]
  elf: Also try DT_RUNPATH for LD_AUDIT dlopen [BZ #28455]

 Makeconfig           |  2 ++
 Makerules            |  1 +
 elf/Makefile         | 16 ++++++++++++++--
 elf/dl-load.c        | 15 +++++++++++++++
 elf/tst-audit14a.c   |  1 +
 elf/tst-global2.c    | 32 ++++++++++++++++++++++++++++++++
 elf/tst-globalmod2.c | 41 +++++++++++++++++++++++++++++++++++++++++
 nss/Makefile         |  8 ++++++++
 8 files changed, 114 insertions(+), 2 deletions(-)
 create mode 100644 elf/tst-audit14a.c
 create mode 100644 elf/tst-global2.c
 create mode 100644 elf/tst-globalmod2.c

-- 
2.33.1


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

end of thread, other threads:[~2021-12-16  2:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 15:24 [PATCH v3 0/3] Properly handle DT_RUNPATH H.J. Lu
2021-12-08 15:24 ` [PATCH v3 1/3] Add and use link-test-modules-rpath-link [BZ #28455] H.J. Lu
2021-12-13 15:32   ` Carlos O'Donell
2021-12-08 15:25 ` [PATCH v3 2/3] Disable DT_RUNPATH on NSS tests " H.J. Lu
2021-12-13 15:29   ` Carlos O'Donell
2021-12-08 15:25 ` [PATCH v3 3/3] elf: Also try DT_RUNPATH for LD_AUDIT dlopen " H.J. Lu
2021-12-13 22:07   ` Carlos O'Donell
2021-12-16  2:07     ` H.J. Lu

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