public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: libc-alpha@sourceware.org
Subject: [PATCH 0/4] _r_debug copy relocation support
Date: Thu, 23 Dec 2021 19:43:07 +0100	[thread overview]
Message-ID: <cover.1640284721.git.fweimer@redhat.com> (raw)

I implemented this because we received a bug that the _r_debug extension
mechanism broke dyninst.  But it turns out it wasn't because of a copy
relocation: dyninst has its own interposing *definition* of _r_debug, so
the patch series doesn't solve this.  It can only handle an interposing
definition in the main executable, not one in shared object (although I
guess in theory we could fix this).

The first two patches are independently useful, and the second two
patches could be used if we ever need to implement copy relocation
support for _r_debug.

Tested on i686-linux-gnu and x86_64-linux-gnu.

Thanks,
Florian

Florian Weimer (4):
  elf: Introduce separate _r_debug_array variable
  elf: Introduce _dl_debug_change_state
  elf: Support version-less lookup in _dl_lookup_direct
  elf: Restore support for _r_debug copy relocations

 elf/Makefile               |   8 +++
 elf/dl-close.c             |   6 +-
 elf/dl-debug.c             | 138 ++++++++++++++++++++++++++-----------
 elf/dl-load.c              |   6 +-
 elf/dl-lookup-direct.c     |   5 ++
 elf/dl-open.c              |   5 +-
 elf/rtld.c                 |  10 +--
 elf/tst-dlmopen4-nonpic.c  |   2 +
 elf/tst-dlmopen4-pic.c     |   2 +
 elf/tst-dlmopen4.c         |  22 ++++++
 sysdeps/generic/ldsodefs.h |  27 ++++++--
 11 files changed, 168 insertions(+), 63 deletions(-)
 create mode 100644 elf/tst-dlmopen4-nonpic.c
 create mode 100644 elf/tst-dlmopen4-pic.c


base-commit: 9702a7901e18460e8ffc5f56a493d41294a8e936
-- 
2.33.1


             reply	other threads:[~2021-12-23 18:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23 18:43 Florian Weimer [this message]
2021-12-23 18:43 ` [PATCH 1/4] elf: Introduce separate _r_debug_array variable Florian Weimer
2021-12-23 18:43 ` [PATCH 2/4] elf: Introduce _dl_debug_change_state Florian Weimer
2021-12-23 18:43 ` [PATCH 3/4] elf: Support version-less lookup in _dl_lookup_direct Florian Weimer
2021-12-23 18:43 ` [PATCH 4/4] elf: Restore support for _r_debug copy relocations Florian Weimer
2021-12-23 19:18 ` [PATCH 0/4] _r_debug copy relocation support H.J. Lu
2021-12-23 19:59   ` Florian Weimer
2021-12-23 20:47     ` H.J. Lu
2021-12-23 21:00       ` Florian Weimer
2021-12-23 21:50         ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1640284721.git.fweimer@redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).