summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ldso/include/dl-syscall.h5
-rw-r--r--ldso/ldso/i386/dl-syscalls.h1
-rw-r--r--ldso/ldso/mips/dl-syscalls.h1
-rw-r--r--ldso/ldso/powerpc/dl-syscalls.h2
-rw-r--r--ldso/ldso/sh/dl-syscalls.h2
-rw-r--r--ldso/ldso/sparc/dl-syscalls.h2
-rw-r--r--ldso/ldso/x86_64/dl-syscalls.h2
7 files changed, 12 insertions, 3 deletions
diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h
index 1bcf95fb1..fe3f46452 100644
--- a/ldso/include/dl-syscall.h
+++ b/ldso/include/dl-syscall.h
@@ -104,8 +104,7 @@ static inline _syscall0(gid_t, _dl_getpid);
static inline _syscall3(int, _dl_readlink, const char *, path, char *, buf, size_t, bufsiz);
#ifdef __NR_mmap
-#if defined(__powerpc__) || defined(__mips__) || defined(__sh__) || defined(__sparc__) || defined(__x86_64__)
-/* PowerPC, MIPS and SuperH have a different calling convention for mmap(). */
+#ifdef MMAP_HAS_6_ARGS
#define __NR__dl_mmap __NR_mmap
static inline _syscall6(void *, _dl_mmap, void *, start, size_t, length,
int, prot, int, flags, int, fd, off_t, offset);
@@ -141,6 +140,8 @@ static inline void * _dl_mmap(void * addr, unsigned long size, int prot,
return(__syscall_mmap2(addr, size, prot, flags,
fd, (off_t) (offset >> MMAP2_PAGE_SHIFT)));
}
+#else
+#error Your architecture doesn't provide mmap() !?
#endif
#endif /* _LD_SYSCALL_H_ */
diff --git a/ldso/ldso/i386/dl-syscalls.h b/ldso/ldso/i386/dl-syscalls.h
index f0f4baed8..dc0cc6164 100644
--- a/ldso/ldso/i386/dl-syscalls.h
+++ b/ldso/ldso/i386/dl-syscalls.h
@@ -3,4 +3,3 @@
extern int _dl_errno;
#define __set_errno(X) {(_dl_errno) = (X);}
#include "sys/syscall.h"
-
diff --git a/ldso/ldso/mips/dl-syscalls.h b/ldso/ldso/mips/dl-syscalls.h
index f0f4baed8..a97ff562c 100644
--- a/ldso/ldso/mips/dl-syscalls.h
+++ b/ldso/ldso/mips/dl-syscalls.h
@@ -4,3 +4,4 @@ extern int _dl_errno;
#define __set_errno(X) {(_dl_errno) = (X);}
#include "sys/syscall.h"
+#define MMAP_HAS_6_ARGS
diff --git a/ldso/ldso/powerpc/dl-syscalls.h b/ldso/ldso/powerpc/dl-syscalls.h
index 8b8c3b9ef..a5fa30a5d 100644
--- a/ldso/ldso/powerpc/dl-syscalls.h
+++ b/ldso/ldso/powerpc/dl-syscalls.h
@@ -3,6 +3,8 @@
* numbers used by the shared library loader.
*/
+#define MMAP_HAS_6_ARGS
+
#define __NR_exit 1
#define __NR_read 3
#define __NR_write 4
diff --git a/ldso/ldso/sh/dl-syscalls.h b/ldso/ldso/sh/dl-syscalls.h
index dc0cc6164..a97ff562c 100644
--- a/ldso/ldso/sh/dl-syscalls.h
+++ b/ldso/ldso/sh/dl-syscalls.h
@@ -3,3 +3,5 @@
extern int _dl_errno;
#define __set_errno(X) {(_dl_errno) = (X);}
#include "sys/syscall.h"
+
+#define MMAP_HAS_6_ARGS
diff --git a/ldso/ldso/sparc/dl-syscalls.h b/ldso/ldso/sparc/dl-syscalls.h
index 1ae85ed88..b1fd73eb8 100644
--- a/ldso/ldso/sparc/dl-syscalls.h
+++ b/ldso/ldso/sparc/dl-syscalls.h
@@ -6,6 +6,8 @@
* sysdeps/linux/sparc/bits/syscalls.h at some point ...
*/
+#define MMAP_HAS_6_ARGS
+
#define __NR_exit 1
#define __NR_read 3
#define __NR_write 4
diff --git a/ldso/ldso/x86_64/dl-syscalls.h b/ldso/ldso/x86_64/dl-syscalls.h
index dc0cc6164..a97ff562c 100644
--- a/ldso/ldso/x86_64/dl-syscalls.h
+++ b/ldso/ldso/x86_64/dl-syscalls.h
@@ -3,3 +3,5 @@
extern int _dl_errno;
#define __set_errno(X) {(_dl_errno) = (X);}
#include "sys/syscall.h"
+
+#define MMAP_HAS_6_ARGS