aboutsummaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-08-01 10:20:23 +0200
committerFlorian Weimer <fweimer@redhat.com>2025-08-01 10:21:39 +0200
commit20681be149b9eb1b6c1f4246bf4bd801221c86cd (patch)
treea3db3436564fe5dac0d0611687cb36c9606dd9d3 /support
parent2cac9559e06044ba520e785c151fbbd25011865f (diff)
downloadglibc-master.zip
glibc-master.tar.gz
glibc-master.tar.bz2
elf: Handle ld.so with LOAD segment gaps in _dl_find_object (bug 31943)HEADmaster
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 'support')
0 files changed, 0 insertions, 0 deletions