diff options
author | H. Peter Anvin <hpa@zytor.com> | 2004-06-06 10:12:50 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2004-06-06 10:12:50 +0000 |
commit | 74ad706be412c00adb8ecfc0244479ea1121b1ec (patch) | |
tree | 61ed928e46872110a278d4d696fa0380d95dec95 | |
parent | 17cd7f557ed59ca9c92f0e02148c84b16656d1ab (diff) | |
download | klibc-74ad706be412c00adb8ecfc0244479ea1121b1ec.tar.gz |
Update statusklibc-0.117
-rw-r--r-- | README | 3 | ||||
-rw-r--r-- | klibc/README | 48 | ||||
-rw-r--r-- | klibc/SOCKETCALLS | 21 | ||||
-rw-r--r-- | klibc/SYSCALLS | 153 | ||||
-rwxr-xr-x[-rw-r--r--] | klibc/arch/arm/sysstubs.pl | 0 | ||||
-rw-r--r-- | klibc/fdatasync.c | 15 | ||||
-rw-r--r-- | klibc/select.c | 9 | ||||
-rw-r--r-- | klibc/setresgid.c | 29 | ||||
-rw-r--r-- | klibc/setresuid.c | 30 |
9 files changed, 35 insertions, 273 deletions
@@ -1,4 +1,5 @@ -Please see klibc/README for build instructions. +Please see klibc/README for build instructions and for the status of +various platforms. diff --git a/klibc/README b/klibc/README index d69fa8de41b92..4ed57a3f6447e 100644 --- a/klibc/README +++ b/klibc/README @@ -1,6 +1,6 @@ This is klibc, what is intended to be a minimalistic libc subset for use with initramfs. It is deliberately written for small size, -minimal entaglement and portability, not speed. It is definitely a +minimal entaglement, and portability, not speed. It is definitely a work in progress, and a lot of things are still missing. @@ -34,20 +34,38 @@ b) If you're cross-compiling, change ARCH in the main MCONFIG file to The following is the last known status of various architectures: - Known to work: alpha arm ia64 i386 ppc s390 s390x sparc - sparc64 x86_64* - Works static, not shared: mips* arm-thumb sh* parisc - Might work: ppc64 - Need porting work: cris m68k mips64 v850 - - x86_64: requires a kernel header patch (to be created) - mips, sh: linker problem; might work with fixed linker - - Shared library support requires binutils 2.13.90.0.4 or later on - many architectures. - - Note that even the "known to work" ones likely have bugs. Please - report them if you run into them. + alpha: Needs sysstub.ph + arm-thumb: Probably OK + arm26: Not yet ported + arm: Working + cris: Not yet ported + h8300: Not yet ported + i386: Working + ia64: Needs sysstub.ph + m68k: Not yet ported + mips64: Not yet ported + mips: Needs sysstub.ph + parisc: Needs sysstub.ph + ppc64: Needs sysstub.ph + ppc: Needs sysstub.ph + s390: Needs sysstub.ph + s390x: Needs sysstub.ph + sh: Needs sysstub.ph + sparc64: sigaction() fails in ash for unknown reason + sparc: Working + v850: Not yet ported + x86-64: Working + + Shared library support requires recent binutils on many + architectures. + + "Need sysstub.ph" means the architectural changes first implemented + in klibc-0.117 has not yet been implemented; klibc-0.116 did, + however, work. "Not yet ported" means no porting work has been + done on this architecture. + + Note that even the "working" ones likely have bugs. Please report + them if you run into them. c) Type "make" and pray... diff --git a/klibc/SOCKETCALLS b/klibc/SOCKETCALLS deleted file mode 100644 index 1ab4e367a239c..0000000000000 --- a/klibc/SOCKETCALLS +++ /dev/null @@ -1,21 +0,0 @@ -# -*- fundamental -*- -# -# These are calls that are invoked via the socketcall mechanism -# -int socket(int, int, int) -int bind(int, struct sockaddr *, int) -int connect(int, struct sockaddr *, socklen_t) -int listen(int, int) -int accept(int, struct sockaddr *, socklen_t *) -int getsockname(int, struct sockaddr *, socklen_t *) -int getpeername(int, struct sockaddr *, socklen_t *) -int socketpair(int, int, int, int *) -# int send(int, const void *, size_t, unsigned int) -int sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t) -# int recv(int, void *, size_t, unsigned int) -int recvfrom(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *) -int shutdown(int, int) -int setsockopt(int, int, int, const void *, socklen_t) -int getsockopt(int, int, int, void *, socklen_t *) -int sendmsg(int, const struct msghdr *, unsigned int) -int recvmsg(int, struct msghdr *, unsigned int) diff --git a/klibc/SYSCALLS b/klibc/SYSCALLS deleted file mode 100644 index 82081201b40ea..0000000000000 --- a/klibc/SYSCALLS +++ /dev/null @@ -1,153 +0,0 @@ -# -*- fundamental -*- -# -# This is a list of system calls we invoke "directly". These -# are generated into syscall stubs in their own C files, so the -# linker can do its job properly. -# -# The full description of a line is: -# [<[!]arch,...>] type sysname[@systype][::funcname](args) -# - -# -# Process-related syscalls -# -<!mips,mips64,sparc,ia64> pid_t vfork() -<sparc> pid_t vfork@forkish() -<!alpha> pid_t getpid() -<alpha> pid_t getxpid@dual0::getpid() -int setpgid(pid_t, pid_t) -pid_t getpgid(pid_t) -<!alpha> pid_t getppid() -<alpha> pid_t getxpid@dual1::getppid() -pid_t setsid() -pid_t getsid(pid_t) -pid_t wait4(pid_t, int *, int, struct rusage *) -int execve(const char *, char * const *, char * const *) -int setpriority(int, int, int) -int sched_setscheduler(pid_t, int, const struct sched_param *) -int sched_yield() - -# -# User and group IDs -# -int setuid(uid_t) -int setgid(gid_t) -<!alpha> uid_t getuid() -<alpha> uid_t getxuid@dual0::getuid() -<!alpha> gid_t getgid() -<alpha> gid_t getxgid@dual0::getgid() -<!alpha> uid_t geteuid() -<alpha> uid_t getxuid@dual1::geteuid() -<!alpha> gid_t getegid() -<alpha> uid_t getxgid@dual1::getegid() -int getgroups(int, gid_t *) -int setgroups(size_t, const gid_t *) -int setreuid(uid_t, uid_t) -int setregid(gid_t, gid_t) -int setfsuid(uid_t) -int setfsgid(gid_t) - -# -# Filesystem-related system calls -# -int mount(const char *, const char *, const char *, unsigned long, const void *) -<!alpha,ia64> int umount2(const char *, int) -<alpha,ia64> int umount::umount2(const char *, int) -<!m68k> int pivot_root(const char *, const char *) -int sync() -int statfs(const char *, struct statfs *) -int fstatfs(int, struct statfs *) -int swapon(const char *, int) -int swapoff(const char *) - -# -# Inode-related system calls -# -int access(const char *, int) -int link(const char *, const char *) -int unlink(const char *) -int chdir(const char *) -int rename(const char *, const char *) -int mknod(const char *, mode_t, dev_t) -int chmod(const char *, mode_t) -int fchmod(int, mode_t) -int mkdir(const char *, mode_t) -int rmdir(const char *) -<!alpha,ia64,mips,mips64> int pipe(int *) -mode_t umask(mode_t) -int chroot(const char *) -int symlink(const char *, const char *) -int readlink(const char *, char *, size_t) -int stat(const char *, struct stat *) -int lstat(const char *, struct stat *) -int fstat(int, struct stat *) -int getdents(unsigned int, struct dirent *, unsigned int) -int chown(const char *, uid_t, gid_t) -int fchown(int, uid_t, gid_t) -int lchown(const char *, uid_t, gid_t) - -# -# I/O operations -# -ssize_t read(int, void *, size_t) -ssize_t write(int, const void *, size_t) -int close(int) -off_t lseek(int, off_t, int) -int dup(int) -int dup2(int, int) -int fcntl(int, int, long) -int ioctl(int, int, void *) -int flock(int, int) -int poll(struct pollfd *, nfds_t, long) -int fsync(int) -int readv(int, const struct iovec *, int) -int writev(int, const struct iovec *, int) -int ftruncate(int, off_t) - -# -# Signal operations -# -int kill(pid_t, int) -int rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t) -int rt_sigsuspend(const sigset_t *, size_t) -int rt_sigpending(sigset_t *, size_t) -int rt_sigprocmask(int, const sigset_t *, sigset_t *, size_t) -int getitimer(int, struct itimerval *) -int setitimer(int, const struct itimerval *, struct itimerval *) - -# -# Time-related system calls -# -clock_t times(struct tms *) -int gettimeofday(struct timeval *, struct timezone *) -int settimeofday(const struct timeval *, const struct timezone *) -int nanosleep(const struct timespec *, struct timespec *) - -# -# Memory -# -void * brk::__brk(void *) -int munmap(void *, size_t) -void * mremap(void *, size_t, size_t, unsigned long) -int msync(const void *, size_t, int) -int mprotect(const void *, size_t, int) - -# -# System stuff -# -int uname(struct utsname *) -int setdomainname(const char *, size_t) -int sethostname(const char *, size_t) -long init_module(void *, unsigned long, const char *) -long delete_module(const char *, unsigned int) -<!ia64> int query_module(const char *, int, void *, size_t, size_t) -int reboot::__reboot(int, int, int, void *) -int syslog::klogctl(int, char *, int) -int sysinfo(struct sysinfo *) - -# -# Low-level I/O (generally architecture-specific) -# -<i386,x86_64> int iopl(int) -<i386,x86_64> int ioperm(unsigned long, unsigned long, int) -<i386> int vm86(struct vm86_struct *) diff --git a/klibc/arch/arm/sysstubs.pl b/klibc/arch/arm/sysstubs.pl index e60694046d3fa..e60694046d3fa 100644..100755 --- a/klibc/arch/arm/sysstubs.pl +++ b/klibc/arch/arm/sysstubs.pl diff --git a/klibc/fdatasync.c b/klibc/fdatasync.c deleted file mode 100644 index 53079b09d62ee..0000000000000 --- a/klibc/fdatasync.c +++ /dev/null @@ -1,15 +0,0 @@ -/* - * fdatasync.c - * - * Some systems don't have this (alpha?) ... this is really a bug, - * but mimic using fsync() - */ - -#include <unistd.h> -#include <sys/syscall.h> - -#ifndef __NR_fdatasync -#define __NR_fdatasync __NR_fsync -#endif - -_syscall1(int,fdatasync,int,fd); diff --git a/klibc/select.c b/klibc/select.c deleted file mode 100644 index 2404bb1e64568..0000000000000 --- a/klibc/select.c +++ /dev/null @@ -1,9 +0,0 @@ -#include <unistd.h> -#include <sys/syscall.h> - -#ifdef __NR__newselect -#undef __NR_select -#define __NR_select __NR__newselect -#endif - -_syscall5(int,select,int,a0,fd_set *,a1,fd_set *,a2,fd_set *,a3,struct timeval *,a4); diff --git a/klibc/setresgid.c b/klibc/setresgid.c deleted file mode 100644 index f1a8c6b45c3b1..0000000000000 --- a/klibc/setresgid.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * setresgid.c - */ - -#include <unistd.h> -#include <sys/syscall.h> - -#ifdef __NR_setresgid - -_syscall3(int,setresgid,gid_t,a0,gid_t,a1,gid_t,a2); - -#elif defined(__NR_setresgid32) - -static inline _syscall3(int,setresgid32,gid_t,a0,gid_t,a1,gid_t,a2); - -int setresgid(gid_t a0, gid_t a1, gid_t a2) -{ - if ( sizeof(gid_t) == sizeof(uint32_t) ) { - return setresgid32(a0,a1,a2); - } else { - uint32_t x0 = (a0 == (gid_t)-1) ? (uint32_t)-1 : a0; - uint32_t x1 = (a1 == (gid_t)-1) ? (uint32_t)-1 : a1; - uint32_t x2 = (a2 == (gid_t)-1) ? (uint32_t)-1 : a2; - - return setresgid32(x0,x1,x2); - } -} - -#endif diff --git a/klibc/setresuid.c b/klibc/setresuid.c deleted file mode 100644 index a587acbae3d2b..0000000000000 --- a/klibc/setresuid.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * setresuid.c - */ - -#include <unistd.h> -#include <sys/syscall.h> - -#ifdef __NR_setresuid - -_syscall3(int,setresuid,uid_t,a0,uid_t,a1,uid_t,a2); - -#elif defined(__NR_setresuid32) - -static inline _syscall3(int,setresuid32,uid_t,a0,uid_t,a1,uid_t,a2); - -int setresuid(uid_t a0, uid_t a1, uid_t a2) -{ - if ( sizeof(uid_t) == sizeof(uint32_t) ) { - return setresuid32(a0,a1,a2); - } else { - uint32_t x0 = (a0 == (uid_t)-1) ? (uint32_t)-1 : a0; - uint32_t x1 = (a1 == (uid_t)-1) ? (uint32_t)-1 : a1; - uint32_t x2 = (a2 == (uid_t)-1) ? (uint32_t)-1 : a2; - - return setresuid32(x0,x1,x2); - } -} - -#endif - |