diff options
Diffstat (limited to 'ldso/ldso/ld_syscall.h')
-rw-r--r-- | ldso/ldso/ld_syscall.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ldso/ldso/ld_syscall.h b/ldso/ldso/ld_syscall.h index 013cc6fb7..322c618f6 100644 --- a/ldso/ldso/ld_syscall.h +++ b/ldso/ldso/ld_syscall.h @@ -17,6 +17,12 @@ static inline _syscall1(void, _dl_exit, int, status); static inline _syscall1(int, _dl_close, int, fd); +#ifdef __powerpc__ +/* PowerPC has a different calling convention for mmap(). */ +#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); +#else #define __NR__dl_mmap_real __NR_mmap static inline _syscall1(void *, _dl_mmap_real, unsigned long *, buffer); @@ -33,6 +39,8 @@ static inline void * _dl_mmap(void * addr, unsigned long size, int prot, buffer[5] = (unsigned long) offset; return (void *) _dl_mmap_real(buffer); } +#endif + #ifndef _dl_MAX_ERRNO #define _dl_MAX_ERRNO 4096 #endif |