From 46d6bbc8e2d2016ecbe851a10bb1676bd7e96274 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 16 Oct 2001 03:10:39 +0000 Subject: Revert global old mmap usage, and do it per arch --- libc/sysdeps/linux/common/syscalls.c | 5 +++-- libc/sysdeps/linux/v850/Makefile | 2 +- libc/sysdeps/linux/v850/_mmap.c | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 libc/sysdeps/linux/v850/_mmap.c (limited to 'libc/sysdeps') diff --git a/libc/sysdeps/linux/common/syscalls.c b/libc/sysdeps/linux/common/syscalls.c index 0d470db8c..b02d4864f 100644 --- a/libc/sysdeps/linux/common/syscalls.c +++ b/libc/sysdeps/linux/common/syscalls.c @@ -2,8 +2,9 @@ /* * Syscalls for uClibc * - * Copyright (C) 2000, 2001 by Lineo, inc. Written by Erik Andersen - * , + * Copyright (C) 2000 by Lineo, inc + * Copyright (C) 2001 by Erik Andersen + * Written by Erik Andersen * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License as published by diff --git a/libc/sysdeps/linux/v850/Makefile b/libc/sysdeps/linux/v850/Makefile index a48dcfd1d..4e2974551 100644 --- a/libc/sysdeps/linux/v850/Makefile +++ b/libc/sysdeps/linux/v850/Makefile @@ -18,7 +18,7 @@ CFLAGS+= -I../ -D__ASSEMBLER__ -DASM_GLOBAL_DIRECTIVE=.globl TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine) -CRT0=crt0.S +CRT0=crt0.S _mmap.c CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0)) SSRC=setjmp.S longjmp.S vfork.S diff --git a/libc/sysdeps/linux/v850/_mmap.c b/libc/sysdeps/linux/v850/_mmap.c new file mode 100644 index 000000000..a0c58253a --- /dev/null +++ b/libc/sysdeps/linux/v850/_mmap.c @@ -0,0 +1,20 @@ +/* Use old style mmap for v850 */ +#include +#include +#include + + +__ptr_t mmap(__ptr_t addr, size_t len, int prot, + int flags, int fd, __off_t offset) +{ + unsigned long buffer[6]; + + buffer[0] = (unsigned long) addr; + buffer[1] = (unsigned long) len; + buffer[2] = (unsigned long) prot; + buffer[3] = (unsigned long) flags; + buffer[4] = (unsigned long) fd; + buffer[5] = (unsigned long) offset; + return (__ptr_t) _mmap(buffer); +} + -- cgit v1.2.3