aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2023-06-22 14:30:31 -0700
committerH.J. Lu <hjl.tools@gmail.com>2023-06-30 10:42:42 -0700
commit6259ab39410cdefc80077afea48ca9cb057f6005 (patch)
treef8f3550b1563e2312598dc5618f6d2ab4f48ee0a /math
parent9401024e5e6be0e1c3870e185daae865cd4501f4 (diff)
downloadglibc-6259ab39410cdefc80077afea48ca9cb057f6005.zip
glibc-6259ab39410cdefc80077afea48ca9cb057f6005.tar.gz
glibc-6259ab39410cdefc80077afea48ca9cb057f6005.tar.bz2
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 'math')
0 files changed, 0 insertions, 0 deletions