[PATCH v2 0/2] elf: Handle ld.so with LOAD segment gaps in _dl_find_object (bug 31943)

Florian Weimer fweimer@redhat.com
Fri Jul 25 11:10:21 GMT 2025


This is the minimal version of the fix, without any page size
optimizations.

While extending the test case, I realized the original fix did not
actually work because of the missing l_find_object_processed update,
which is included here.

Tested on powerpc64le-linux-gnu.

Version 2 incorporates some minor test fixes.

Florian Weimer (2):
  elf: Extract rtld_setup_phdr function from dl_main
  elf: Handle ld.so with LOAD segment gaps in _dl_find_object (bug
    31943)

 elf/Makefile                       |  6 ++
 elf/dl-find_object.c               | 74 +++++++++++++---------
 elf/dl-find_object.h               |  7 ++-
 elf/rtld.c                         | 82 +++++++++++++++++--------
 elf/tst-link-map-contiguous-ldso.c | 98 ++++++++++++++++++++++++++++++
 elf/tst-link-map-contiguous-libc.c | 57 +++++++++++++++++
 elf/tst-link-map-contiguous-main.c | 45 ++++++++++++++
 7 files changed, 311 insertions(+), 58 deletions(-)
 create mode 100644 elf/tst-link-map-contiguous-ldso.c
 create mode 100644 elf/tst-link-map-contiguous-libc.c
 create mode 100644 elf/tst-link-map-contiguous-main.c


base-commit: 158e939aef55017f76c93d4be1b262de6cc2378f
-- 
2.50.1



More information about the Libc-alpha mailing list