[0/3] Make ld.so self-relocation/main malloc switch more robust

Message ID cover.1722934012.git.fweimer@redhat.com
Headers
Series Make ld.so self-relocation/main malloc switch more robust |

Message

Florian Weimer Aug. 6, 2024, 8:48 a.m. UTC
  This was reported as a failure downstream due to not having commit
ee1ada1bdb8074de6e1bdc956ab19aef7b6a7872 ("elf: Rework exception
handling in the dynamic loader [BZ #25486]").  I think it makes sense to
clean this up further and make things more robust.

Tested on x86_64-linux-gnu.

Thanks,
Florian

Florian Weimer (3):
  elf: rtld_multiple_ref is always true
  elf: Introduce _dl_relocate_object_no_relro
  elf: Switch to main malloc after final ld.so self-relocation

 elf/Makefile                     |   9 +++
 elf/dl-reloc.c                   |  24 +++++---
 elf/dl-support.c                 |   3 +-
 elf/rtld.c                       | 102 ++++++++++++++-----------------
 elf/tst-rtld-no-malloc-audit.c   |   1 +
 elf/tst-rtld-no-malloc-preload.c |   1 +
 elf/tst-rtld-no-malloc.c         |  75 +++++++++++++++++++++++
 sysdeps/generic/ldsodefs.h       |   7 +++
 8 files changed, 154 insertions(+), 68 deletions(-)
 create mode 100644 elf/tst-rtld-no-malloc-audit.c
 create mode 100644 elf/tst-rtld-no-malloc-preload.c
 create mode 100644 elf/tst-rtld-no-malloc.c


base-commit: d7eca2714f0da98894baa15e4c4735297ecd738d