diff options
author | Florian Weimer <fweimer@redhat.com> | 2025-08-01 10:20:23 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2025-08-01 10:21:39 +0200 |
commit | 20681be149b9eb1b6c1f4246bf4bd801221c86cd (patch) | |
tree | a3db3436564fe5dac0d0611687cb36c9606dd9d3 /sysdeps/unix/sysv/linux/sh/le/sh4 | |
parent | 2cac9559e06044ba520e785c151fbbd25011865f (diff) | |
download | glibc-master.zip glibc-master.tar.gz glibc-master.tar.bz2 |
Detect if ld.so not contiguous and handle that case in _dl_find_object.
Set l_find_object_processed even for initially loaded link maps,
otherwise dlopen of an initially loaded object adds it to
_dlfo_loaded_mappings (where maps are expected to be contiguous),
in addition to _dlfo_nodelete_mappings.
Test elf/tst-link-map-contiguous-ldso iterates over the loader
image, reading every word to make sure memory is actually mapped.
It only does that if the l_contiguous flag is set for the link map.
Otherwise, it finds gaps with mmap and checks that _dl_find_object
does not return the ld.so mapping for them.
The test elf/tst-link-map-contiguous-main does the same thing for
the libc.so shared object. This only works if the kernel loaded
the main program because the glibc dynamic loader may fill
the gaps with PROT_NONE mappings in some cases, making it contiguous,
but accesses to individual words may still fault.
Test elf/tst-link-map-contiguous-libc is again slightly different
because the dynamic loader always fills the gaps with PROT_NONE
mappings, so a different form of probing has to be used.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix/sysv/linux/sh/le/sh4')
0 files changed, 0 insertions, 0 deletions