From: "Joseph S. Myers" <joseph@codesourcery.com>
To: <libc-ports@sourceware.org>
Subject: Make mmap64 an alias of mmap on MIPS64
Date: Fri, 27 Jul 2012 13:48:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1207271344010.24556@digraph.polyomino.org.uk> (raw)
On MIPS64, both n32 and n64, there is only an mmap syscall, taking a
64-bit offset argument, and no mmap2. This means it is appropriate for
them to have mmap and mmap64 as aliases, as done for
sysdeps/unix/sysv/linux/wordsize-64 architectures, rather than using
sysdeps/unix/sysv/linux/mmap64.c. I've applied this patch to implement
this. For n64 this is simply a bit more efficient; for n32 it should mean
mmap64 actually works for 64-bit offsets that would previously have been
rejected.
This showed up in the course of working out what's needed to eliminate
__ASSUME_MMAP2_SYSCALL.
diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips
index 2a5cf36..a1b6dc5 100644
--- a/ports/ChangeLog.mips
+++ b/ports/ChangeLog.mips
@@ -1,3 +1,8 @@
+2012-07-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (mmap): New.
+ * sysdeps/unix/sysv/linux/mips/mips64/mmap64.c: New file.
+
2012-07-25 Florian Weimer <fweimer@redhat.com>
* sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist: Add
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/mmap64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/mmap64.c
new file mode 100644
index 0000000..0dbd384
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/mmap64.c
@@ -0,0 +1 @@
+/* mmap64 is the same as mmap. */
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
index 867323a..50d5ba3 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
@@ -2,6 +2,8 @@
lseek - lseek Ci:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64
+mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64
+
ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64
truncate - truncate i:si truncate truncate64
--
Joseph S. Myers
joseph@codesourcery.com
reply other threads:[~2012-07-27 13:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.1207271344010.24556@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=libc-ports@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).