mbox

[v2,0/3] Predictable ELF destructor ordering

Message ID cover.1643901334.git.fweimer@redhat.com
Headers

Message

Florian Weimer Feb. 3, 2022, 3:17 p.m. UTC
  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