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 v2 0/3] Predictable ELF destructor ordering
Date: Thu, 03 Feb 2022 16:17:44 +0100	[thread overview]
Message-ID: <cover.1643901334.git.fweimer@redhat.com> (raw)

These patches remove the dependency sorting from dlclose and process
shutdown, so that destructor order is the reverse of constructor order
in more cases (always if the process does not call dlclose).

Tested on i686-linux-gnu and x86_64-linux-gnu.  Built with
build-many-glibcs.py.

Thanks,
Florian

Florian Weimer (3):
  elf: Do not rely on relocation dependencies for destructor sorting
  elf: Do not run constructors for proxy objects
  elf: Always call destructors in reverse constructor order

 elf/dl-close.c             | 130 ++++++++++++++----------
 elf/dl-deps.c              |   3 +-
 elf/dl-fini.c              | 196 +++++++++++++------------------------
 elf/dl-init.c              |  20 ++++
 elf/dl-sort-maps.c         | 105 ++------------------
 elf/dso-sort-tests-1.def   |   6 +-
 elf/tst-audit23.c          |  44 +++++----
 include/link.h             |   4 +
 sysdeps/generic/ldsodefs.h |   6 +-
 9 files changed, 212 insertions(+), 302 deletions(-)


base-commit: 97ba273b505763325efd802dc3a9562dbba79579
-- 
2.34.1


             reply	other threads:[~2022-02-03 15:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 15:17 Florian Weimer [this message]
2022-02-03 15:17 ` [PATCH v2 1/3] elf: Do not rely on relocation dependencies for destructor sorting Florian Weimer
2022-02-14 20:11   ` Adhemerval Zanella
2022-02-03 15:18 ` [PATCH v2 2/3] elf: Do not run constructors for proxy objects Florian Weimer
2022-02-03 15:18 ` [PATCH v2 3/3] elf: Always call destructors in reverse constructor order Florian Weimer
2022-02-15 11:59   ` Adhemerval Zanella
2023-08-22 10:46     ` Florian Weimer

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