mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-02 01:40:07 +00:00
5163b4b76f
The handling of negative offsets in MIPS mmap is inconsistent with other architectures, as shown by failure of the test posix/tst-mmap-offset for o32 and n32. The MIPS mmap syscall uses a signed argument and does a signed arithmetic shift on it, whereas the glibc semantics expected by that test are for the offset to be considered as a large positive offset. This patch makes MIPS consistent with other architectures as far as possible by using the mmap2 syscall on o32 (#including the generic implementation), and making mmap not an alias for mmap64 for n32, with a custom implementation for n32 that zero-extends the offset argument to 64-bit before calling the mmap syscall. Tested for MIPS64 (o32, n32, n64). [BZ #19550] * sysdeps/unix/sysv/linux/mips/mips32/mmap.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/mmap64.c: Move to .... * sysdeps/unix/sysv/linux/mips/mips64/n64/mmap64.c: ... here. * sysdeps/unix/sysv/linux/mips/mips64/n32/mmap.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (mmap64): New syscall entry. * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list (mmap): New syscall entry. * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (mmap): Remove syscall entry. |
||
---|---|---|
.. | ||
fpu | ||
mips16 | ||
nofpu | ||
accept4.c | ||
c++-types.data | ||
fcntl.c | ||
ftruncate64.c | ||
fxstatat.c | ||
ld.abilist | ||
libanl.abilist | ||
libBrokenLocale.abilist | ||
libcidn.abilist | ||
libcrypt.abilist | ||
libdl.abilist | ||
libm.abilist | ||
libnsl.abilist | ||
libnss_compat.abilist | ||
libnss_db.abilist | ||
libnss_dns.abilist | ||
libnss_files.abilist | ||
libnss_hesiod.abilist | ||
libnss_nis.abilist | ||
libnss_nisplus.abilist | ||
libpthread.abilist | ||
libresolv.abilist | ||
librt.abilist | ||
libthread_db.abilist | ||
libutil.abilist | ||
lockf64.c | ||
mmap.c | ||
posix_fadvise64.c | ||
posix_fadvise.c | ||
readahead.c | ||
recvmmsg.c | ||
sendmmsg.c | ||
sync_file_range.c | ||
syscalls.list | ||
sysdep.h | ||
truncate64.c | ||
Versions |