klibc for 2.5.63
PATCH 1/1 klibc for 2.5.63
Hi,
Here's the klibc addition synced up with the latest 2.5.63 kernel tree. It's the same patches that I sent last time, so I'm not going to repost them here again.
Please pull from:
bk://kernel.bkbits.net/gregkh/linux/klibc-2.5
If you have any problems or questions with them, please let me know.
thanks,
greg k-h
usr/lib/socketcommon.h | 25 usr/lib/syscommon.h | 29 Makefile | 123 init/Kconfig | 20 init/Makefile | 14 init/do_mounts.c | 12 init/main.c | 44 scripts/Makefile | 10 scripts/Makefile.build | 6 scripts/Makefile.clean | 11 scripts/Makefile.lib | 3 scripts/Makefile.user | 209 + usr/Makefile | 56 usr/gen_init_cpio.c | 97 usr/lib/CAVEATS | 51 usr/lib/MCONFIG | 88 usr/lib/Makefile | 293 + usr/lib/README | 57 usr/lib/SOCKETCALLS | 21 usr/lib/SYSCALLS | 146 usr/lib/__shared_init.c | 56 usr/lib/__signal.c | 22 usr/lib/__static_init.c | 40 usr/lib/abort.c | 19 usr/lib/alarm.c | 29 usr/lib/arch/README | 67 usr/lib/arch/alpha/MCONFIG | 17 usr/lib/arch/alpha/Makefile.inc | 93 usr/lib/arch/alpha/README-gcc | 23 usr/lib/arch/alpha/crt0.S | 21 usr/lib/arch/alpha/divide.c | 57 usr/lib/arch/alpha/include/klibc/archsetjmp.h | 24 usr/lib/arch/alpha/include/klibc/archsys.h | 53 usr/lib/arch/alpha/include/machine/asm.h | 44 usr/lib/arch/alpha/pipe.c | 28 usr/lib/arch/alpha/setjmp.S | 61 usr/lib/arch/arm/MCONFIG | 26 usr/lib/arch/arm/Makefile.inc | 31 usr/lib/arch/arm/crt0.S | 25 usr/lib/arch/arm/include/klibc/archsetjmp.h | 14 usr/lib/arch/arm/include/klibc/archsys.h | 12 usr/lib/arch/arm/setjmp-arm.S | 40 usr/lib/arch/arm/setjmp-thumb.S | 58 usr/lib/arch/cris/MCONFIG | 11 usr/lib/arch/cris/Makefile.inc | 10 usr/lib/arch/cris/include/klibc/archsys.h | 12 usr/lib/arch/i386/MCONFIG | 24 usr/lib/arch/i386/Makefile.inc | 27 usr/lib/arch/i386/crt0.S | 33 usr/lib/arch/i386/exits.S | 45 usr/lib/arch/i386/include/klibc/archsetjmp.h | 19 usr/lib/arch/i386/include/klibc/archsys.h | 96 usr/lib/arch/i386/include/klibc/diverr.h | 16 usr/lib/arch/i386/libgcc/__ashldi3.S | 29 usr/lib/arch/i386/libgcc/__ashrdi3.S | 29 usr/lib/arch/i386/libgcc/__lshrdi3.S | 29 usr/lib/arch/i386/libgcc/__muldi3.S | 34 usr/lib/arch/i386/libgcc/__negdi2.S | 21 usr/lib/arch/i386/setjmp.S | 58 usr/lib/arch/i386/socketcall.S | 38 usr/lib/arch/ia64/MCONFIG | 11 usr/lib/arch/ia64/Makefile.inc | 10 usr/lib/arch/ia64/include/klibc/archsys.h | 12 usr/lib/arch/m68k/MCONFIG | 11 usr/lib/arch/m68k/Makefile.inc | 10 usr/lib/arch/m68k/include/klibc/archsys.h | 12 usr/lib/arch/mips/MCONFIG | 18 usr/lib/arch/mips/Makefile.inc | 24 usr/lib/arch/mips/crt0.S | 25 usr/lib/arch/mips/include/klibc/archsetjmp.h | 39 usr/lib/arch/mips/include/klibc/archsys.h | 12 usr/lib/arch/mips/include/machine/asm.h | 11 usr/lib/arch/mips/include/sgidefs.h | 20 usr/lib/arch/mips/pipe.S | 16 usr/lib/arch/mips/setjmp.S | 82 usr/lib/arch/mips/vfork.S | 19 usr/lib/arch/mips64/MCONFIG | 11 usr/lib/arch/mips64/Makefile.inc | 10 usr/lib/arch/mips64/include/klibc/archsys.h | 12 usr/lib/arch/parisc/MCONFIG | 11 usr/lib/arch/parisc/Makefile.inc | 10 usr/lib/arch/parisc/include/klibc/archsys.h | 12 usr/lib/arch/ppc/MCONFIG | 11 usr/lib/arch/ppc/Makefile.inc | 15 usr/lib/arch/ppc/crt0.S | 29 usr/lib/arch/ppc/include/klibc/archsetjmp.h | 36 usr/lib/arch/ppc/include/klibc/archsys.h | 55 usr/lib/arch/ppc/setjmp.S | 35 usr/lib/arch/ppc64/MCONFIG | 11 usr/lib/arch/ppc64/Makefile.inc | 10 usr/lib/arch/ppc64/crt0.S | 38 usr/lib/arch/ppc64/include/klibc/archsys.h | 52 usr/lib/arch/s390/MCONFIG | 13 usr/lib/arch/s390/Makefile.inc | 16 usr/lib/arch/s390/crt0.S | 25 usr/lib/arch/s390/include/klibc/archsetjmp.h | 15 usr/lib/arch/s390/include/klibc/archsys.h | 41 usr/lib/arch/s390/setjmp.S | 32 usr/lib/arch/s390x/MCONFIG | 13 usr/lib/arch/s390x/Makefile.inc | 16 usr/lib/arch/s390x/crt0.S | 21 usr/lib/arch/s390x/include/klibc/archsetjmp.h | 15 usr/lib/arch/s390x/include/klibc/archsys.h | 41 usr/lib/arch/s390x/setjmp.S | 36 usr/lib/arch/sh/MCONFIG | 11 usr/lib/arch/sh/Makefile.inc | 10 usr/lib/arch/sh/include/klibc/archsys.h | 12 usr/lib/arch/sparc/MCONFIG | 18 usr/lib/arch/sparc/Makefile.inc | 44 usr/lib/arch/sparc/crt0.S | 2 usr/lib/arch/sparc/crt0i.S | 100 usr/lib/arch/sparc/divrem.m4 | 276 + usr/lib/arch/sparc/include/klibc/archsetjmp.h | 16 usr/lib/arch/sparc/include/klibc/archsys.h | 65 usr/lib/arch/sparc/include/machine/asm.h | 192 + usr/lib/arch/sparc/include/machine/frame.h | 138 usr/lib/arch/sparc/include/machine/trap.h | 141 usr/lib/arch/sparc/setjmp.S | 38 usr/lib/arch/sparc/smul.S | 160 usr/lib/arch/sparc/umul.S | 193 + usr/lib/arch/sparc64/MCONFIG | 21 usr/lib/arch/sparc64/Makefile.inc | 13 usr/lib/arch/sparc64/crt0.S | 2 usr/lib/arch/sparc64/include/klibc/archsetjmp.h | 16 usr/lib/arch/sparc64/include/klibc/archsys.h | 157 usr/lib/arch/sparc64/setjmp.S | 55 usr/lib/arch/x86_64/MCONFIG | 16 usr/lib/arch/x86_64/Makefile.inc | 16 usr/lib/arch/x86_64/crt0.S | 22 usr/lib/arch/x86_64/exits.S | 35 usr/lib/arch/x86_64/include/klibc/archsetjmp.h | 21 usr/lib/arch/x86_64/include/klibc/archsys.h | 32 usr/lib/arch/x86_64/setjmp.S | 54 usr/lib/assert.c | 13 usr/lib/atexit.c | 10 usr/lib/atexit.h | 19 usr/lib/atoi.c | 3 usr/lib/atol.c | 3 usr/lib/atoll.c | 3 usr/lib/atox.c | 14 usr/lib/brk.c | 24 usr/lib/bsd_signal.c | 11 usr/lib/calloc.c | 21 usr/lib/closelog.c | 18 usr/lib/creat.c | 12 usr/lib/ctypes.c | 281 + usr/lib/exec_l.c | 57 usr/lib/execl.c | 8 usr/lib/execle.c | 8 usr/lib/execlp.c | 8 usr/lib/execlpe.c | 8 usr/lib/execv.c | 13 usr/lib/execvp.c | 13 usr/lib/execvpe.c | 73 usr/lib/exitc.c | 36 usr/lib/fdatasync.c | 15 usr/lib/fgetc.c | 20 usr/lib/fgets.c | 33 usr/lib/fopen.c | 46 usr/lib/fork.c | 29 usr/lib/fprintf.c | 19 usr/lib/fputc.c | 14 usr/lib/fputs.c | 15 usr/lib/fread.c | 35 usr/lib/fread2.c | 13 usr/lib/fwrite.c | 35 usr/lib/fwrite2.c | 13 usr/lib/getcwd.c | 15 usr/lib/getdomainname.c | 25 usr/lib/getenv.c | 22 usr/lib/gethostname.c | 25 usr/lib/getopt.c | 74 usr/lib/getpriority.c | 25 usr/lib/globals.c | 10 usr/lib/include/alloca.h | 13 usr/lib/include/arpa/inet.h | 24 usr/lib/include/assert.h | 22 usr/lib/include/bits32/bitsize/limits.h | 14 usr/lib/include/bits32/bitsize/stddef.h | 18 usr/lib/include/bits32/bitsize/stdint.h | 34 usr/lib/include/bits32/bitsize/stdintconst.h | 18 usr/lib/include/bits32/bitsize/stdintlimits.h | 22 usr/lib/include/bits64/bitsize/limits.h | 14 usr/lib/include/bits64/bitsize/stddef.h | 13 usr/lib/include/bits64/bitsize/stdint.h | 36 usr/lib/include/bits64/bitsize/stdintconst.h | 18 usr/lib/include/bits64/bitsize/stdintlimits.h | 22 usr/lib/include/ctype.h | 117 usr/lib/include/dirent.h | 20 usr/lib/include/elf.h | 12 usr/lib/include/endian.h | 41 usr/lib/include/errno.h | 8 usr/lib/include/fcntl.h | 11 usr/lib/include/grp.h | 13 usr/lib/include/inttypes.h | 226 + usr/lib/include/klibc/compiler.h | 61 usr/lib/include/klibc/diverr.h | 16 usr/lib/include/klibc/extern.h | 14 usr/lib/include/limits.h | 40 usr/lib/include/net/if.h | 1 usr/lib/include/net/if_arp.h | 1 usr/lib/include/net/if_ether.h | 1 usr/lib/include/net/if_packet.h | 1 usr/lib/include/netinet/in.h | 29 usr/lib/include/netinet/in6.h | 10 usr/lib/include/netinet/ip.h | 13 usr/lib/include/netinet/tcp.h | 11 usr/lib/include/netinet/udp.h | 19 usr/lib/include/poll.h | 16 usr/lib/include/sched.h | 23 usr/lib/include/setjmp.h | 43 usr/lib/include/signal.h | 72 usr/lib/include/stdarg.h | 14 usr/lib/include/stddef.h | 24 usr/lib/include/stdint.h | 113 usr/lib/include/stdio.h | 109 usr/lib/include/stdlib.h | 94 usr/lib/include/string.h | 37 usr/lib/include/sys/dirent.h | 13 usr/lib/include/sys/fsuid.h | 14 usr/lib/include/sys/ioctl.h | 14 usr/lib/include/sys/klog.h | 24 usr/lib/include/sys/mman.h | 21 usr/lib/include/sys/module.h | 158 usr/lib/include/sys/mount.h | 55 usr/lib/include/sys/param.h | 11 usr/lib/include/sys/reboot.h | 25 usr/lib/include/sys/resource.h | 15 usr/lib/include/sys/select.h | 13 usr/lib/include/sys/socket.h | 50 usr/lib/include/sys/socketcalls.h | 28 usr/lib/include/sys/stat.h | 23 usr/lib/include/sys/syscall.h | 15 usr/lib/include/sys/time.h | 16 usr/lib/include/sys/times.h | 14 usr/lib/include/sys/types.h | 131 usr/lib/include/sys/uio.h | 15 usr/lib/include/sys/utime.h | 10 usr/lib/include/sys/utsname.h | 23 usr/lib/include/sys/vfs.h | 14 usr/lib/include/sys/wait.h | 19 usr/lib/include/syslog.h | 53 usr/lib/include/termios.h | 86 usr/lib/include/time.h | 14 usr/lib/include/unistd.h | 106 usr/lib/include/utime.h | 15 usr/lib/inet/inet_addr.c | 14 usr/lib/inet/inet_aton.c | 23 usr/lib/inet/inet_ntoa.c | 19 usr/lib/inet/inet_ntop.c | 52 usr/lib/inet/inet_pton.c | 74 usr/lib/interp.S | 11 usr/lib/isatty.c | 21 usr/lib/libgcc/__divdi3.c | 29 usr/lib/libgcc/__divsi3.c | 29 usr/lib/libgcc/__moddi3.c | 29 usr/lib/libgcc/__modsi3.c | 29 usr/lib/libgcc/__udivdi3.c | 13 usr/lib/libgcc/__udivmoddi4.c | 32 usr/lib/libgcc/__udivmodsi4.c | 32 usr/lib/libgcc/__udivsi3.c | 13 usr/lib/libgcc/__umoddi3.c | 16 usr/lib/libgcc/__umodsi3.c | 16 usr/lib/llseek.c | 34 usr/lib/lrand48.c | 42 usr/lib/makeerrlist.pl | 80 usr/lib/malloc.c | 192 + usr/lib/malloc.h | 51 usr/lib/memccpy.c | 23 usr/lib/memchr.c | 18 usr/lib/memcmp.c | 19 usr/lib/memcpy.c | 29 usr/lib/memmem.c | 44 usr/lib/memmove.c | 34 usr/lib/memset.c | 30 usr/lib/memswap.c | 23 usr/lib/mmap.c | 51 usr/lib/nice.c | 22 usr/lib/onexit.c | 39 usr/lib/pause.c | 21 usr/lib/perror.c | 12 usr/lib/printf.c | 19 usr/lib/pty.c | 31 usr/lib/puts.c | 13 usr/lib/qsort.c | 42 usr/lib/raise.c | 11 usr/lib/readdir.c | 66 usr/lib/realloc.c | 49 usr/lib/reboot.c | 15 usr/lib/recv.c | 11 usr/lib/sbrk.c | 23 usr/lib/seed48.c | 19 usr/lib/select.c | 9 usr/lib/send.c | 11 usr/lib/setegid.c | 10 usr/lib/setenv.c | 124 usr/lib/seteuid.c | 10 usr/lib/setpgrp.c | 10 usr/lib/setresgid.c | 29 usr/lib/setresuid.c | 30 usr/lib/sha1hash.c | 319 + usr/lib/sigaction.c | 19 usr/lib/siglist.c | 115 usr/lib/siglongjmp.c | 16 usr/lib/signal.c | 11 usr/lib/sigpending.c | 19 usr/lib/sigprocmask.c | 19 usr/lib/sigsuspend.c | 19 usr/lib/sleep.c | 20 usr/lib/snprintf.c | 16 usr/lib/socketcalls.pl | 75 usr/lib/socketcalls/socketcommon.h | 25 usr/lib/socketcommon.h | 25 usr/lib/sprintf.c | 18 usr/lib/srand48.c | 16 usr/lib/sscanf.c | 17 usr/lib/strcat.c | 11 usr/lib/strchr.c | 16 usr/lib/strcmp.c | 20 usr/lib/strcpy.c | 20 usr/lib/strdup.c | 17 usr/lib/strerror.c | 25 usr/lib/strlen.c | 14 usr/lib/strncat.c | 11 usr/lib/strncmp.c | 20 usr/lib/strncpy.c | 22 usr/lib/strntoimax.c | 13 usr/lib/strntoumax.c | 75 usr/lib/strrchr.c | 18 usr/lib/strsep.c | 21 usr/lib/strspn.c | 67 usr/lib/strstr.c | 10 usr/lib/strtoimax.c | 3 usr/lib/strtok.c | 16 usr/lib/strtol.c | 3 usr/lib/strtoll.c | 3 usr/lib/strtoul.c | 3 usr/lib/strtoull.c | 3 usr/lib/strtoumax.c | 3 usr/lib/strtox.c | 13 usr/lib/syscalls.pl | 84 usr/lib/syscalls/syscommon.h | 29 usr/lib/syscommon.h | 29 usr/lib/syslog.c | 68 usr/lib/tests/getenvtest.c | 26 usr/lib/tests/getopttest.c | 31 usr/lib/tests/hello.c | 7 usr/lib/tests/idtest.c | 14 usr/lib/tests/malloctest.c | 4145 ++++++++++++++++++++++++ usr/lib/tests/memstrtest.c | 29 usr/lib/tests/microhello.c | 9 usr/lib/tests/minihello.c | 7 usr/lib/tests/minips.c | 452 ++ usr/lib/tests/nfs_no_rpc.c | 538 +++ usr/lib/tests/setjmptest.c | 36 usr/lib/tests/testrand48.c | 19 usr/lib/tests/testvsnp.c | 115 usr/lib/time.c | 27 usr/lib/umount.c | 12 usr/lib/unsetenv.c | 40 usr/lib/usleep.c | 15 usr/lib/utime.c | 30 usr/lib/vfprintf.c | 26 usr/lib/vprintf.c | 11 usr/lib/vsnprintf.c | 433 ++ usr/lib/vsprintf.c | 11 usr/lib/vsscanf.c | 365 ++ usr/lib/wait.c | 12 usr/lib/wait3.c | 12 usr/lib/waitpid.c | 12 usr/root/Makefile | 13 usr/root/hello |binary usr/root/hello.c | 21 usr/root/init.c | 884 ++--- 374 files changed, 18962 insertions(+), 692 deletions(-)
-----
[email protected], 2003-02-24 13:04:03-08:00, [email protected]
Merge kernel.bkbits.net:/home/repos/linux-2.5
into kernel.bkbits.net:/home/gregkh/linux/klibc-2.5
Makefile | 39 ++++++++++++++++++++++++++++++++++++--- 1 files changed, 36 insertions(+), 3 deletions(-)
------
[email protected], 2003-02-22 15:21:07-08:00, [email protected]
Merge kroah.com:/home/linux/linux/BK/bleeding-2.5 into kroah.com:/home/linux/linux/BK/kai-2.5
scripts/Makefile | 1 - 1 files changed, 1 deletion(-)
------
[email protected], 2003-02-19 11:21:54-08:00, [email protected]
[PATCH] KLIBC: fix for non-i386 build
I just tried building on s390x and only needed this trivial fix. Unfortunately, 2.5.61 does not boot on s390x yet, so I could not do run-time tests.
usr/lib/socketcalls.pl | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
------
[email protected], 2003-02-19 10:39:00-08:00, [email protected]
Cset exclude: [email protected]|ChangeSet|20030217001132|22043
init/Kconfig | 10 - init/Makefile | 7 init/do_mounts.c | 6 init/main.c | 22 -- scripts/Makefile | 3 usr/Makefile | 2 usr/gen_init_cpio.c | 2 usr/root/Makefile | 5 usr/root/init.c | 442 ---------------------------------------------------- 9 files changed, 10 insertions(+), 489 deletions(-)
------
[email protected], 2003-02-19 10:37:44-08:00, [email protected]
KLIBC: fix up some type errors that were highlighted by the posix timer changes.
usr/lib/include/sys/types.h | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
------
[email protected], 2003-02-19 10:35:46-08:00, [email protected]
KLIBC: delete usr/root/hello
We don't need binaries in the kernel source tree :)
usr/root/hello |binary
1 files changed
------
[email protected], 2003-02-19 09:01:31-08:00, [email protected]
merge
Makefile | 39 ++++++++++++++++++++++++++++++++++++--- scripts/Makefile | 2 +- 2 files changed, 37 insertions(+), 4 deletions(-)
------
[email protected], 2003-02-16 18:57:52-06:00, [email protected]
Merge tp1.ruhr-uni-bochum.de:/scratch/kai/kernel/v2.5/linux-2.5 into tp1.ruhr-uni-bochum.de:/scratch/kai/kernel/v2.5/linux-2.5.klibc
Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
------
[email protected], 2003-02-16 18:11:32-06:00, [email protected]
klibc: Move mounting of the root filesystem into userspace
When selecting CONFIG_INITRAMFS, init/do_mounts.c is not compiled anymore, and it's task is taken over by a small /sbin/init running in initramfs.
However, this is a proof of concept only, the userspace code only handles mounting a local filesystem, no support for nfs / initrd / devfs yet.
init/Kconfig | 10 + init/Makefile | 7 init/do_mounts.c | 6 init/main.c | 22 ++ scripts/Makefile | 4 usr/Makefile | 2 usr/gen_init_cpio.c | 2 usr/root/Makefile | 5 usr/root/init.c | 442 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 489 insertions(+), 11 deletions(-)
------
[email protected], 2003-02-16 18:06:13-06:00, [email protected]
klibc: Silence too ambitious warnings
gcc complained about unused function parameters and things, that's just a little too much.
Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
------
[email protected], 2003-02-15 23:33:21-06:00, [email protected]
klibc: Stop on error when building the CPIO
gen_init_cpio still referenced hello in usr/hello_world, but I put it into usr/root. This is now corrected, however it also pointed out the common problem that the error code of gen_init_cpio is ignored since it's output is piped to gzip. To fix that, make the generation of the .cpio.gz a two step process.
usr/Makefile | 24 +++++++++++++++++------- usr/gen_init_cpio.c | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-)
------
[email protected], 2003-02-15 23:24:10-06:00, [email protected]
klibc: gen_init_cpio file generation fix
I found what kept initramfs from working here: While creating of initramfs_data.cpio.gz, the padding between a file header and the file contents was wrong, which can be verified by unpacking the archive by hand.
usr/gen_init_cpio.c | 1 + 1 files changed, 1 insertion(+)
------
[email protected], 2003-02-15 23:21:47-06:00, [email protected]
klibc: add file support to gen_init_cpio.c
usr/gen_init_cpio.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 90 insertions(+)
------
[email protected], 2003-02-15 23:20:13-06:00, [email protected]
klibc: Fix the "hello" example (for real)
Greg's fix used fwrite on a file descriptor obtained from open(), which only works by luck, since for klibc FILE * == fd.
Use standard C lib functions for open/close.
usr/root/hello.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
------
[email protected], 2003-02-15 23:16:53-06:00, [email protected]
klibc: Fix a compiler warning
usr/lib/sha1hash.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
------
[email protected], 2003-02-15 23:11:51-06:00, [email protected]
klibc: fix up the hello_world example
stdout doesn't go anywhere useful when spawned from the kernel :)
usr/root/hello.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-)
------
[email protected], 2003-02-15 23:09:41-06:00, [email protected]
kbuild/klibc: Integrate klibc into the build.
Basically, add a scripts/Makefile.user, which does similar things to scripts/Makefile.build, but compiles userspace for the target instead.
It's tested for a static klibc on i386, building the shared lib works, too, but is not further integrated.
This patch also adds gregkh's hello test program, which works as well.
usr/lib/socketcommon.h | 25 ---- usr/lib/syscommon.h | 29 ----- Makefile | 39 ++++++ scripts/Makefile.build | 6 - scripts/Makefile.clean | 11 + scripts/Makefile.lib | 3 scripts/Makefile.user | 209 +++++++++++++++++++++++++++++++++++++ usr/Makefile | 28 ++++ usr/lib/MCONFIG | 39 +++--- usr/lib/Makefile | 159 ++++++++++++++-------------- usr/lib/socketcalls.pl | 11 + usr/lib/socketcalls/socketcommon.h | 25 ++++ usr/lib/syscalls.pl | 12 +- usr/lib/syscalls/syscommon.h | 29 +++++ usr/root/Makefile | 3 usr/root/hello |binary usr/root/hello.c | 8 + 17 files changed, 471 insertions(+), 165 deletions(-)
------
[email protected], 2003-02-15 16:55:46-06:00, [email protected]
klibc: Merge klibc-0.77
That's just a cp -r klibc-0.77/klibc/* linux/usr/lib
Push file://home/greg/linux/BK/klibc-2.5 -> file://home/greg/linux/BK/bleed-2.5
usr/lib/CAVEATS | 51 usr/lib/MCONFIG | 49 usr/lib/Makefile | 134 usr/lib/README | 57 usr/lib/SOCKETCALLS | 21 usr/lib/SYSCALLS | 146 usr/lib/__shared_init.c | 56 usr/lib/__signal.c | 22 usr/lib/__static_init.c | 40 usr/lib/abort.c | 19 usr/lib/alarm.c | 29 usr/lib/arch/README | 67 usr/lib/arch/alpha/MCONFIG | 17 usr/lib/arch/alpha/Makefile.inc | 93 usr/lib/arch/alpha/README-gcc | 23 usr/lib/arch/alpha/crt0.S | 21 usr/lib/arch/alpha/divide.c | 57 usr/lib/arch/alpha/include/klibc/archsetjmp.h | 24 usr/lib/arch/alpha/include/klibc/archsys.h | 53 usr/lib/arch/alpha/include/machine/asm.h | 44 usr/lib/arch/alpha/pipe.c | 28 usr/lib/arch/alpha/setjmp.S | 61 usr/lib/arch/arm/MCONFIG | 26 usr/lib/arch/arm/Makefile.inc | 31 usr/lib/arch/arm/crt0.S | 25 usr/lib/arch/arm/include/klibc/archsetjmp.h | 14 usr/lib/arch/arm/include/klibc/archsys.h | 12 usr/lib/arch/arm/setjmp-arm.S | 40 usr/lib/arch/arm/setjmp-thumb.S | 58 usr/lib/arch/cris/MCONFIG | 11 usr/lib/arch/cris/Makefile.inc | 10 usr/lib/arch/cris/include/klibc/archsys.h | 12 usr/lib/arch/i386/MCONFIG | 24 usr/lib/arch/i386/Makefile.inc | 27 usr/lib/arch/i386/crt0.S | 33 usr/lib/arch/i386/exits.S | 45 usr/lib/arch/i386/include/klibc/archsetjmp.h | 19 usr/lib/arch/i386/include/klibc/archsys.h | 96 usr/lib/arch/i386/include/klibc/diverr.h | 16 usr/lib/arch/i386/libgcc/__ashldi3.S | 29 usr/lib/arch/i386/libgcc/__ashrdi3.S | 29 usr/lib/arch/i386/libgcc/__lshrdi3.S | 29 usr/lib/arch/i386/libgcc/__muldi3.S | 34 usr/lib/arch/i386/libgcc/__negdi2.S | 21 usr/lib/arch/i386/setjmp.S | 58 usr/lib/arch/i386/socketcall.S | 38 usr/lib/arch/ia64/MCONFIG | 11 usr/lib/arch/ia64/Makefile.inc | 10 usr/lib/arch/ia64/include/klibc/archsys.h | 12 usr/lib/arch/m68k/MCONFIG | 11 usr/lib/arch/m68k/Makefile.inc | 10 usr/lib/arch/m68k/include/klibc/archsys.h | 12 usr/lib/arch/mips/MCONFIG | 18 usr/lib/arch/mips/Makefile.inc | 24 usr/lib/arch/mips/crt0.S | 25 usr/lib/arch/mips/include/klibc/archsetjmp.h | 39 usr/lib/arch/mips/include/klibc/archsys.h | 12 usr/lib/arch/mips/include/machine/asm.h | 11 usr/lib/arch/mips/include/sgidefs.h | 20 usr/lib/arch/mips/pipe.S | 16 usr/lib/arch/mips/setjmp.S | 82 usr/lib/arch/mips/vfork.S | 19 usr/lib/arch/mips64/MCONFIG | 11 usr/lib/arch/mips64/Makefile.inc | 10 usr/lib/arch/mips64/include/klibc/archsys.h | 12 usr/lib/arch/parisc/MCONFIG | 11 usr/lib/arch/parisc/Makefile.inc | 10 usr/lib/arch/parisc/include/klibc/archsys.h | 12 usr/lib/arch/ppc/MCONFIG | 11 usr/lib/arch/ppc/Makefile.inc | 15 usr/lib/arch/ppc/crt0.S | 29 usr/lib/arch/ppc/include/klibc/archsetjmp.h | 36 usr/lib/arch/ppc/include/klibc/archsys.h | 55 usr/lib/arch/ppc/setjmp.S | 35 usr/lib/arch/ppc64/MCONFIG | 11 usr/lib/arch/ppc64/Makefile.inc | 10 usr/lib/arch/ppc64/crt0.S | 38 usr/lib/arch/ppc64/include/klibc/archsys.h | 52 usr/lib/arch/s390/MCONFIG | 13 usr/lib/arch/s390/Makefile.inc | 16 usr/lib/arch/s390/crt0.S | 25 usr/lib/arch/s390/include/klibc/archsetjmp.h | 15 usr/lib/arch/s390/include/klibc/archsys.h | 41 usr/lib/arch/s390/setjmp.S | 32 usr/lib/arch/s390x/MCONFIG | 13 usr/lib/arch/s390x/Makefile.inc | 16 usr/lib/arch/s390x/crt0.S | 21 usr/lib/arch/s390x/include/klibc/archsetjmp.h | 15 usr/lib/arch/s390x/include/klibc/archsys.h | 41 usr/lib/arch/s390x/setjmp.S | 36 usr/lib/arch/sh/MCONFIG | 11 usr/lib/arch/sh/Makefile.inc | 10 usr/lib/arch/sh/include/klibc/archsys.h | 12 usr/lib/arch/sparc/MCONFIG | 18 usr/lib/arch/sparc/Makefile.inc | 44 usr/lib/arch/sparc/crt0.S | 2 usr/lib/arch/sparc/crt0i.S | 100 usr/lib/arch/sparc/divrem.m4 | 276 + usr/lib/arch/sparc/include/klibc/archsetjmp.h | 16 usr/lib/arch/sparc/include/klibc/archsys.h | 65 usr/lib/arch/sparc/include/machine/asm.h | 192 + usr/lib/arch/sparc/include/machine/frame.h | 138 usr/lib/arch/sparc/include/machine/trap.h | 141 usr/lib/arch/sparc/setjmp.S | 38 usr/lib/arch/sparc/smul.S | 160 usr/lib/arch/sparc/umul.S | 193 + usr/lib/arch/sparc64/MCONFIG | 21 usr/lib/arch/sparc64/Makefile.inc | 13 usr/lib/arch/sparc64/crt0.S | 2 usr/lib/arch/sparc64/include/klibc/archsetjmp.h | 16 usr/lib/arch/sparc64/include/klibc/archsys.h | 157 usr/lib/arch/sparc64/setjmp.S | 55 usr/lib/arch/x86_64/MCONFIG | 16 usr/lib/arch/x86_64/Makefile.inc | 16 usr/lib/arch/x86_64/crt0.S | 22 usr/lib/arch/x86_64/exits.S | 35 usr/lib/arch/x86_64/include/klibc/archsetjmp.h | 21 usr/lib/arch/x86_64/include/klibc/archsys.h | 32 usr/lib/arch/x86_64/setjmp.S | 54 usr/lib/assert.c | 13 usr/lib/atexit.c | 10 usr/lib/atexit.h | 19 usr/lib/atoi.c | 3 usr/lib/atol.c | 3 usr/lib/atoll.c | 3 usr/lib/atox.c | 14 usr/lib/brk.c | 24 usr/lib/bsd_signal.c | 11 usr/lib/calloc.c | 21 usr/lib/closelog.c | 18 usr/lib/creat.c | 12 usr/lib/ctypes.c | 281 + usr/lib/exec_l.c | 57 usr/lib/execl.c | 8 usr/lib/execle.c | 8 usr/lib/execlp.c | 8 usr/lib/execlpe.c | 8 usr/lib/execv.c | 13 usr/lib/execvp.c | 13 usr/lib/execvpe.c | 73 usr/lib/exitc.c | 36 usr/lib/fdatasync.c | 15 usr/lib/fgetc.c | 20 usr/lib/fgets.c | 33 usr/lib/fopen.c | 46 usr/lib/fork.c | 29 usr/lib/fprintf.c | 19 usr/lib/fputc.c | 14 usr/lib/fputs.c | 15 usr/lib/fread.c | 35 usr/lib/fread2.c | 13 usr/lib/fwrite.c | 35 usr/lib/fwrite2.c | 13 usr/lib/getcwd.c | 15 usr/lib/getdomainname.c | 25 usr/lib/getenv.c | 22 usr/lib/gethostname.c | 25 usr/lib/getopt.c | 74 usr/lib/getpriority.c | 25 usr/lib/globals.c | 10 usr/lib/include/alloca.h | 13 usr/lib/include/arpa/inet.h | 24 usr/lib/include/assert.h | 22 usr/lib/include/bits32/bitsize/limits.h | 14 usr/lib/include/bits32/bitsize/stddef.h | 18 usr/lib/include/bits32/bitsize/stdint.h | 34 usr/lib/include/bits32/bitsize/stdintconst.h | 18 usr/lib/include/bits32/bitsize/stdintlimits.h | 22 usr/lib/include/bits64/bitsize/limits.h | 14 usr/lib/include/bits64/bitsize/stddef.h | 13 usr/lib/include/bits64/bitsize/stdint.h | 36 usr/lib/include/bits64/bitsize/stdintconst.h | 18 usr/lib/include/bits64/bitsize/stdintlimits.h | 22 usr/lib/include/ctype.h | 117 usr/lib/include/dirent.h | 20 usr/lib/include/elf.h | 12 usr/lib/include/endian.h | 41 usr/lib/include/errno.h | 8 usr/lib/include/fcntl.h | 11 usr/lib/include/grp.h | 13 usr/lib/include/inttypes.h | 226 + usr/lib/include/klibc/compiler.h | 61 usr/lib/include/klibc/diverr.h | 16 usr/lib/include/klibc/extern.h | 14 usr/lib/include/limits.h | 40 usr/lib/include/net/if.h | 1 usr/lib/include/net/if_arp.h | 1 usr/lib/include/net/if_ether.h | 1 usr/lib/include/net/if_packet.h | 1 usr/lib/include/netinet/in.h | 29 usr/lib/include/netinet/in6.h | 10 usr/lib/include/netinet/ip.h | 13 usr/lib/include/netinet/tcp.h | 11 usr/lib/include/netinet/udp.h | 19 usr/lib/include/poll.h | 16 usr/lib/include/sched.h | 23 usr/lib/include/setjmp.h | 43 usr/lib/include/signal.h | 72 usr/lib/include/stdarg.h | 14 usr/lib/include/stddef.h | 24 usr/lib/include/stdint.h | 113 usr/lib/include/stdio.h | 109 usr/lib/include/stdlib.h | 94 usr/lib/include/string.h | 37 usr/lib/include/sys/dirent.h | 13 usr/lib/include/sys/fsuid.h | 14 usr/lib/include/sys/ioctl.h | 14 usr/lib/include/sys/klog.h | 24 usr/lib/include/sys/mman.h | 21 usr/lib/include/sys/module.h | 158 usr/lib/include/sys/mount.h | 55 usr/lib/include/sys/param.h | 11 usr/lib/include/sys/reboot.h | 25 usr/lib/include/sys/resource.h | 15 usr/lib/include/sys/select.h | 13 usr/lib/include/sys/socket.h | 50 usr/lib/include/sys/socketcalls.h | 28 usr/lib/include/sys/stat.h | 23 usr/lib/include/sys/syscall.h | 15 usr/lib/include/sys/time.h | 16 usr/lib/include/sys/times.h | 14 usr/lib/include/sys/types.h | 126 usr/lib/include/sys/uio.h | 15 usr/lib/include/sys/utime.h | 10 usr/lib/include/sys/utsname.h | 23 usr/lib/include/sys/vfs.h | 14 usr/lib/include/sys/wait.h | 19 usr/lib/include/syslog.h | 53 usr/lib/include/termios.h | 86 usr/lib/include/time.h | 14 usr/lib/include/unistd.h | 106 usr/lib/include/utime.h | 15 usr/lib/inet/inet_addr.c | 14 usr/lib/inet/inet_aton.c | 23 usr/lib/inet/inet_ntoa.c | 19 usr/lib/inet/inet_ntop.c | 52 usr/lib/inet/inet_pton.c | 74 usr/lib/interp.S | 11 usr/lib/isatty.c | 21 usr/lib/libgcc/__divdi3.c | 29 usr/lib/libgcc/__divsi3.c | 29 usr/lib/libgcc/__moddi3.c | 29 usr/lib/libgcc/__modsi3.c | 29 usr/lib/libgcc/__udivdi3.c | 13 usr/lib/libgcc/__udivmoddi4.c | 32 usr/lib/libgcc/__udivmodsi4.c | 32 usr/lib/libgcc/__udivsi3.c | 13 usr/lib/libgcc/__umoddi3.c | 16 usr/lib/libgcc/__umodsi3.c | 16 usr/lib/llseek.c | 34 usr/lib/lrand48.c | 42 usr/lib/makeerrlist.pl | 80 usr/lib/malloc.c | 192 + usr/lib/malloc.h | 51 usr/lib/memccpy.c | 23 usr/lib/memchr.c | 18 usr/lib/memcmp.c | 19 usr/lib/memcpy.c | 29 usr/lib/memmem.c | 44 usr/lib/memmove.c | 34 usr/lib/memset.c | 30 usr/lib/memswap.c | 23 usr/lib/mmap.c | 51 usr/lib/nice.c | 22 usr/lib/onexit.c | 39 usr/lib/pause.c | 21 usr/lib/perror.c | 12 usr/lib/printf.c | 19 usr/lib/pty.c | 31 usr/lib/puts.c | 13 usr/lib/qsort.c | 42 usr/lib/raise.c | 11 usr/lib/readdir.c | 66 usr/lib/realloc.c | 49 usr/lib/reboot.c | 15 usr/lib/recv.c | 11 usr/lib/sbrk.c | 23 usr/lib/seed48.c | 19 usr/lib/select.c | 9 usr/lib/send.c | 11 usr/lib/setegid.c | 10 usr/lib/setenv.c | 124 usr/lib/seteuid.c | 10 usr/lib/setpgrp.c | 10 usr/lib/setresgid.c | 29 usr/lib/setresuid.c | 30 usr/lib/sha1hash.c | 317 + usr/lib/sigaction.c | 19 usr/lib/siglist.c | 115 usr/lib/siglongjmp.c | 16 usr/lib/signal.c | 11 usr/lib/sigpending.c | 19 usr/lib/sigprocmask.c | 19 usr/lib/sigsuspend.c | 19 usr/lib/sleep.c | 20 usr/lib/snprintf.c | 16 usr/lib/socketcalls.pl | 62 usr/lib/socketcommon.h | 25 usr/lib/sprintf.c | 18 usr/lib/srand48.c | 16 usr/lib/sscanf.c | 17 usr/lib/strcat.c | 11 usr/lib/strchr.c | 16 usr/lib/strcmp.c | 20 usr/lib/strcpy.c | 20 usr/lib/strdup.c | 17 usr/lib/strerror.c | 25 usr/lib/strlen.c | 14 usr/lib/strncat.c | 11 usr/lib/strncmp.c | 20 usr/lib/strncpy.c | 22 usr/lib/strntoimax.c | 13 usr/lib/strntoumax.c | 75 usr/lib/strrchr.c | 18 usr/lib/strsep.c | 21 usr/lib/strspn.c | 67 usr/lib/strstr.c | 10 usr/lib/strtoimax.c | 3 usr/lib/strtok.c | 16 usr/lib/strtol.c | 3 usr/lib/strtoll.c | 3 usr/lib/strtoul.c | 3 usr/lib/strtoull.c | 3 usr/lib/strtoumax.c | 3 usr/lib/strtox.c | 13 usr/lib/syscalls.pl | 72 usr/lib/syscommon.h | 29 usr/lib/syslog.c | 68 usr/lib/tests/getenvtest.c | 26 usr/lib/tests/getopttest.c | 31 usr/lib/tests/hello.c | 7 usr/lib/tests/idtest.c | 14 usr/lib/tests/malloctest.c | 4145 ++++++++++++++++++++++++ usr/lib/tests/memstrtest.c | 29 usr/lib/tests/microhello.c | 9 usr/lib/tests/minihello.c | 7 usr/lib/tests/minips.c | 452 ++ usr/lib/tests/nfs_no_rpc.c | 538 +++ usr/lib/tests/setjmptest.c | 36 usr/lib/tests/testrand48.c | 19 usr/lib/tests/testvsnp.c | 115 usr/lib/time.c | 27 usr/lib/umount.c | 12 usr/lib/unsetenv.c | 40 usr/lib/usleep.c | 15 usr/lib/utime.c | 30 usr/lib/vfprintf.c | 26 usr/lib/vprintf.c | 11 usr/lib/vsnprintf.c | 433 ++ usr/lib/vsprintf.c | 11 usr/lib/vsscanf.c | 365 ++ usr/lib/wait.c | 12 usr/lib/wait3.c | 12 usr/lib/waitpid.c | 12 354 files changed, 17793 insertions(+)
------
Followup to: <[email protected]> By author: Greg KH <[email protected]> In newsgroup: linux.dev.kernel
Quoted 7 lines
Hi,
Here's the klibc addition synced up with the latest 2.5.63 kernel tree. It's the same patches that I sent last time, so I'm not going to repost them here again.
Also, just to make things clear:
Greg has taken on the job of integrating klibc with the kernel, but please post klibc bug reports to the klibc mailing list at <[email protected]>.
-hpa
Signature · 3 lines
<[email protected]> at work, <[email protected]> in private! "Unix gives you enough rope to shoot yourself in the foot." Architectures needed: cris ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
Quoted 11 lines · H. Peter Anvin
Followup to: <[email protected]> By author: Greg KH <[email protected]> In newsgroup: linux.dev.kernelQuoted 7 lines
Hi,
Here's the klibc addition synced up with the latest 2.5.63 kernel tree. It's the same patches that I sent last time, so I'm not going to repost them here again.
Quoted 5 lines
Also, just to make things clear:
Greg has taken on the job of integrating klibc with the kernel, but please post klibc bug reports to the klibc mailing list at <[email protected]>.
I'm glad to see this, hopefully from time to time this will be released for general use (ie. non-bk format).
Signature · 3 lines
bill davidsen <[email protected]> CTO, TMR Associates, Inc Doing interesting things with little computers since 1979.
Quoted 4 lines · Bill Davidsen
I'm glad to see this, hopefully from time to time this will be released for general use (ie. non-bk format).
klibc standalone (not part of the kernel tree, which is what Greg is working on ***THANK YOU GREG***) is available at:
ftp://ftp.kernel.org/pub/linux/libs/klibc/
-hpa
Quoted 3 lines · H. Peter Anvin
Greg has taken on the job of integrating klibc with the kernel, but please post klibc bug reports to the klibc mailing list at <[email protected]>.
To avoid annoying warning from gcc I had to check for compatibility with -falign-* like we do in arch/i386/Makefile.check_usergcc located in top-level makefile to allow other architectures to use it later.
Also modified a few assignment to use :=.
On top of Gregh's latest bk tree.
Sam
===== Makefile 1.385 vs edited =====
Makefile +3 -0
@@ -933,4 +933,7 @@ # Usage is deprecated, because make does not see this as an invocation of make. descend =$(Q)$(MAKE) -f scripts/Makefile.build obj=$(1) $(2) +check_usergcc = $(shell if $(USERCC) $(1) -S -o /dev/null -xc /dev/null > \ + /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi) + FORCE:
===== usr/lib/arch/i386/MCONFIG 1.1 vs edited =====
usr/lib/arch/i386/MCONFIG +11 -4
@@ -13,12 +13,19 @@ # them to be cdecl # REGPARM = -mregparm=3 -DREGPARM -OPTFLAGS = $(REGPARM) -march=i386 -Os -fomit-frame-pointer \ - -malign-functions=0 -malign-jumps=0 -malign-loops=0 -BITSIZE = 32 +#check_usergcc = $(shell if $(USERCC) $(1) -S -o /dev/null -xc /dev/null > \ + /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi) + + +OPTFLAGS := $(REGPARM) -march=i386 -Os -fomit-frame-pointer +OPTFLAGS += $(call check_usergcc, \ + -falign-functions=0 -falign-jumps=0 -falign-loops=0, \ + -malign-functions=0 -malign-jumps=0 -malign-loops=0) + +BITSIZE := 32 # Extra linkflags when building the shared version of the library # This address needs to be reachable using normal inter-module # calls, and work on the memory models for this architecture # 96 MB - normal binaries start at 128 MB -SHAREDFLAGS = -Ttext 0x06000200 +SHAREDFLAGS := -Ttext 0x06000200
Quoted 8 lines · Greg KH
Hi,
Here's the klibc addition synced up with the latest 2.5.63 kernel tree. It's the same patches that I sent last time, so I'm not going to repost them here again.
Please pull from:
bk://kernel.bkbits.net/gregkh/linux/klibc-2.5
I've resynced again with your latest tree, and added a fix from Kai that solved a 'make clean' bug that could show up with klibc. Could you please pull from:
bk://kernel.bkbits.net/gregkh/linux/klibc-2.5
thanks,
greg k-h