diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2023-06-22 14:30:31 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2023-06-30 10:42:42 -0700 |
commit | 6259ab39410cdefc80077afea48ca9cb057f6005 (patch) | |
tree | f8f3550b1563e2312598dc5618f6d2ab4f48ee0a /sysdeps/posix/sigset.c | |
parent | 9401024e5e6be0e1c3870e185daae865cd4501f4 (diff) | |
download | glibc-6259ab39410cdefc80077afea48ca9cb057f6005.tar.gz glibc-6259ab39410cdefc80077afea48ca9cb057f6005.tar.xz glibc-6259ab39410cdefc80077afea48ca9cb057f6005.zip |
ld.so: Always use MAP_COPY to map the first segment [BZ #30452]
The first segment in a shared library may be read-only, not executable. To support LD_PREFER_MAP_32BIT_EXEC on such shared libraries, we also check MAP_DENYWRITE to decide if MAP_32BIT should be passed to mmap. Normally the first segment is mapped with MAP_COPY, which is defined as (MAP_PRIVATE | MAP_DENYWRITE). But if the segment alignment is greater than the page size, MAP_COPY isn't used to allocate enough space to ensure that the segment can be properly aligned. Map the first segment with MAP_COPY in this case to fix BZ #30452.
Diffstat (limited to 'sysdeps/posix/sigset.c')
0 files changed, 0 insertions, 0 deletions