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

Florian Weimer fweimer@redhat.com
Tue Jul 29 14:04:48 GMT 2025


* Florian Weimer:

> 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

Ping?  Could we get this bug fix merged, now that the release is out?

Thanks,
Florian



More information about the Libc-alpha mailing list