diff -uNr dietlibc-0.27/CHANGES dietlibc-0.28/CHANGES --- dietlibc-0.27/CHANGES Thu Jul 29 12:23:47 2004 +++ dietlibc-0.28/CHANGES Fri Jan 28 17:04:54 2005 @@ -1,3 +1,42 @@ +0.28: + add tcgetsid (Yuri Kozlov) + add _udivdi3, _divdi3, _umoddi3, _moddi3 for MIPS + These are in libgcc, but libgcc is compiled PIC and we compile the + diet libc non-pic, and that is not compatible on MIPS so ld + complains. + setlocale now accepts setting the locale to "C". + several fixes from Gwenole Beauchesne, AMD64 and otherwise. + fix memory leak in regfree (thanks, Valgrind!). + add support for gcc ProPolice and stack gap (see README.security). + add ftw64 (yuck!) + #include in syscalls.s/environ.S to make sure environ is + actually large enough (Enrico Scholz) + add waitpid wrapper around wait4 for arm-linux (Avinash Bhatia) + make res_mkquery reject invalid domains (label>64, name>255) (Nikola Vladov) + make res_query return TRY_AGAIN instead of NO_DATA if no answer was + received (Nikola Vladov) + fix PT_READ_U in sys/trace.h (John K. Hohm) + Olaf: added mmap64 wrapper (arm,mips,sparc,...) + work around new kernel rt signal semantics (need to set restorer function) + Olaf: + - libdl + gcc 3.4 resulted in a SIGSEGV because local names were + dynamically resolved.... + - Also fixed a bug in the symbol resolver + - fixing the mmap64 stuff & arm/dyn_syscalls had no mmap2 (Gerrit Pape) + tzfile parser fix (John K. Hohm) + ppc64 fixes (Gwenole Beauchesne) + add sigisemptyset, sigandset and sigorset (John K. Hohm) + minor additions to make gdb 6.3 happy (John K. Hohm) + ld.so support for gdb (John K. Hohm) + implement nice(2) via setpriority() if there is no nice syscall + support libm.so (John K. Hohm) + hack rpc/xdr.h to work with gcc 4 (Andreas Jochens via Gerrit Pape) + make dyn didn't work for !WANT_FULL_RESOLV_CONF (Sampo Kellomaki) + #undef __i686 in i386/PIC.h (George Sawinski) + fix timegm bug (found by Nikola Vladov) + add sys/swap.h (George Sawinski) + Olaf: dynamic x86_64 support (libdl relocator and dyn_syscalls) + 0.27: change DNS routines to look for ip6.arpa instead of ip6.int WANT_FREAD_OPTIMIZATION was broken on sockets (Johannes Stezenbach) diff -uNr dietlibc-0.27/CVS/Entries dietlibc-0.28/CVS/Entries --- dietlibc-0.27/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/CVS/Entries Mon Jan 31 18:53:07 2005 @@ -0,0 +1,36 @@ +/.cvsignore/1.11/Tue Aug 19 21:30:01 2003// +/AUTHOR/1.2/Wed Aug 1 17:42:46 2001// +/BUGS/1.1/Tue Jan 9 17:57:37 2001// +/CAVEAT/1.1/Tue Jan 9 17:57:37 2001// +/CHANGES/1.546/Fri Jan 28 16:04:54 2005// +/COPYING/1.2/Fri Jun 15 22:32:51 2001// +/FAQ/1.26/Fri Dec 17 18:47:58 2004// +/Makefile/1.160/Sat Jan 29 02:39:07 2005// +/PORTING/1.6/Wed Aug 7 01:21:50 2002// +/README/1.7/Mon Feb 18 22:44:35 2002// +/README.security/1.1/Sat Sep 11 12:37:57 2004// +/SECURITY/1.2/Fri Oct 4 19:38:45 2002// +/THANKS/1.11/Fri Dec 5 14:50:49 2003// +/TODO/1.73/Fri Oct 1 10:09:11 2004// +/binshstr.h/1.1/Mon Sep 10 13:17:48 2001// +/diet.1/1.5/Wed Aug 21 22:15:01 2002// +/diet.c/1.60/Fri Dec 17 18:47:58 2004// +/dietdirent.h/1.2/Wed Jul 3 20:33:37 2002// +/dietdns.h/1.1/Wed Oct 10 01:41:02 2001// +/dietfeatures.h/1.57/Fri Dec 17 19:14:49 2004// +/dieticonv.h/1.4/Mon Dec 1 17:42:12 2003// +/dietlibm.h/1.1/Mon Nov 18 01:16:51 2002// +/dietstdio.h/1.27/Tue Nov 11 18:27:41 2003// +/dietstring.h/1.1/Sun Dec 21 12:06:36 2003// +/dietuglyweaks.h/1.6/Thu Apr 29 14:37:25 2004// +/dietwarning.h/1.1/Fri Feb 9 23:48:47 2001// +/dyn_start.c/1.9/Tue Nov 30 22:35:14 2004// +/dyn_stop.c/1.5/Sat Aug 23 16:12:47 2003// +/findcflags.sh/1.5/Wed May 21 11:40:02 2003// +/linuxnet.h/1.1/Sat Jun 16 17:49:29 2001// +/longlong.h/1.1/Thu Aug 12 12:51:36 2004// +/parselib.h/1.4/Tue Apr 8 16:41:27 2003// +/syscalls.h/1.12/Fri Oct 10 13:37:34 2003// +/t.c/1.210/Sat Sep 11 12:37:57 2004// +/threadsafe.sh/1.2/Mon May 3 19:03:45 2004// +D diff -uNr dietlibc-0.27/CVS/Entries.Log dietlibc-0.28/CVS/Entries.Log --- dietlibc-0.27/CVS/Entries.Log Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/CVS/Entries.Log Mon Jan 31 18:53:10 2005 @@ -0,0 +1,40 @@ +A D/alpha//// +A D/arm//// +A D/contrib//// +A D/dynlinker//// +A D/examples//// +A D/i386//// +A D/ia64//// +A D/include//// +A D/lib//// +A D/libcompat//// +A D/libcruft//// +A D/libcrypt//// +A D/libdl//// +A D/liblatin1//// +A D/libm//// +A D/libpthread//// +A D/libregex//// +A D/librpc//// +A D/libshell//// +A D/libstdio//// +A D/libugly//// +A D/libutf8//// +A D/mips//// +A D/mipsel//// +A D/parisc//// +A D/pending//// +A D/ppc//// +A D/ppc64//// +A D/profiling//// +A D/s390//// +A D/s390x//// +A D/sparc//// +A D/sparc64//// +A D/syscalls.c//// +A D/syscalls.s//// +A D/test//// +A D/x86_64//// +R D/syscalls.c//// +R D/pending//// +R D/libutf8//// diff -uNr dietlibc-0.27/CVS/Repository dietlibc-0.28/CVS/Repository --- dietlibc-0.27/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/CVS/Repository Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +dietlibc diff -uNr dietlibc-0.27/CVS/Root dietlibc-0.28/CVS/Root --- dietlibc-0.27/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/CVS/Root Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/FAQ dietlibc-0.28/FAQ --- dietlibc-0.27/FAQ Mon Jul 12 14:04:43 2004 +++ dietlibc-0.28/FAQ Fri Dec 17 19:47:58 2004 @@ -268,3 +268,39 @@ Edit dietfeatures.h, remove the WANT_SYSENTER #define, and then recompile the diet libc and your program. Oh, and bug the user mode linux people about this, it's their fault! ;) + + +Q: dietlibc.a does not look so small to me! It's almost 600k! +A: Use size(1) to find the real size, like this: + + $ ls -l bin-i386/dietlibc.a + -rw-r--r-- 1 leitner users 597204 Nov 30 16:36 bin-i386/dietlibc.a + $ size --totals bin-i386/dietlibc.a + text data bss dec hex filename + 62 4 0 66 42 unified.o (ex bin-i386/dietlibc.a) + [...] + 100 0 0 100 64 stackgap.o (ex bin-i386/dietlibc.a) + 73908 1163 9298 84369 14991 (TOTALS) + + "text" is the code in the library, "data" is the variables, "bss" are + the constants (string constants, mostly). So there are really only + 70k code in the whole library, and you will probably only use a small + part of it in your code. + + +Q: I get an error message at link time, that "main" can not be found. +A: Disable WANT_STACKGAP in dietfeautres.h or try upgrading your binutils. + + +Q: I want to have a gcc that uses the diet libc by default. +A: You will have to edit the "specs" file from gcc then. John K. Hohm + sent these lines to use gcc with the dynamic diet libc (make dyn and + make sure you have WANT_DYNAMIC in dietfeatures.h): + + *endfile: + %{shared:dyn_dstop.o%s}%{!shared:%{static:dyn_stop.o%s}%{!static:dyn_dstop.o%s}} + + *startfile: + %{shared:dyn_so_start.o%s}%{!shared:%{static:start.o%s dyn_start.o%s}%{!static:dstart.o%s dyn_dstart.o%s}} + + diff -uNr dietlibc-0.27/Makefile dietlibc-0.28/Makefile --- dietlibc-0.27/Makefile Tue May 11 02:07:27 2004 +++ dietlibc-0.28/Makefile Sat Jan 29 03:39:07 2005 @@ -200,7 +200,7 @@ $(CROSS)ar cru $@ $(LIBMATHOBJ) $(OBJDIR)/libdietc.so: $(OBJDIR)/dietlibc.a - $(CROSS)ld -whole-archive -shared -o $@ $^ + LD_RUN_PATH= $(CROSS)ld -whole-archive -shared -o $@ $^ dyn: dyn_lib @@ -211,7 +211,7 @@ dyn_lib: $(PICODIR) $(PICODIR)/libc.so $(PICODIR)/dstart.o \ $(PICODIR)/dyn_so_start.o $(PICODIR)/dyn_start.o $(PICODIR)/dyn_stop.o \ $(PICODIR)/libpthread.so $(PICODIR)/libdl.so $(PICODIR)/libcompat.so \ - $(PICODIR)/diet-dyn $(PICODIR)/diet-dyn-i + $(PICODIR)/libm.so $(PICODIR)/diet-dyn $(PICODIR)/diet-dyn-i $(PICODIR)/%.o: %.S $(ARCH)/syscalls.h $(CROSS)$(CC) -I. -isystem include $(CFLAGS) -fPIC -D__DYN_LIB -c $< -o $@ @@ -243,21 +243,26 @@ DYN_LIBCOMPAT_OBJS = $(patsubst $(OBJDIR)/%.o,$(PICODIR)/%.o,$(LIBCOMPATOBJ)) +DYN_LIBMATH_OBJS = $(patsubst $(OBJDIR)/%.o,$(PICODIR)/%.o,$(LIBMATHOBJ)) + $(PICODIR)/libc.so: $(PICODIR) $(DYN_LIBC_OBJ) - $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBC_OBJ) -lgcc -Wl,-soname=libc.so + LD_RUN_PATH= $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBC_OBJ) -lgcc -Wl,-soname=libc.so $(PICODIR)/libpthread.so: $(DYN_PTHREAD_OBJS) dietfeatures.h - $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_PTHREAD_OBJS) -L$(PICODIR) -lc -Wl,-soname=libpthread.so + LD_RUN_PATH= $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_PTHREAD_OBJS) -L$(PICODIR) -lc -Wl,-soname=libpthread.so $(PICODIR)/libdl.so: libdl/_dl_main.c dietfeatures.h - $(CROSS)$(CC) -D__OD_CLEAN_ROOM -DNODIETREF -fPIC -nostdlib -shared -o $@ $(CFLAGS) -I. -isystem include libdl/_dl_main.c -Wl,-soname=libdl.so + LD_RUN_PATH= $(CROSS)$(CC) -D__OD_CLEAN_ROOM -DNODIETREF -fPIC -nostdlib -shared -Bsymbolic -Wl,-Bsymbolic \ + -o $@ $(CFLAGS) -I. -isystem include libdl/_dl_main.c -Wl,-soname=libdl.so #$(PICODIR)/libdl.so: $(DYN_LIBDL_OBJS) dietfeatures.h # $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBDL_OBJS) -L$(PICODIR) -ldietc -Wl,-soname=libdl.so $(PICODIR)/libcompat.so: $(DYN_LIBCOMPAT_OBJS) dietfeatures.h - $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBCOMPAT_OBJS) -L$(PICODIR) -lc -Wl,-soname=libcompat.so + LD_RUN_PATH= $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBCOMPAT_OBJS) -L$(PICODIR) -lc -Wl,-soname=libcompat.so +$(PICODIR)/libm.so: $(DYN_LIBMATH_OBJS) dietfeatures.h + LD_RUN_PATH= $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBMATH_OBJS) -L$(PICODIR) -lc -Wl,-soname=libm.so $(SYSCALLOBJ): syscalls.h @@ -277,11 +282,11 @@ $(CROSS)strip -R .comment -R .note $@ $(PICODIR)/diet-dyn: $(PICODIR)/start.o $(PICODIR)/dyn_start.o diet.c - $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(HOME)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(HOME)/$(PICODIR)/libdl.so + LD_RUN_PATH= $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(HOME)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(HOME)/$(PICODIR)/libdl.so $(CROSS)strip -R .command -R .note $@ $(PICODIR)/diet-dyn-i: $(PICODIR)/start.o $(PICODIR)/dyn_start.o diet.c - $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(prefix)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(ILIBDIR)/libdl.so -DINSTALLVERSION + LD_RUN_PATH= $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(prefix)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(ILIBDIR)/libdl.so -DINSTALLVERSION $(CROSS)strip -R .command -R .note $@ $(OBJDIR)/djb: $(OBJDIR)/compile $(OBJDIR)/load @@ -332,6 +337,7 @@ -$(INSTALL) $(PICODIR)/libpthread.so $(DESTDIR)$(ILIBDIR)/libpthread.so -$(INSTALL) $(PICODIR)/libdl.so $(DESTDIR)$(ILIBDIR)/libdl.so -$(INSTALL) $(PICODIR)/libcompat.so $(DESTDIR)$(ILIBDIR)/libcompat.so + -$(INSTALL) $(PICODIR)/libm.so $(DESTDIR)$(ILIBDIR)/libm.so -$(INSTALL) $(PICODIR)/dyn_start.o $(DESTDIR)$(ILIBDIR)/dyn_dstart.o -$(INSTALL) $(PICODIR)/dyn_stop.o $(DESTDIR)$(ILIBDIR)/dyn_dstop.o -$(INSTALL) $(PICODIR)/dstart.o $(PICODIR)/dyn_so_start.o $(DESTDIR)$(ILIBDIR) @@ -388,6 +394,9 @@ # these depend on dietfeatures.h for fast string routines strcasecmp.o $(OBJDIR)/strcat.o $(OBJDIR)/strchr.o $(OBJDIR)/strcmp.o $(OBJDIR)/strcpy.o $(OBJDIR)/strlen.o $(OBJDIR)/strncasecmp.o $(OBJDIR)/strncat.o $(OBJDIR)/strrchr.o: dietfeatures.h +# this depends on dietfeatures.h for WANT_NON_COMPLIANT_STRNCAT +$(OBJDIR)/strncpy.o: dietfeatures.h + # these depend on dietfeatures.h for /proc $(OBJDIR)/ttyname.o $(OBJDIR)/sysconf_cpus.o: dietfeatures.h @@ -398,7 +407,7 @@ $(LIBSTDIOOBJ): dietfeatures.h include/stdio.h dietstdio.h # these depend on dietfeatures.h for WANT_FULL_RESOLV_CONF -$(OBJDIR)/dnscruft.o $(OBJDIR)/dnscruft2.o: dietfeatures.h +$(OBJDIR)/dnscruft.o $(OBJDIR)/dnscruft2.o $(OBJDIR)/res_search.o $(OBJDIR)/res_query.o: dietfeatures.h # these depend on dietfeatures.h for WANT_THREAD_SAFE and errno $(LIBRPCOBJ) $(OBJDIR)/logging.o $(OBJDIR)/alloc.o $(OBJDIR)/cfsetospeed.o $(OBJDIR)/cfsetispeed.o \ diff -uNr dietlibc-0.27/README.security dietlibc-0.28/README.security --- dietlibc-0.27/README.security Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/README.security Sat Sep 11 14:37:57 2004 @@ -0,0 +1,30 @@ +The diet libc is not especially focused on providing a secure +environment, but where it is possible to do something, we try to do it. + + 1. WANT_STACKGAP in dietfeatures.h + This will randomize the stack layout slightly. The real memory + cost is about one page of real memory. The code size increase is + about 100 bytes, 86 for i386. The benefit is that buffer overflow + exploits are harder because the address of the buffer fluctuates. + + 2. WANT_CRYPT_MD5 in dietfeatures.h + This will enable MD5 style passwords in crypt(3). The standard + Unix password mechanism is DES based and thus insecure by today's + standards. Adding MD5 makes the code larger by some 5k. + + 3. WANT_NON_COMPLIANT_STRNCAT in dietfeatures.h + strncat and strncpy are very user unfriendly. They copy zero + terminated strings, and you can give them a limit on how much to + copy, but they will not make sure the result is zero terminated, + which most programmers would expect who are not familiar with the + API. So, in the diet libc you can set this #define in + dietfeatures.h to get the expected behaviour. Since the fix for + the normal behaviour usually is to write \0 over the last byte of + the buffer, this does not hurt usually (but is not standards + compliant). + + 4. printf does not support %n. + %n in printf is the attack vector for format string + vulnerabilities. Almost nobody uses it anyway (except some part of + the gcc build process, apparently). + diff -uNr dietlibc-0.27/TODO dietlibc-0.28/TODO --- dietlibc-0.27/TODO Thu Oct 16 12:02:57 2003 +++ dietlibc-0.28/TODO Fri Oct 1 12:09:11 2004 @@ -24,6 +24,7 @@ - regular expressions standards compliance; test suite from AT&T - fgetpwent (needed for cvm) - investigate putting some libgcc symbols in dietlibc.so for gcc<3 + - wordexp, wordfree (might as well write a /bin/sh then) implement AI_V4MAPPED in getaddrinfo (not in man page, only susv3) diff -uNr dietlibc-0.27/alpha/CVS/Entries dietlibc-0.28/alpha/CVS/Entries --- dietlibc-0.27/alpha/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/alpha/CVS/Entries Mon Jan 31 18:53:07 2005 @@ -0,0 +1,61 @@ +/Makefile.add/1.14/Mon Nov 18 01:29:35 2002// +/__alarm.c/1.1/Thu Oct 24 10:18:41 2002// +/__longjmp.S/1.4/Mon Sep 16 11:17:01 2002// +/__pause.c/1.1/Fri Feb 27 22:19:51 2004// +/__testandset.S/1.4/Wed Feb 19 20:16:01 2003// +/__time.c/1.3/Mon Apr 9 15:39:23 2001// +/accept.S/1.2/Tue Jan 30 14:46:52 2001// +/bind.S/1.1/Tue Jan 9 17:57:38 2001// +/clone.S/1.2/Sat Jun 16 20:51:43 2001// +/connect.S/1.2/Tue Jan 30 14:46:52 2001// +/divl.S/1.1/Thu Mar 8 14:58:41 2001// +/divq.S/1.1/Tue Jan 9 17:57:38 2001// +/errlist.S/1.1/Mon Jan 13 15:16:28 2003// +/getegid.S/1.1/Tue Jan 9 17:57:38 2001// +/geteuid.S/1.1/Tue Jan 9 17:57:38 2001// +/getgid.S/1.1/Tue Jan 9 17:57:38 2001// +/getpeername.S/1.1/Tue Jan 9 17:57:38 2001// +/getpid.S/1.1/Tue Jan 9 17:57:38 2001// +/getppid.S/1.1/Tue Jan 9 17:57:38 2001// +/getsockname.S/1.1/Tue Jan 9 17:57:38 2001// +/getsockopt.S/1.1/Tue Jan 9 17:57:38 2001// +/getuid.S/1.1/Tue Jan 9 17:57:38 2001// +/listen.S/1.1/Tue Jan 9 17:57:38 2001// +/lseek64.S/1.1/Mon Nov 12 14:47:01 2001// +/msgctl.S/1.1/Thu May 10 11:33:07 2001// +/msgget.S/1.1/Thu May 10 11:33:07 2001// +/msgrcv.S/1.1/Thu May 10 11:33:07 2001// +/msgsnd.S/1.1/Thu May 10 11:33:07 2001// +/n_sigprocmask.S/1.1/Mon Jul 23 19:36:33 2001// +/pipe.S/1.1/Tue Jan 9 17:57:38 2001// +/recv.S/1.2/Tue Jan 30 14:46:52 2001// +/recvfrom.S/1.2/Tue Jan 30 14:46:52 2001// +/recvmsg.S/1.1/Sun May 6 00:07:29 2001// +/reml.S/1.1/Thu Mar 8 14:58:41 2001// +/remq.S/1.1/Thu Mar 8 14:58:41 2001// +/semctl.S/1.1/Sun Mar 4 19:36:45 2001// +/semget.S/1.1/Sun Mar 4 19:36:45 2001// +/semop.S/1.1/Sun Mar 4 19:36:45 2001// +/send.S/1.2/Tue Jan 30 14:46:52 2001// +/sendmsg.S/1.1/Sun May 6 00:07:29 2001// +/sendto.S/1.2/Tue Jan 30 14:46:52 2001// +/seteuid.c/1.2/Mon Mar 19 20:13:22 2001// +/setjmp.S/1.4/Mon Sep 16 11:17:01 2002// +/setsockopt.S/1.1/Tue Jan 9 17:57:38 2001// +/shmat.S/1.1/Sun Mar 4 19:36:45 2001// +/shmctl.S/1.1/Sun Mar 4 19:36:45 2001// +/shmdt.S/1.1/Sun Mar 4 19:36:45 2001// +/shmget.S/1.1/Sun Mar 4 19:36:45 2001// +/shutdown.S/1.1/Mon Mar 12 03:16:26 2001// +/sigaction.c/1.4/Mon Mar 3 12:18:24 2003// +/socket.S/1.1/Tue Jan 9 17:57:38 2001// +/socketcall.S/1.1/Tue Jan 9 17:57:38 2001// +/socketpair.S/1.1/Fri May 11 15:52:09 2001// +/start.S/1.5/Sat Sep 11 12:37:57 2004// +/strlen.c/1.1/Tue Jan 9 17:57:38 2001// +/syscalls.h/1.2/Sun Nov 24 15:23:02 2002// +/time.S/1.6/Mon Apr 9 15:39:23 2001// +/unified.S/1.5/Mon Jan 21 15:55:18 2002// +/utime.S/1.1/Tue Jan 9 17:57:38 2001// +/waitpid.S/1.2/Tue Jan 30 14:46:52 2001// +D diff -uNr dietlibc-0.27/alpha/CVS/Repository dietlibc-0.28/alpha/CVS/Repository --- dietlibc-0.27/alpha/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/alpha/CVS/Repository Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +dietlibc/alpha diff -uNr dietlibc-0.27/alpha/CVS/Root dietlibc-0.28/alpha/CVS/Root --- dietlibc-0.27/alpha/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/alpha/CVS/Root Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/alpha/start.S dietlibc-0.28/alpha/start.S --- dietlibc-0.27/alpha/start.S Thu Sep 12 12:33:48 2002 +++ dietlibc-0.28/alpha/start.S Sat Sep 11 14:37:57 2004 @@ -27,7 +27,11 @@ mov $0, $19 /* mov v0(dynload) to a3 */ jsr $26, dyn_start #else +#ifdef WANT_STACKGAP + jsr $26, stackgap +#else jsr $26, main #endif +#endif mov $0, $16 jsr $26, exit /* YES, CALL! for threads and atexit ! (+4 byte) */ diff -uNr dietlibc-0.27/arm/CVS/Entries dietlibc-0.28/arm/CVS/Entries --- dietlibc-0.27/arm/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/arm/CVS/Entries Mon Jan 31 18:53:07 2005 @@ -0,0 +1,17 @@ +/Makefile.add/1.7/Thu May 9 01:05:10 2002// +/__longjmp.S/1.3/Mon Jul 2 16:06:48 2001// +/__testandset.S/1.1/Fri Mar 9 19:30:52 2001// +/clone.S/1.6/Thu Feb 28 16:27:02 2002// +/dyn_syscalls.S/1.26/Mon Dec 13 10:21:31 2004// +/mcount.S/1.1/Thu May 9 03:50:17 2002// +/md5asm.S/1.5/Fri Mar 8 10:56:15 2002// +/mmap.S/1.6/Mon Feb 18 19:57:39 2002// +/select.S/1.1/Mon Oct 15 21:07:45 2001// +/setjmp.S/1.3/Mon Jul 2 16:06:48 2001// +/start.S/1.9/Sat Sep 11 12:37:57 2004// +/strcpy.S/1.1/Mon Mar 4 12:16:52 2002// +/strlen.S/1.3/Mon Sep 23 16:20:09 2002// +/syscalls.h/1.9/Thu Nov 6 13:00:51 2003// +/unified.S/1.14/Thu Feb 28 16:13:20 2002// +/waitpid.S/1.2/Tue Nov 30 16:26:20 2004// +D diff -uNr dietlibc-0.27/arm/CVS/Repository dietlibc-0.28/arm/CVS/Repository --- dietlibc-0.27/arm/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/arm/CVS/Repository Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +dietlibc/arm diff -uNr dietlibc-0.27/arm/CVS/Root dietlibc-0.28/arm/CVS/Root --- dietlibc-0.27/arm/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/arm/CVS/Root Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/arm/dyn_syscalls.S dietlibc-0.28/arm/dyn_syscalls.S --- dietlibc-0.27/arm/dyn_syscalls.S Mon Jun 14 18:13:24 2004 +++ dietlibc-0.28/arm/dyn_syscalls.S Mon Dec 13 11:21:31 2004 @@ -91,6 +91,7 @@ #include "../syscalls.s/mknod.S" #include "../syscalls.s/mlock.S" #include "../syscalls.s/mlockall.S" +#include "../syscalls.s/mmap2.S" #include "../syscalls.s/mount.S" #include "../syscalls.s/mprotect.S" #include "../syscalls.s/mremap.S" diff -uNr dietlibc-0.27/arm/start.S dietlibc-0.28/arm/start.S --- dietlibc-0.27/arm/start.S Thu May 9 03:05:10 2002 +++ dietlibc-0.28/arm/start.S Sat Sep 11 14:37:57 2004 @@ -39,8 +39,12 @@ #ifdef WANT_DYNAMIC bl _dyn_start #else +#ifdef WANT_STACKGAP + bl stackgap +#else bl main #endif +#endif @ @ The exit status from main() is already in r0. diff -uNr dietlibc-0.27/arm/waitpid.S dietlibc-0.28/arm/waitpid.S --- dietlibc-0.27/arm/waitpid.S Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/arm/waitpid.S Tue Nov 30 17:26:20 2004 @@ -0,0 +1,11 @@ +.text +.align 2 +.weak waitpid +.type waitpid, %function +waitpid: +.global __libc_waitpid +.type __libc_waitpid, %function +__libc_waitpid: + mov r3, #0 + b wait4 + .size waitpid, .-waitpid diff -uNr dietlibc-0.27/contrib/CVS/Entries dietlibc-0.28/contrib/CVS/Entries --- dietlibc-0.27/contrib/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/contrib/CVS/Entries Mon Jan 31 18:53:07 2005 @@ -0,0 +1,10 @@ +/Makefile.dyn/1.1/Mon Sep 17 16:42:26 2001// +/bcd.c/1.1/Tue Aug 19 23:07:38 2003// +/debug-realloc.c/1.2/Tue Apr 23 22:04:58 2002// +/debug-realloc.txt/1.1/Tue Apr 23 22:02:27 2002// +/dietlibc.spec/1.1/Fri Mar 9 19:35:41 2001// +/dprof.c/1.1/Sun Apr 7 19:44:56 2002// +/elftrunc.c/1.9/Fri Oct 31 15:00:43 2003// +/memchr.c/1.1/Fri Mar 26 23:28:13 2004// +/static.pl/1.2/Mon Jun 18 20:53:34 2001// +D diff -uNr dietlibc-0.27/contrib/CVS/Repository dietlibc-0.28/contrib/CVS/Repository --- dietlibc-0.27/contrib/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/contrib/CVS/Repository Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +dietlibc/contrib diff -uNr dietlibc-0.27/contrib/CVS/Root dietlibc-0.28/contrib/CVS/Root --- dietlibc-0.27/contrib/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/contrib/CVS/Root Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/diet.c dietlibc-0.28/diet.c --- dietlibc-0.27/diet.c Thu Jul 29 12:40:21 2004 +++ dietlibc-0.28/diet.c Fri Dec 17 19:47:58 2004 @@ -34,6 +34,7 @@ "alpha","-Os","-fomit-frame-pointer",0, "arm","-Os","-fomit-frame-pointer",0, "mips","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0, + "mipsel","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0, "ppc","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, "ppc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, "s390","-Os","-fomit-frame-pointer",0, @@ -314,7 +315,9 @@ if (strlen(tmp)+strlen(cc)<900) { strcpy(manglebuf,tmp); strcat(manglebuf,"/.diet/"); - strcat(manglebuf,cc); + tmp=strrchr(cc,'/'); + if (tmp) ++tmp; else tmp=cc; + strcat(manglebuf,tmp); if ((fd=open(manglebuf,O_RDONLY))>=0) { int len=read(fd,manglebuf,1023); if (len>0) { diff -uNr dietlibc-0.27/dietfeatures.h dietlibc-0.28/dietfeatures.h --- dietlibc-0.27/dietfeatures.h Mon Jan 19 17:47:23 2004 +++ dietlibc-0.28/dietfeatures.h Fri Dec 17 20:14:49 2004 @@ -28,6 +28,9 @@ /* make the startcode, etc. dynamic aware ({con,de}structors) */ /* #define WANT_DYNAMIC */ +/* GDB support in the dynamic linker */ +#define WANT_LD_SO_GDB_SUPPORT + /* do you want smaller or faster string routines? */ /* #define WANT_FASTER_STRING_ROUTINES */ @@ -35,9 +38,6 @@ * string */ /* #define WANT_FULL_POSIX_COMPAT */ -/* read the comment in lib/strncat.c for an explanation */ -/* #define WANT_NON_COMPLIANT_STRNCAT */ - /* on i386, Linux has an alternate syscall method since 2002/12/16 */ /* on my Athlon XP, it is twice as fast, but it's only in kernel 2.5 */ /* 20040118: enabling this breaks User Mode Linux! It's their fault. */ @@ -85,12 +85,20 @@ * See http://www.fefe.de/ipv6pnpdns.html */ // #define WANT_IPV6_PLUGPLAY_DNS -/* dy you want that malloc(0) return a pointer to a "zero-length" object +/* do you want that malloc(0) return a pointer to a "zero-length" object * that is realloc-able; means realloc(..,size) gives a NEW object (like a * call to malloc(size)). * WARNING: this violates C99 */ /* #define WANT_MALLOC_ZERO */ +/* This enables a stack gap. Basically, the start code does not run + * main but stackgap, which then does alloca(random()) and calls main. + * The effect is that buffer overflow exploits will no longer be able to + * know the address of the buffer. Cost: 62 bytes code on x86. */ +/* WARNING: this appears to break with some binutils versions. Works + * for me with binutils 2.15. The symptom is an error message that + * `main' can not be found. */ +#define WANT_STACKGAP /* stop uncommenting here ;-) */ #ifndef WANT_FASTER_STRING_ROUTINES diff -uNr dietlibc-0.27/dyn_start.c dietlibc-0.28/dyn_start.c --- dietlibc-0.27/dyn_start.c Mon Feb 25 17:00:49 2002 +++ dietlibc-0.28/dyn_start.c Tue Nov 30 23:35:14 2004 @@ -23,6 +23,10 @@ __do_global_dtors_aux(); } +#ifdef WANT_STACKGAP +int stackgap(int argc,char* argv[],char* envp[]); +#endif + #ifndef __DYN_LIB_SHARED /* pre main, post _start */ int _dyn_start(int argc, char **argv, char **envp, structor dl_init); @@ -34,7 +38,11 @@ if (dl_init) atexit(dl_init); _init(); atexit(_fini); +#ifdef WANT_STACKGAP + return stackgap(argc, argv, envp); +#else return main(argc, argv, envp); +#endif } #endif #endif diff -uNr dietlibc-0.27/dynlinker/CVS/Entries dietlibc-0.28/dynlinker/CVS/Entries --- dietlibc-0.27/dynlinker/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/dynlinker/CVS/Entries Mon Jan 31 18:53:07 2005 @@ -0,0 +1,5 @@ +/Makefile/1.7/Thu Apr 18 14:51:51 2002// +/README/1.6/Fri Sep 13 14:37:21 2002// +/ldso_start.S/1.2/Mon Jul 9 19:49:52 2001// +/ldso_test.c/1.13/Mon Sep 16 17:50:29 2002// +D diff -uNr dietlibc-0.27/dynlinker/CVS/Repository dietlibc-0.28/dynlinker/CVS/Repository --- dietlibc-0.27/dynlinker/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/dynlinker/CVS/Repository Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +dietlibc/dynlinker diff -uNr dietlibc-0.27/dynlinker/CVS/Root dietlibc-0.28/dynlinker/CVS/Root --- dietlibc-0.27/dynlinker/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/dynlinker/CVS/Root Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/examples/CVS/Entries dietlibc-0.28/examples/CVS/Entries --- dietlibc-0.27/examples/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/examples/CVS/Entries Mon Jan 31 18:53:07 2005 @@ -0,0 +1,3 @@ +/Makefile/1.2/Fri May 11 11:57:10 2001// +/sln.c/1.1/Tue Jan 9 17:57:39 2001// +D diff -uNr dietlibc-0.27/examples/CVS/Repository dietlibc-0.28/examples/CVS/Repository --- dietlibc-0.27/examples/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/examples/CVS/Repository Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +dietlibc/examples diff -uNr dietlibc-0.27/examples/CVS/Root dietlibc-0.28/examples/CVS/Root --- dietlibc-0.27/examples/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/examples/CVS/Root Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/i386/CVS/Entries dietlibc-0.28/i386/CVS/Entries --- dietlibc-0.27/i386/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/i386/CVS/Entries Mon Jan 31 18:53:08 2005 @@ -0,0 +1,105 @@ +/Makefile.add/1.29/Fri Dec 17 19:22:11 2004// +/PIC.h/1.4/Fri Jan 21 17:47:36 2005// +/__half.S/1.1/Fri Jul 27 14:39:18 2001// +/__longjmp.S/1.3/Mon Jul 2 16:06:48 2001// +/__restore_rt.S/1.1/Mon Dec 6 21:26:24 2004// +/__ten.S/1.2/Fri Jul 27 14:45:58 2001// +/__testandset.S/1.2/Mon Oct 29 15:09:33 2001// +/accept.S/1.1/Tue Aug 27 13:55:31 2002// +/acos.S/1.2/Fri Oct 4 20:39:42 2002// +/acosh.S/1.1/Tue Jul 31 22:13:35 2001// +/asin.S/1.2/Fri Oct 4 20:39:42 2002// +/asinh.S/1.1/Tue Jul 31 22:13:35 2001// +/atan.S/1.2/Fri Oct 4 20:39:42 2002// +/atan2.S/1.2/Sun Mar 30 19:19:52 2003// +/atanh.S/1.1/Tue Jul 31 22:13:35 2001// +/atol.S/1.6/Mon Jun 23 14:39:13 2003// +/atoll.S/1.1/Thu Jul 26 15:20:36 2001// +/bind.S/1.1/Tue Aug 27 13:55:31 2002// +/cbrt.S/1.1/Mon Aug 6 13:10:58 2001// +/ceil.S/1.5/Fri Dec 17 19:22:11 2004// +/clone.S/1.9/Thu Aug 8 16:59:07 2002// +/connect.S/1.1/Tue Aug 27 13:55:31 2002// +/copysign.S/1.3/Fri Jun 20 22:33:07 2003// +/cos.S/1.6/Thu Jan 2 14:04:42 2003// +/cosh.S/1.3/Fri Dec 17 19:22:11 2004// +/dyn_syscalls.S/1.36/Fri Jan 28 16:04:54 2005// +/exp.S/1.5/Fri Dec 17 19:22:11 2004// +/exp10.S/1.2/Mon Jul 30 13:52:55 2001// +/exp2.S/1.1/Wed Jul 18 00:20:09 2001// +/expm1.S/1.2/Thu Jul 19 16:07:10 2001// +/fabs.S/1.2/Sun Mar 30 19:19:53 2003// +/ffs.S/1.1/Wed Aug 20 00:44:40 2003// +/ffsl.S/1.1/Wed Aug 20 00:44:40 2003// +/ffsll.S/1.1/Wed Aug 20 00:44:40 2003// +/floor.S/1.5/Fri Dec 17 19:22:11 2004// +/fmod.S/1.3/Mon Sep 22 17:48:56 2003// +/getenv.S/1.4/Fri Sep 13 22:33:01 2002// +/getpeername.S/1.1/Tue Aug 27 13:55:31 2002// +/getsockname.S/1.1/Tue Aug 27 13:55:31 2002// +/getsockopt.S/1.1/Tue Aug 27 13:55:31 2002// +/htonl.S/1.1/Tue Jul 31 22:13:35 2001// +/htons.S/1.1/Tue Jul 31 22:13:35 2001// +/hypot.S/1.3/Sun Mar 30 19:19:53 2003// +/ilogb.S/1.1/Mon Jul 30 13:53:14 2001// +/ipow.S/1.1/Mon Jul 30 13:45:17 2001// +/isleap.S/1.2/Mon Jul 30 13:34:41 2001// +/ldexp.S/1.2/Sun Dec 15 19:49:56 2002// +/libm2.S/1.8/Fri Dec 17 19:22:11 2004// +/listen.S/1.1/Tue Aug 27 13:55:31 2002// +/log.S/1.3/Fri Oct 4 20:39:42 2002// +/log10.S/1.2/Sun Mar 30 19:19:53 2003// +/log1p.S/1.2/Sun Mar 30 19:19:53 2003// +/log2.S/1.1/Wed Jul 18 00:20:09 2001// +/ltostr.S/1.1/Sun Oct 27 16:23:35 2002// +/mcount.S/1.2/Fri Sep 13 22:33:01 2002// +/md5asm.S/1.6/Mon Oct 8 17:57:02 2001// +/memccpy.S/1.5/Wed Oct 15 15:32:09 2003// +/memchr.S/1.4/Tue Feb 18 20:57:26 2003// +/memcmp.S/1.3/Wed Oct 15 15:32:09 2003// +/memcpy.S/1.2/Thu Aug 23 14:11:42 2001// +/memset.S/1.1/Thu Aug 23 14:11:42 2001// +/mmap.S/1.5/Wed Nov 27 10:50:13 2002// +/mmap64.S/1.3/Wed Jan 8 16:03:03 2003// +/poly.S/1.1/Mon Jul 30 13:59:22 2001// +/pow.S/1.5/Fri Dec 17 19:22:11 2004// +/recv.S/1.1/Tue Aug 27 13:55:31 2002// +/recvfrom.S/1.1/Tue Aug 27 13:55:31 2002// +/recvmsg.S/1.1/Tue Aug 27 13:55:31 2002// +/rint.S/1.2/Fri Oct 4 20:39:42 2002// +/select.S/1.2/Tue Jan 30 14:46:53 2001// +/send.S/1.1/Tue Aug 27 13:55:31 2002// +/sendmsg.S/1.1/Tue Aug 27 13:55:31 2002// +/sendto.S/1.1/Tue Aug 27 13:55:31 2002// +/setjmp.S/1.6/Fri Nov 15 15:39:17 2002// +/setsockopt.S/1.1/Tue Aug 27 13:55:31 2002// +/shutdown.S/1.1/Tue Aug 27 13:55:31 2002// +/sigaction.c/1.1/Mon Dec 6 21:26:24 2004// +/sin.S/1.5/Thu Jan 2 14:04:42 2003// +/sincos.S/1.3/Fri Dec 17 19:22:11 2004// +/sinh.S/1.3/Fri Dec 17 19:22:11 2004// +/sleep.S/1.3/Mon Feb 25 16:00:50 2002// +/socket.S/1.1/Tue Aug 27 13:55:31 2002// +/socketcall.S/1.3/Fri Sep 13 22:33:01 2002// +/socketpair.S/1.1/Tue Aug 27 13:55:31 2002// +/sqrt.S/1.3/Fri Oct 4 20:39:42 2002// +/sqrtl.S/1.1/Mon Sep 3 13:09:29 2001// +/start.S/1.12/Sat Sep 11 12:37:57 2004// +/stpcpy.S/1.4/Mon Jun 23 14:39:13 2003// +/strcasecmp.S/1.3/Thu Apr 29 11:10:39 2004// +/strcat.S/1.3/Mon Jun 23 14:39:13 2003// +/strchr.S/1.5/Mon Oct 29 15:09:33 2001// +/strcmp.S/1.7/Mon Oct 29 15:09:33 2001// +/strcpy.S/1.2/Thu Aug 23 16:39:18 2001// +/strlen.S/1.2/Thu Feb 21 22:53:43 2002// +/strncmp.S/1.5/Wed Oct 15 15:32:09 2003// +/strncpy.S/1.6/Sat Sep 11 12:37:57 2004// +/strrchr.S/1.3/Mon Oct 13 14:39:23 2003// +/syscalls.h/1.11/Thu Apr 29 14:37:25 2004// +/tan.S/1.6/Fri Dec 17 19:22:11 2004// +/tanh.S/1.3/Fri Dec 17 19:22:11 2004// +/unified.S/1.19/Thu Jan 15 17:35:43 2004// +/usleep.S/1.4/Mon Feb 25 16:00:50 2002// +/vfork.S/1.2/Thu Apr 29 14:37:25 2004// +/write12.S/1.3/Mon Feb 25 16:00:50 2002// +D diff -uNr dietlibc-0.27/i386/CVS/Repository dietlibc-0.28/i386/CVS/Repository --- dietlibc-0.27/i386/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/i386/CVS/Repository Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +dietlibc/i386 diff -uNr dietlibc-0.27/i386/CVS/Root dietlibc-0.28/i386/CVS/Root --- dietlibc-0.27/i386/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/i386/CVS/Root Mon Jan 31 18:53:07 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/i386/Makefile.add dietlibc-0.28/i386/Makefile.add --- dietlibc-0.27/i386/Makefile.add Sun Mar 30 21:19:52 2003 +++ dietlibc-0.28/i386/Makefile.add Fri Dec 17 20:22:11 2004 @@ -1,7 +1,8 @@ M:=$(shell ./findcflags.sh $(CC)) -LIBOBJ+=$(OBJDIR)/__ten.o $(OBJDIR)/md5asm.o $(OBJDIR)/mmap64.o -LIBMATH+=acos.o asin.o atan.o ceil.o cos.o exp.o exp10.o exp2.o expm1.o fabs.o floor.o hypot.o log.o log2.o log10.o sin.o sqrt.o copysign.o sincos.o __half.o ldexp.o pow.o ilogb.o cbrt.o log1p.o sqrtl.o fmod.o libm2.o atan2.o tan.o +LIBOBJ+=$(OBJDIR)/__ten.o $(OBJDIR)/md5asm.o $(OBJDIR)/__restore_rt.o +LIBMATH+=acos.o asin.o atan.o ceil.o cos.o exp.o exp10.o exp2.o expm1.o fabs.o floor.o hypot.o log.o log2.o log10.o sin.o sqrt.o copysign.o sincos.o __half.o ldexp.o ilogb.o cbrt.o log1p.o fmod.o libm2.o atan2.o tan.o +LIBMATH:=$(filter-out acosh.o asinh.o atanh.o cbrt.o copysign.o exp10.o exp2.o expm1.o ilogb.o log2.o,$(LIBMATH)) #CFLAGS+=-march=i386 -Os -fomit-frame-pointer -malign-functions=0 -malign-jumps=0 -malign-loops=0 -mpreferred-stack-boundary=2 CFLAGS+=$(M) VPATH:=i386:syscalls.s:$(VPATH) diff -uNr dietlibc-0.27/i386/PIC.h dietlibc-0.28/i386/PIC.h --- dietlibc-0.27/i386/PIC.h Thu Apr 29 16:37:25 2004 +++ dietlibc-0.28/i386/PIC.h Fri Jan 21 18:47:36 2005 @@ -2,6 +2,8 @@ #define __I386_PIC_H__ #ifdef __DYN_LIB +#undef __i686 + #if 1 /* don't trash the athlon return stack */ #if (__GNUC__ >= 3) // FIXME: how do I check for the binutils version ? diff -uNr dietlibc-0.27/i386/__restore_rt.S dietlibc-0.28/i386/__restore_rt.S --- dietlibc-0.27/i386/__restore_rt.S Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/i386/__restore_rt.S Mon Dec 6 22:26:24 2004 @@ -0,0 +1,12 @@ +#include "syscalls.h" +.text +.type __restore_rt,@function +.global __restore_rt + +__restore_rt: + popl %eax + mov $__NR_sigreturn,%eax + int $0x80 + +.Lend: +.size __restore_rt,..Lend-__restore_rt diff -uNr dietlibc-0.27/i386/ceil.S dietlibc-0.28/i386/ceil.S --- dietlibc-0.27/i386/ceil.S Sun Aug 24 22:49:05 2003 +++ dietlibc-0.28/i386/ceil.S Fri Dec 17 20:22:11 2004 @@ -1,3 +1,5 @@ +#include "PIC.h" + .text .global ceilf,ceil,ceill,__flcetr @@ -9,12 +11,12 @@ ceilf: flds 4(%esp) movb $0x08,%ah - jmp __flcetr + jmp .Lflcetr ceill: fldt 4(%esp) movb $0x08,%ah - jmp __flcetr + jmp .Lflcetr ceil: fldl 4(%esp) @@ -22,7 +24,10 @@ # Wspolny kod dla funkcji floor, ceil i trunc # W ah maska bitow 11 i 10 rejestru sterowania koprocesora +#ifndef __DYN_LIB __flcetr: +#endif +.Lflcetr: xorl %ecx,%ecx # wyzerowanie rejestru movb %ah,%ch # i utworzenie maski w cx pushl %eax # krotsze niz subl $4,%esp @@ -37,6 +42,12 @@ popl %eax # i polozenia stosu ret +#ifdef __DYN_LIB +__flcetr: + PIC_RESTORE + jmp .Lflcetr +#endif + .Lende: .size ceil,.Lende-ceil .size ceill,.Lende-ceill diff -uNr dietlibc-0.27/i386/cosh.S dietlibc-0.28/i386/cosh.S --- dietlibc-0.27/i386/cosh.S Sun Mar 30 21:19:53 2003 +++ dietlibc-0.28/i386/cosh.S Fri Dec 17 20:22:11 2004 @@ -1,3 +1,5 @@ +#include "PIC.h" + .text .global coshf,cosh,coshl @@ -12,7 +14,14 @@ fldl2e fmull 4(%esp) fincosh: +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + call __finexp@PLT + PIC_RESTORE +#else call __finexp +#endif fld1 fdiv %st(1),%st(0) # st(0)=1/exp(x), st(1)=exp(x) faddp %st,%st(1) @@ -29,6 +38,6 @@ jmp fincosh .Lende: -.size cosh,.ende-cosh -.size coshf,.ende-coshf -.size coshl,.ende-coshl +.size cosh,.Lende-cosh +.size coshf,.Lende-coshf +.size coshl,.Lende-coshl diff -uNr dietlibc-0.27/i386/dyn_syscalls.S dietlibc-0.28/i386/dyn_syscalls.S --- dietlibc-0.27/i386/dyn_syscalls.S Mon Jun 14 18:13:24 2004 +++ dietlibc-0.28/i386/dyn_syscalls.S Fri Jan 28 17:04:54 2005 @@ -293,26 +293,26 @@ #undef __socketcall /* oh what a kludge! */ #define socketcall .Lsocketcall -#include "../i386/send.S" -#include "../i386/recv.S" -#include "../i386/socket.S" -#include "../i386/accept.S" -#include "../i386/shutdown.S" -#include "../i386/socketpair.S" -#include "../i386/setsockopt.S" -#include "../i386/sendto.S" -#include "../i386/sendmsg.S" -#include "../i386/recvmsg.S" -#include "../i386/recvfrom.S" -#include "../i386/listen.S" -#include "../i386/getsockopt.S" -#include "../i386/getsockname.S" -#include "../i386/getpeername.S" -#include "../i386/connect.S" -#include "../i386/bind.S" +#include "send.S" +#include "recv.S" +#include "socket.S" +#include "accept.S" +#include "shutdown.S" +#include "socketpair.S" +#include "setsockopt.S" +#include "sendto.S" +#include "sendmsg.S" +#include "recvmsg.S" +#include "recvfrom.S" +#include "listen.S" +#include "getsockopt.S" +#include "getsockname.S" +#include "getpeername.S" +#include "connect.S" +#include "bind.S" #undef socketcall .Lsocketcall: -#include "../i386/socketcall.S" +#include "socketcall.S" #define __PIC__ #undef __socketcall diff -uNr dietlibc-0.27/i386/exp.S dietlibc-0.28/i386/exp.S --- dietlibc-0.27/i386/exp.S Tue Oct 8 22:47:45 2002 +++ dietlibc-0.28/i386/exp.S Fri Dec 17 20:22:11 2004 @@ -1,3 +1,5 @@ +#include "PIC.h" + .text .global expf,exp,expl,__finexp @@ -8,16 +10,19 @@ expf: fldl2e fmuls 4(%esp) - jmp __finexp + jmp .Lfinexp expl: fldl2e fldt 4(%esp) fmulp - jmp __finexp + jmp .Lfinexp exp: fldl2e fmull 4(%esp) +#ifndef __DYN_LIB __finexp: +#endif +.Lfinexp: fst %st(1) frndint fst %st(2) @@ -28,6 +33,12 @@ fscale ret +#ifdef __DYN_LIB +__finexp: + PIC_RESTORE + jmp .Lfinexp +#endif + .Lende: .size exp,.Lende-exp .size expl,.Lende-expl diff -uNr dietlibc-0.27/i386/floor.S dietlibc-0.28/i386/floor.S --- dietlibc-0.27/i386/floor.S Thu Feb 27 18:20:26 2003 +++ dietlibc-0.28/i386/floor.S Fri Dec 17 20:22:11 2004 @@ -1,3 +1,5 @@ +#include "PIC.h" + .text .global floorf,floor,floorl @@ -8,17 +10,35 @@ floorf: flds 4(%esp) movb $0x04,%ah +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __flcetr@PLT +#else jmp __flcetr +#endif floor: fldl 4(%esp) movb $0x04,%ah +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __flcetr@PLT +#else jmp __flcetr +#endif floorl: fldt 4(%esp) movb $0x04,%ah +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __flcetr@PLT +#else jmp __flcetr +#endif .Lende: .size floor,.Lende-floor diff -uNr dietlibc-0.27/i386/libm2.S dietlibc-0.28/i386/libm2.S --- dietlibc-0.27/i386/libm2.S Sun Mar 30 21:19:53 2003 +++ dietlibc-0.28/i386/libm2.S Fri Dec 17 20:22:11 2004 @@ -1,3 +1,5 @@ +#include "PIC.h" + .text #d.half: # .long 0x3f000000 # 1/2 @@ -37,7 +39,13 @@ # x^y; st(0)=x, st(1)=y (x > 0) finpow: fyl2x +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __finexp@PLT +#else jmp __finexp +#endif .global exp2f,exp2,exp2l .type exp2f,@function @@ -45,13 +53,31 @@ .type exp2l,@function exp2f: flds 4(%esp) +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __finexp@PLT +#else jmp __finexp +#endif exp2: fldl 4(%esp) +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __finexp@PLT +#else jmp __finexp +#endif exp2l: fldt 4(%esp) +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __finexp@PLT +#else jmp __finexp +#endif .global exp10f,exp10,exp10l #,pow10f,pow10,pow10l .type exp10f,@function @@ -64,18 +90,36 @@ #pow10f: fldl2t fmuls 4(%esp) +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __finexp@PLT +#else jmp __finexp +#endif exp10: #pow10: fldl2t fmull 4(%esp) +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __finexp@PLT +#else jmp __finexp +#endif exp10l: #pow10l: fldl2t fldt 4(%esp) fmulp +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __finexp@PLT +#else jmp __finexp +#endif # exp(x)-1 .global expm1f,expm1,expm1l @@ -106,7 +150,14 @@ jc 1f f2xm1 ret +#ifdef __DYN_LIB +1: PIC_SAVE + PIC_INIT + call __finexp@PLT + PIC_RESTORE +#else 1: call __finexp +#endif fld1 fsubrp ret @@ -307,17 +358,35 @@ truncf: flds 4(%esp) movb $0x0c,%ah +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __flcetr@PLT +#else jmp __flcetr +#endif trunc: fldl 4(%esp) movb $0x0c,%ah +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __flcetr@PLT +#else jmp __flcetr +#endif truncl: fldt 4(%esp) movb $0x0c,%ah +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __flcetr@PLT +#else jmp __flcetr +#endif .global frexpf,frexp,frexpl .type frexpf,@function diff -uNr dietlibc-0.27/i386/pow.S dietlibc-0.28/i386/pow.S --- dietlibc-0.27/i386/pow.S Tue Oct 8 22:47:45 2002 +++ dietlibc-0.28/i386/pow.S Fri Dec 17 20:22:11 2004 @@ -1,3 +1,5 @@ +#include "PIC.h" + .text .global pow .type pow,@function @@ -59,7 +61,13 @@ 1: ret .Lfinpow: fyl2x +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + jmp __finexp@PLT +#else jmp __finexp +#endif .Lende: .size pow,.Lende-pow diff -uNr dietlibc-0.27/i386/sigaction.c dietlibc-0.28/i386/sigaction.c --- dietlibc-0.27/i386/sigaction.c Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/i386/sigaction.c Mon Dec 6 22:26:24 2004 @@ -0,0 +1,41 @@ +#include +#include +#include "i386/syscalls.h" + +int __rt_sigaction(int signum, const struct sigaction *act, struct sigaction *oldact, long nr); + +void __restore_rt(void); + +#define RESTORE(name, syscall) \ +asm \ + ( \ + ".text\n" \ + " .align 8\n" \ + "__" #name ":\n" \ + " popl %eax\n" \ + " movl $" #syscall ", %eax\n" \ + " int $0x80" \ + ); + +//RESTORE (restore_rt, __NR_rt_sigreturn) +//RESTORE (restore, __NR_sigreturn) + +extern void restore_rt (void) asm ("__restore_rt"); +extern void restore (void) asm ("__restore"); + +int __libc_sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); +int __libc_sigaction(int signum, const struct sigaction *act, struct sigaction *oldact) { + struct sigaction *newact = (struct sigaction *)act; + if (act) { + newact = alloca(sizeof(*newact)); + newact->sa_handler = act->sa_handler; + newact->sa_flags = act->sa_flags | SA_RESTORER; + newact->sa_restorer = __restore_rt; + newact->sa_mask = act->sa_mask; + } + return __rt_sigaction(signum, newact, oldact, _NSIG/8); +} + +int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact) +__attribute__((weak,alias("__libc_sigaction"))); + diff -uNr dietlibc-0.27/i386/sincos.S dietlibc-0.28/i386/sincos.S --- dietlibc-0.27/i386/sincos.S Sun Mar 30 21:19:53 2003 +++ dietlibc-0.28/i386/sincos.S Fri Dec 17 20:22:11 2004 @@ -1,3 +1,5 @@ +#include "PIC.h" + .text .global sincosf,sincos,sincosl @@ -8,7 +10,14 @@ sincosf: flds 4(%esp) +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + call __fmod2pi@PLT + PIC_RESTORE +#else call __fmod2pi +#endif movl 12(%esp),%eax movl 8(%esp),%ecx fsincos @@ -17,7 +26,14 @@ ret sincos: fldl 4(%esp) +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + call __fmod2pi@PLT + PIC_RESTORE +#else call __fmod2pi +#endif movl 16(%esp),%eax movl 12(%esp),%ecx fsincos @@ -26,7 +42,14 @@ ret sincosl: fldt 4(%esp) +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + call __fmod2pi@PLT + PIC_RESTORE +#else call __fmod2pi +#endif movl 20(%esp),%eax movl 16(%esp),%ecx fsincos diff -uNr dietlibc-0.27/i386/sinh.S dietlibc-0.28/i386/sinh.S --- dietlibc-0.27/i386/sinh.S Sun Mar 30 21:19:53 2003 +++ dietlibc-0.28/i386/sinh.S Fri Dec 17 20:22:11 2004 @@ -1,3 +1,4 @@ +#include "PIC.h" .text @@ -13,7 +14,14 @@ fldl2e fmull 4(%esp) finsinh: +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + call __finexp@PLT + PIC_RESTORE +#else call __finexp +#endif fld1 fdiv %st(1),%st(0) # st(0)=1/exp(x), st(1)=exp(x) fsubrp %st(0),%st(1) @@ -30,6 +38,6 @@ jmp finsinh .Lende: -.size sinh,.ende-sinh -.size sinhf,.ende-sinhf -.size sinhl,.ende-sinhl +.size sinh,.Lende-sinh +.size sinhf,.Lende-sinhf +.size sinhl,.Lende-sinhl diff -uNr dietlibc-0.27/i386/start.S dietlibc-0.28/i386/start.S --- dietlibc-0.27/i386/start.S Mon Apr 14 14:44:53 2003 +++ dietlibc-0.28/i386/start.S Sat Sep 11 14:37:57 2004 @@ -54,8 +54,12 @@ #ifdef WANT_DYNAMIC call _dyn_start #else +#ifdef WANT_STACKGAP + call stackgap +#else call main #endif +#endif #ifdef PROFILING pushl %eax diff -uNr dietlibc-0.27/i386/strncpy.S dietlibc-0.28/i386/strncpy.S --- dietlibc-0.27/i386/strncpy.S Mon Jun 23 16:39:13 2003 +++ dietlibc-0.28/i386/strncpy.S Sat Sep 11 14:37:57 2004 @@ -27,7 +27,11 @@ cld .Lloop: dec %ecx +#ifdef WANT_NON_COMPLIANT_STRNCAT + jz .Lout +#else js .Lout +#endif lodsb stosb or %al, %al @@ -36,6 +40,9 @@ repnz stosb #endif .Lout: +#ifdef WANT_NON_COMPLIANT_STRNCAT + movb $0,(%edi) +#endif movl %edx, %eax popl %edi popl %esi diff -uNr dietlibc-0.27/i386/tan.S dietlibc-0.28/i386/tan.S --- dietlibc-0.27/i386/tan.S Sun Mar 30 21:19:53 2003 +++ dietlibc-0.28/i386/tan.S Fri Dec 17 20:22:11 2004 @@ -1,3 +1,5 @@ +#include "PIC.h" + .text .global tanf,tan,tanl @@ -10,7 +12,14 @@ tan: fldl 4(%esp) __tan: +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + call __fmod2pi@PLT + PIC_RESTORE +#else call __fmod2pi +#endif fsincos fdivrp ret diff -uNr dietlibc-0.27/i386/tanh.S dietlibc-0.28/i386/tanh.S --- dietlibc-0.27/i386/tanh.S Sun Mar 30 21:19:53 2003 +++ dietlibc-0.28/i386/tanh.S Fri Dec 17 20:22:11 2004 @@ -1,3 +1,5 @@ +#include "PIC.h" + .text .global tanhf,tanh,tanhl @@ -7,13 +9,19 @@ tanhf: fldl2e fmuls 4(%esp) - call __finexp jmp fintanh tanh: fldl2e fmull 4(%esp) - call __finexp fintanh: +#ifdef __DYN_LIB + PIC_SAVE + PIC_INIT + call __finexp@PLT + PIC_RESTORE +#else + call __finexp +#endif fld1 fdiv %st(1),%st # st(0)=1/exp(x), st(1)=exp(x) fst %st(2) # st(2)=1/exp(x) @@ -27,10 +35,9 @@ fldl2e fldt 4(%esp) fmulp - call __finexp jmp fintanh .Lende: -.size tanh,.ende-tanh -.size tanhf,.ende-tanhf -.size tanhl,.ende-tanhl +.size tanh,.Lende-tanh +.size tanhf,.Lende-tanhf +.size tanhl,.Lende-tanhl diff -uNr dietlibc-0.27/ia64/CVS/Entries dietlibc-0.28/ia64/CVS/Entries --- dietlibc-0.27/ia64/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/ia64/CVS/Entries Mon Jan 31 18:53:08 2005 @@ -0,0 +1,45 @@ +/Makefile.add/1.5/Wed Nov 27 13:13:37 2002// +/README/1.1/Mon May 13 15:55:50 2002// +/__alarm.c/1.1/Wed Nov 27 13:13:53 2002// +/__longjmp.S/1.1/Mon May 13 15:55:50 2002// +/__testandset.S/1.1/Mon May 13 15:55:50 2002// +/__time.c/1.1/Sat Nov 9 17:51:18 2002// +/__waitpid.c/1.1/Sat Nov 9 18:10:23 2002// +/accept.S/1.1/Wed Jul 3 20:33:37 2002// +/bind.S/1.1/Wed Jul 3 20:33:37 2002// +/clone.S/1.1/Mon May 13 15:55:50 2002// +/connect.S/1.1/Wed Jul 3 20:33:37 2002// +/fork.S/1.2/Fri Oct 10 13:37:34 2003// +/getpeername.S/1.1/Wed Jul 3 20:33:37 2002// +/getsockname.S/1.1/Wed Jul 3 20:33:37 2002// +/getsockopt.S/1.1/Wed Jul 3 20:33:37 2002// +/listen.S/1.1/Wed Jul 3 20:33:37 2002// +/msgctl.S/1.1/Sat Jan 4 22:21:47 2003// +/msgget.S/1.1/Sat Jan 4 22:21:47 2003// +/msgrcv.S/1.1/Sat Jan 4 22:21:47 2003// +/msgsnd.S/1.1/Sat Jan 4 22:21:47 2003// +/pipe.S/1.2/Tue Nov 4 12:20:44 2003// +/recv.S/1.1/Wed Jul 3 20:33:37 2002// +/recvfrom.S/1.1/Wed Jul 3 20:33:37 2002// +/recvmsg.S/1.1/Wed Jul 3 20:33:37 2002// +/semctl.S/1.1/Sat Jan 4 22:21:47 2003// +/semget.S/1.1/Sat Jan 4 22:21:47 2003// +/semop.S/1.1/Sat Jan 4 22:21:47 2003// +/send.S/1.1/Wed Jul 3 20:33:37 2002// +/sendmsg.S/1.1/Wed Jul 3 20:33:37 2002// +/sendto.S/1.1/Wed Jul 3 20:33:37 2002// +/setjmp.S/1.1/Mon May 13 15:55:50 2002// +/setsockopt.S/1.1/Wed Jul 3 20:33:37 2002// +/shmat.S/1.1/Sat Jan 4 22:21:47 2003// +/shmctl.S/1.1/Sat Jan 4 22:21:47 2003// +/shmdt.S/1.1/Sat Jan 4 22:21:47 2003// +/shmget.S/1.1/Sat Jan 4 22:21:47 2003// +/shutdown.S/1.1/Wed Jul 3 20:33:37 2002// +/socket.S/1.1/Wed Jul 3 20:33:37 2002// +/socketpair.S/1.1/Wed Jul 3 20:33:37 2002// +/start.S/1.6/Sat Sep 11 12:37:57 2004// +/syscalls.h/1.5/Fri Oct 10 13:37:34 2003// +/unified.S/1.2/Wed Jul 24 12:47:33 2002// +/utime.S/1.1/Sat Nov 9 17:44:47 2002// +/vfork.S/1.1/Sat Nov 9 17:44:47 2002// +D diff -uNr dietlibc-0.27/ia64/CVS/Repository dietlibc-0.28/ia64/CVS/Repository --- dietlibc-0.27/ia64/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/ia64/CVS/Repository Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +dietlibc/ia64 diff -uNr dietlibc-0.27/ia64/CVS/Root dietlibc-0.28/ia64/CVS/Root --- dietlibc-0.27/ia64/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/ia64/CVS/Root Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/ia64/__nice.c dietlibc-0.28/ia64/__nice.c --- dietlibc-0.27/ia64/__nice.c Sat Nov 9 19:22:06 2002 +++ dietlibc-0.28/ia64/__nice.c Thu Jan 1 01:00:00 1970 @@ -1,6 +0,0 @@ -#include - -int nice(int x) { - if (setpriority(PRIO_PROCESS,0,x)) return -1; - return getpriority(PRIO_PROCESS,0); -} diff -uNr dietlibc-0.27/ia64/start.S dietlibc-0.28/ia64/start.S --- dietlibc-0.27/ia64/start.S Fri Oct 10 15:37:34 2003 +++ dietlibc-0.28/ia64/start.S Sat Sep 11 14:37:57 2004 @@ -37,7 +37,11 @@ ld8 r14 = [r15] ;; st8 [r14] = out2 /* store envp in environ */ +#ifdef WANT_STACKGAP + br.call.sptk.few rp = stackgap +#else br.call.sptk.few rp = main /* call main */ +#endif ;; mov r32 = r8 /* store return code */ br exit /* branch to exit */ diff -uNr dietlibc-0.27/include/CVS/Entries dietlibc-0.28/include/CVS/Entries --- dietlibc-0.27/include/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/CVS/Entries Mon Jan 31 18:53:08 2005 @@ -0,0 +1,69 @@ +/alloca.h/1.3/Tue Aug 19 16:58:17 2003// +/ar.h/1.1/Sun Nov 2 00:47:37 2003// +/assert.h/1.10/Tue Aug 19 16:58:17 2003// +/byteswap.h/1.1/Thu Nov 20 23:48:47 2003// +/cpio.h/1.1/Wed Jul 3 20:33:37 2002// +/ctype.h/1.8/Tue Aug 19 16:58:17 2003// +/daemon.h/1.2/Thu Feb 21 21:42:42 2002// +/dietref.h/1.6/Thu Nov 6 12:56:25 2003// +/dietrefdef.h/1.2/Sat Jan 3 02:11:30 2004// +/dirent.h/1.17/Mon Jul 5 21:50:21 2004// +/dlfcn.h/1.6/Fri Dec 17 19:14:49 2004// +/elf.h/1.11/Fri Oct 10 13:41:13 2003// +/endian.h/1.12/Fri Dec 17 18:47:58 2004// +/err.h/1.2/Tue Aug 19 16:58:17 2003// +/errno.h/1.20/Fri Nov 14 14:01:19 2003// +/fcntl.h/1.14/Sat Jan 3 02:10:02 2004// +/features.h/1.6/Wed Apr 3 21:17:02 2002// +/float.h/1.1/Tue Jul 17 23:15:34 2001// +/fnmatch.h/1.3/Tue Aug 19 16:58:17 2003// +/ftw.h/1.4/Thu Sep 23 21:25:58 2004// +/getopt.h/1.7/Sun Sep 14 23:29:03 2003// +/glob.h/1.3/Tue Aug 19 16:58:17 2003// +/grp.h/1.8/Wed Apr 14 13:13:29 2004// +/iconv.h/1.5/Mon Dec 1 17:42:12 2003// +/inttypes.h/1.10/Mon Jul 5 21:55:44 2004// +/langinfo.h/1.1/Mon Dec 15 20:43:56 2003// +/libgen.h/1.2/Tue Aug 19 16:58:17 2003// +/libintl.h/1.3/Tue Nov 4 18:26:52 2003// +/limits.h/1.11/Tue Sep 17 16:44:51 2002// +/locale.h/1.6/Tue Aug 24 10:10:48 2004// +/malloc.h/1.1/Tue Jan 9 17:57:39 2001// +/math.h/1.16/Tue Aug 3 22:28:46 2004// +/md5.h/1.4/Tue Aug 19 16:58:17 2003// +/memory.h/1.1/Fri Mar 9 19:35:41 2001// +/mntent.h/1.3/Tue May 8 22:51:05 2001// +/netdb.h/1.19/Tue Aug 19 16:58:17 2003// +/nl_types.h/1.1/Mon Dec 15 20:43:56 2003// +/paths.h/1.13/Fri Dec 19 16:25:07 2003// +/poll.h/1.1/Fri Mar 14 16:42:28 2003// +/pthread.h/1.26/Fri Nov 14 14:02:50 2003// +/pty.h/1.2/Tue Aug 19 16:58:17 2003// +/pwd.h/1.9/Tue Aug 19 16:58:17 2003// +/regex.h/1.8/Tue Aug 19 16:58:17 2003// +/resolv.h/1.7/Thu Jun 3 11:10:55 2004// +/sched.h/1.9/Tue Aug 19 16:58:17 2003// +/semaphore.h/1.1/Wed Sep 17 15:06:10 2003// +/setjmp.h/1.22/Fri Oct 10 13:37:34 2003// +/shadow.h/1.6/Tue Aug 19 16:58:17 2003// +/signal.h/1.48/Fri Dec 17 19:14:49 2004// +/stdarg-cruft.h/1.6/Fri Oct 10 13:37:34 2003// +/stdarg.h/1.11/Tue Aug 19 16:58:17 2003// +/stdbool.h/1.1/Mon Aug 25 21:32:10 2003// +/stddef.h/1.9/Tue Jan 27 17:00:17 2004// +/stdint.h/1.7/Fri Dec 17 19:14:49 2004// +/stdio.h/1.42/Mon Jul 12 12:04:43 2004// +/stdlib.h/1.40/Wed Apr 14 13:13:29 2004// +/string.h/1.50/Fri Sep 5 23:38:06 2003// +/strings.h/1.5/Tue Aug 19 16:58:17 2003// +/sysexits.h/1.1/Tue Sep 17 19:26:02 2002// +/syslog.h/1.1/Fri Mar 9 20:28:41 2001// +/tar.h/1.1/Wed Jul 3 20:33:37 2002// +/termio.h/1.1/Mon Nov 26 15:16:24 2001// +/termios.h/1.16/Tue Aug 3 22:28:46 2004// +/time.h/1.26/Fri Jun 25 10:02:09 2004// +/unistd.h/1.82/Fri Jul 2 14:47:06 2004// +/utime.h/1.2/Tue Aug 19 16:58:17 2003// +/utmp.h/1.13/Tue Aug 19 16:58:18 2003// +/write12.h/1.3/Tue Aug 19 16:58:18 2003// +D diff -uNr dietlibc-0.27/include/CVS/Entries.Log dietlibc-0.28/include/CVS/Entries.Log --- dietlibc-0.27/include/CVS/Entries.Log Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/CVS/Entries.Log Mon Jan 31 18:53:08 2005 @@ -0,0 +1,9 @@ +A D/arpa//// +A D/asm//// +A D/linux//// +A D/net//// +A D/netinet//// +A D/netpacket//// +A D/rpc//// +A D/scsi//// +A D/sys//// diff -uNr dietlibc-0.27/include/CVS/Repository dietlibc-0.28/include/CVS/Repository --- dietlibc-0.27/include/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/CVS/Repository Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +dietlibc/include diff -uNr dietlibc-0.27/include/CVS/Root dietlibc-0.28/include/CVS/Root --- dietlibc-0.27/include/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/CVS/Root Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/include/arpa/CVS/Entries dietlibc-0.28/include/arpa/CVS/Entries --- dietlibc-0.27/include/arpa/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/arpa/CVS/Entries Mon Jan 31 18:53:08 2005 @@ -0,0 +1,4 @@ +/inet.h/1.5/Tue Aug 19 16:58:18 2003// +/nameser.h/1.4/Tue Aug 19 16:58:18 2003// +/tftp.h/1.1/Fri Jun 25 09:58:03 2004// +D diff -uNr dietlibc-0.27/include/arpa/CVS/Repository dietlibc-0.28/include/arpa/CVS/Repository --- dietlibc-0.27/include/arpa/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/arpa/CVS/Repository Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +dietlibc/include/arpa diff -uNr dietlibc-0.27/include/arpa/CVS/Root dietlibc-0.28/include/arpa/CVS/Root --- dietlibc-0.27/include/arpa/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/arpa/CVS/Root Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/include/asm/CVS/Entries dietlibc-0.28/include/asm/CVS/Entries --- dietlibc-0.27/include/asm/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/asm/CVS/Entries Mon Jan 31 18:53:08 2005 @@ -0,0 +1,14 @@ +/alpha-sigcontext.h/1.1/Mon Feb 18 00:13:24 2002// +/arm-sigcontext.h/1.2/Thu May 9 01:05:10 2002// +/i386-sigcontext.h/1.2/Tue Apr 2 16:04:06 2002// +/ia64-sigcontext.h/1.2/Sat Jul 20 16:47:48 2002// +/mips-sigcontext.h/1.1/Mon Feb 18 00:13:24 2002// +/parisc-sigcontext.h/1.1/Mon Feb 18 00:13:24 2002// +/ppc-sigcontext.h/1.3/Thu Jun 10 10:40:20 2004// +/s390-sigcontext.h/1.1/Tue Aug 19 21:38:37 2003// +/sigcontext.h/1.9/Fri Oct 10 13:37:34 2003// +/sparc-sigcontext.h/1.1/Mon Feb 18 00:13:24 2002// +/statfs.h/1.1/Mon Aug 19 08:32:10 2002// +/types.h/1.9/Fri Jan 21 17:43:12 2005// +/x86_64-sigcontext.h/1.1/Tue Aug 19 21:27:49 2003// +D diff -uNr dietlibc-0.27/include/asm/CVS/Repository dietlibc-0.28/include/asm/CVS/Repository --- dietlibc-0.27/include/asm/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/asm/CVS/Repository Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +dietlibc/include/asm diff -uNr dietlibc-0.27/include/asm/CVS/Root dietlibc-0.28/include/asm/CVS/Root --- dietlibc-0.27/include/asm/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/asm/CVS/Root Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/include/asm/types.h dietlibc-0.28/include/asm/types.h --- dietlibc-0.27/include/asm/types.h Wed Jan 7 16:06:48 2004 +++ dietlibc-0.28/include/asm/types.h Fri Jan 21 18:43:12 2005 @@ -31,6 +31,14 @@ typedef unsigned int __kernel_size_t; #endif +#define __force +typedef uint16_t __le16; +typedef uint16_t __be16; +typedef uint32_t __le32; +typedef uint32_t __be32; +typedef uint64_t __le64; +typedef uint64_t __be64; + __END_DECLS #endif diff -uNr dietlibc-0.27/include/dlfcn.h dietlibc-0.28/include/dlfcn.h --- dietlibc-0.27/include/dlfcn.h Fri Jan 30 19:27:32 2004 +++ dietlibc-0.28/include/dlfcn.h Fri Dec 17 20:14:49 2004 @@ -19,6 +19,18 @@ void *dlsym(void *handle, const char *symbol); int dlclose (void *handle); +#ifdef _GNU_SOURCE +typedef struct +{ + const char *dli_fname; + void *dli_fbase; + const char *dli_sname; + void *dli_saddr; +} Dl_info; + +int dladdr(void *addr, Dl_info *info); +#endif + __END_DECLS #endif diff -uNr dietlibc-0.27/include/endian.h dietlibc-0.28/include/endian.h --- dietlibc-0.27/include/endian.h Tue Apr 8 18:38:10 2003 +++ dietlibc-0.28/include/endian.h Fri Dec 17 19:47:58 2004 @@ -47,7 +47,7 @@ # define __LONG_LONG_PAIR(HI, LO) HI, LO #endif -#if defined(__alpha__) || defined(__mips64) || defined(__sparc_v9__) || defined(__x86_64__) || defined(__ia64__) +#if defined(__alpha__) || defined(__mips64) || defined(__sparc_v9__) || defined(__x86_64__) || defined(__ia64__) || defined(__powerpc64__) #define __WORDSIZE 64 #endif diff -uNr dietlibc-0.27/include/ftw.h dietlibc-0.28/include/ftw.h --- dietlibc-0.27/include/ftw.h Tue Aug 19 18:58:17 2003 +++ dietlibc-0.28/include/ftw.h Thu Sep 23 23:25:58 2004 @@ -11,8 +11,16 @@ int level; }; -int ftw (const char *dir, int (*fn)(const char *file, const struct stat *sb, int flag), int depth) __THROW; -int nftw (const char *dir, int (*fn)(const char *file, const struct stat *sb, int flag, struct FTW *s), int depth, int flags) __THROW; +int ftw(const char *dir, int (*fn)(const char *file, const struct stat *sb, int flag), int depth) __THROW; +int nftw(const char *dir, int (*fn)(const char *file, const struct stat *sb, int flag, struct FTW *s), int depth, int flags) __THROW; + +#ifndef __NO_STAT64 +int ftw64(const char *dir, int (*fn)(const char *file, const struct stat64 *sb, int flag), int depth) __THROW; + +#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 +#define ftw(dir,fn,depth) ftw64(dir,fn,depth) +#endif +#endif enum { diff -uNr dietlibc-0.27/include/linux/CVS/Entries dietlibc-0.28/include/linux/CVS/Entries --- dietlibc-0.27/include/linux/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/linux/CVS/Entries Mon Jan 31 18:53:08 2005 @@ -0,0 +1,9 @@ +/eventpoll.h/1.3/Tue Aug 19 16:58:18 2003// +/fd.h/1.1/Fri Jul 2 12:30:47 2004// +/if_ether.h/1.3/Fri Jul 2 21:22:33 2004// +/kd.h/1.2/Tue Aug 19 16:58:18 2003// +/loop.h/1.2/Tue Aug 19 16:58:18 2003// +/nfs.h/1.2/Tue Aug 19 16:58:18 2003// +/soundcard.h/1.2/Tue Aug 19 16:58:18 2003// +/types.h/1.1/Mon Jul 30 13:34:41 2001// +D diff -uNr dietlibc-0.27/include/linux/CVS/Repository dietlibc-0.28/include/linux/CVS/Repository --- dietlibc-0.27/include/linux/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/linux/CVS/Repository Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +dietlibc/include/linux diff -uNr dietlibc-0.27/include/linux/CVS/Root dietlibc-0.28/include/linux/CVS/Root --- dietlibc-0.27/include/linux/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/linux/CVS/Root Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/include/locale.h dietlibc-0.28/include/locale.h --- dietlibc-0.27/include/locale.h Tue Aug 19 18:58:17 2003 +++ dietlibc-0.28/include/locale.h Tue Aug 24 12:10:48 2004 @@ -7,18 +7,31 @@ enum { LC_CTYPE = 0, +#define LC_CTYPE LC_CTYPE LC_NUMERIC = 1, +#define LC_NUMERIC LC_NUMERIC LC_TIME = 2, +#define LC_TIME LC_TIME LC_COLLATE = 3, +#define LC_COLLATE LC_COLLATE LC_MONETARY = 4, +#define LC_MONETARY LC_MONETARY LC_MESSAGES = 5, +#define LC_MESSAGES LC_MESSAGES LC_ALL = 6, +#define LC_ALL LC_ALL LC_PAPER = 7, +#define LC_PAPER LC_PAPER LC_NAME = 8, +#define LC_NAME LC_NAME LC_ADDRESS = 9, +#define LC_ADDRESS LC_ADDRESS LC_TELEPHONE = 10, +#define LC_TELEPHONE LC_TELEPHONE LC_MEASUREMENT = 11, +#define LC_MEASUREMENT LC_MEASUREMENT LC_IDENTIFICATION = 12 +#define LC_IDENTIFICATION LC_IDENTIFICATION }; /* Structure giving information about numeric and monetary notation. */ diff -uNr dietlibc-0.27/include/math.h dietlibc-0.28/include/math.h --- dietlibc-0.27/include/math.h Mon Oct 13 16:39:23 2003 +++ dietlibc-0.28/include/math.h Wed Aug 4 00:28:46 2004 @@ -54,6 +54,9 @@ double log(double d) __THROW __attribute__((__const__)); double log10(double d) __THROW __attribute__((__const__)); +double exp2(double d) __THROW __attribute__((__const__)); +double log2(double d) __THROW __attribute__((__const__)); + double pow(double x, double y) __THROW __attribute__((__const__)); double sqrt(double x) __THROW __attribute__((__const__)); diff -uNr dietlibc-0.27/include/net/CVS/Entries dietlibc-0.28/include/net/CVS/Entries --- dietlibc-0.27/include/net/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/net/CVS/Entries Mon Jan 31 18:53:08 2005 @@ -0,0 +1,6 @@ +/ethernet.h/1.2/Thu Dec 18 16:34:42 2003// +/if.h/1.6/Fri Dec 5 19:32:09 2003// +/if_arp.h/1.4/Tue Aug 19 16:58:18 2003// +/if_ether.h/1.2/Tue Aug 19 16:58:18 2003// +/route.h/1.4/Tue Aug 19 16:58:18 2003// +D diff -uNr dietlibc-0.27/include/net/CVS/Repository dietlibc-0.28/include/net/CVS/Repository --- dietlibc-0.27/include/net/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/net/CVS/Repository Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +dietlibc/include/net diff -uNr dietlibc-0.27/include/net/CVS/Root dietlibc-0.28/include/net/CVS/Root --- dietlibc-0.27/include/net/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/net/CVS/Root Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/include/netinet/CVS/Entries dietlibc-0.28/include/netinet/CVS/Entries --- dietlibc-0.27/include/netinet/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/netinet/CVS/Entries Mon Jan 31 18:53:08 2005 @@ -0,0 +1,9 @@ +/ether.h/1.1/Tue Jun 15 16:25:51 2004// +/if_ether.h/1.1/Tue Jun 15 16:25:51 2004// +/in.h/1.19/Wed Apr 14 13:13:29 2004// +/in_systm.h/1.1/Tue Jan 9 17:57:40 2001// +/ip.h/1.8/Tue Aug 19 16:58:18 2003// +/ip_icmp.h/1.3/Tue Aug 19 16:58:18 2003// +/tcp.h/1.5/Tue Aug 19 16:58:18 2003// +/udp.h/1.4/Tue Aug 19 16:58:18 2003// +D diff -uNr dietlibc-0.27/include/netinet/CVS/Repository dietlibc-0.28/include/netinet/CVS/Repository --- dietlibc-0.27/include/netinet/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/netinet/CVS/Repository Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +dietlibc/include/netinet diff -uNr dietlibc-0.27/include/netinet/CVS/Root dietlibc-0.28/include/netinet/CVS/Root --- dietlibc-0.27/include/netinet/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/netinet/CVS/Root Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/include/netpacket/CVS/Entries dietlibc-0.28/include/netpacket/CVS/Entries --- dietlibc-0.27/include/netpacket/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/netpacket/CVS/Entries Mon Jan 31 18:53:08 2005 @@ -0,0 +1,2 @@ +/packet.h/1.2/Tue Aug 19 16:58:18 2003// +D diff -uNr dietlibc-0.27/include/netpacket/CVS/Repository dietlibc-0.28/include/netpacket/CVS/Repository --- dietlibc-0.27/include/netpacket/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/netpacket/CVS/Repository Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +dietlibc/include/netpacket diff -uNr dietlibc-0.27/include/netpacket/CVS/Root dietlibc-0.28/include/netpacket/CVS/Root --- dietlibc-0.27/include/netpacket/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/netpacket/CVS/Root Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/include/rpc/CVS/Entries dietlibc-0.28/include/rpc/CVS/Entries --- dietlibc-0.27/include/rpc/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/rpc/CVS/Entries Mon Jan 31 18:53:08 2005 @@ -0,0 +1,18 @@ +/auth.h/1.3/Sat Jun 16 14:46:33 2001// +/auth_des.h/1.2/Fri Jun 15 16:14:49 2001// +/auth_unix.h/1.2/Fri Jun 15 16:14:49 2001// +/clnt.h/1.2/Fri Jun 15 16:14:49 2001// +/des_crypt.h/1.1/Wed May 2 20:56:50 2001// +/key_prot.h/1.2/Fri Jun 15 16:14:49 2001// +/netdb.h/1.2/Fri Jun 15 16:14:49 2001// +/pmap_clnt.h/1.2/Fri Jun 15 16:14:49 2001// +/pmap_prot.h/1.2/Fri Jun 15 16:14:49 2001// +/pmap_rmt.h/1.2/Fri Jun 15 16:14:49 2001// +/rpc.h/1.3/Sat Feb 23 23:08:20 2002// +/rpc_des.h/1.2/Tue Aug 19 16:58:18 2003// +/rpc_msg.h/1.2/Fri Jun 15 16:14:49 2001// +/svc.h/1.2/Fri Jun 15 16:14:49 2001// +/svc_auth.h/1.1/Wed May 2 20:56:50 2001// +/types.h/1.4/Tue Aug 19 16:58:18 2003// +/xdr.h/1.6/Fri Dec 17 19:22:11 2004// +D diff -uNr dietlibc-0.27/include/rpc/CVS/Repository dietlibc-0.28/include/rpc/CVS/Repository --- dietlibc-0.27/include/rpc/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/rpc/CVS/Repository Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +dietlibc/include/rpc diff -uNr dietlibc-0.27/include/rpc/CVS/Root dietlibc-0.28/include/rpc/CVS/Root --- dietlibc-0.27/include/rpc/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/rpc/CVS/Root Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/include/rpc/xdr.h dietlibc-0.28/include/rpc/xdr.h --- dietlibc-0.27/include/rpc/xdr.h Fri Mar 21 22:01:04 2003 +++ dietlibc-0.28/include/rpc/xdr.h Fri Dec 17 20:22:11 2004 @@ -262,10 +262,8 @@ * and shouldn't be used any longer. Code which use this defines or longs * in the RPC code will not work on 64bit Solaris platforms ! */ -#define IXDR_GET_LONG(buf) \ - ((long)ntohl((unsigned long)*__extension__((uint32_t*)(buf))++)) -#define IXDR_PUT_LONG(buf, v) \ - (*__extension__((uint32_t*)(buf))++ = (long)htonl((unsigned long)(v))) +#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf)) +#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v))) #define IXDR_GET_U_LONG(buf) ((unsigned long)IXDR_GET_LONG(buf)) #define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG(buf, (long)(v)) diff -uNr dietlibc-0.27/include/scsi/CVS/Entries dietlibc-0.28/include/scsi/CVS/Entries --- dietlibc-0.27/include/scsi/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/scsi/CVS/Entries Mon Jan 31 18:53:08 2005 @@ -0,0 +1,4 @@ +/scsi.h/1.2/Tue Aug 19 16:58:18 2003// +/scsi_ioctl.h/1.1/Sun Apr 22 15:52:01 2001// +/sg.h/1.2/Tue Aug 19 16:58:18 2003// +D diff -uNr dietlibc-0.27/include/scsi/CVS/Repository dietlibc-0.28/include/scsi/CVS/Repository --- dietlibc-0.27/include/scsi/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/scsi/CVS/Repository Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +dietlibc/include/scsi diff -uNr dietlibc-0.27/include/scsi/CVS/Root dietlibc-0.28/include/scsi/CVS/Root --- dietlibc-0.27/include/scsi/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/scsi/CVS/Root Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/include/signal.h dietlibc-0.28/include/signal.h --- dietlibc-0.27/include/signal.h Mon May 17 19:53:18 2004 +++ dietlibc-0.28/include/signal.h Fri Dec 17 20:14:49 2004 @@ -517,6 +517,11 @@ int sigpending(sigset_t *set) __THROW; int sigprocmask(int how, const sigset_t *set, sigset_t *oldset) __THROW; +#ifdef _GNU_SOURCE +int sigisemptyset(const sigset_t *set) __THROW __pure; +int sigorset(sigset_t *set, const sigset_t *left, const sigset_t *right) __THROW; +int sigandset(sigset_t *set, const sigset_t *left, const sigset_t *right) __THROW; +#endif sighandler_t signal(int signum, sighandler_t action); diff -uNr dietlibc-0.27/include/stdint.h dietlibc-0.28/include/stdint.h --- dietlibc-0.27/include/stdint.h Wed Jan 7 16:06:48 2004 +++ dietlibc-0.28/include/stdint.h Fri Dec 17 20:14:49 2004 @@ -29,6 +29,41 @@ #include +/* The ISO C99 standard specifies that in C++ implementations these + should only be defined if explicitly requested. */ +#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS + +/* Signed. */ +# define INT8_C(c) c +# define INT16_C(c) c +# define INT32_C(c) c +# if __WORDSIZE == 64 +# define INT64_C(c) c ## L +# else +# define INT64_C(c) c ## LL +# endif + +/* Unsigned. */ +# define UINT8_C(c) c ## U +# define UINT16_C(c) c ## U +# define UINT32_C(c) c ## U +# if __WORDSIZE == 64 +# define UINT64_C(c) c ## UL +# else +# define UINT64_C(c) c ## ULL +# endif + +/* Maximal type. */ +# if __WORDSIZE == 64 +# define INTMAX_C(c) c ## L +# define UINTMAX_C(c) c ## UL +# else +# define INTMAX_C(c) c ## LL +# define UINTMAX_C(c) c ## ULL +# endif + +#endif /* C++ && constant macros */ + __END_DECLS #endif diff -uNr dietlibc-0.27/include/sys/CVS/Entries dietlibc-0.28/include/sys/CVS/Entries --- dietlibc-0.27/include/sys/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/sys/CVS/Entries Mon Jan 31 18:53:08 2005 @@ -0,0 +1,55 @@ +/alpha-ioctl.h/1.2/Mon Sep 3 16:06:28 2001// +/arm-ioctl.h/1.2/Mon Sep 3 16:06:28 2001// +/cdefs.h/1.28/Mon Dec 6 21:26:24 2004// +/epoll.h/1.8/Tue Feb 24 00:33:18 2004// +/file.h/1.3/Tue Aug 19 16:58:18 2003// +/fsuid.h/1.3/Tue Aug 19 16:58:18 2003// +/gmon.h/1.2/Tue Aug 19 16:58:18 2003// +/gmon_out.h/1.1/Wed Apr 3 13:15:27 2002// +/hppa-ioctl.h/1.1/Fri Jan 11 18:07:07 2002// +/i386-ioctl.h/1.2/Mon Sep 3 16:06:28 2001// +/io.h/1.6/Tue Aug 24 10:10:48 2004// +/ioctl.h/1.10/Fri Oct 10 13:37:34 2003// +/ipc.h/1.7/Tue Aug 19 16:58:18 2003// +/kd.h/1.3/Tue Aug 19 16:58:18 2003// +/klog.h/1.2/Tue Aug 19 16:58:18 2003// +/mips-ioctl.h/1.3/Wed Jun 18 15:20:00 2003// +/mman.h/1.20/Tue Nov 30 15:37:29 2004// +/mount.h/1.8/Wed May 12 15:55:24 2004// +/msg.h/1.3/Tue Aug 19 16:58:18 2003// +/mtio.h/1.6/Thu Dec 18 16:37:02 2003// +/param.h/1.7/Sun Mar 30 19:19:53 2003// +/poll.h/1.5/Tue Aug 19 16:58:18 2003// +/ppc-ioctl.h/1.2/Mon Sep 3 16:06:28 2001// +/prctl.h/1.2/Tue Aug 19 16:58:18 2003// +/ptrace.h/1.15/Thu Nov 18 16:44:39 2004// +/reboot.h/1.6/Tue Aug 19 16:58:18 2003// +/resource.h/1.8/Mon Nov 24 20:32:04 2003// +/s390-ioctl.h/1.1/Thu Nov 29 08:19:15 2001// +/select.h/1.6/Mon May 17 17:44:56 2004// +/sem.h/1.6/Tue Aug 19 16:58:18 2003// +/sendfile.h/1.5/Tue Aug 19 16:58:18 2003// +/shm.h/1.13/Fri Oct 10 13:37:34 2003// +/signal.h/1.1/Wed Mar 14 21:17:48 2001// +/socket.h/1.22/Tue Aug 19 16:58:18 2003// +/soundcard.h/1.3/Tue Aug 19 16:58:18 2003// +/sparc-ioctl.h/1.2/Mon Sep 3 16:06:28 2001// +/stat.h/1.28/Fri Mar 26 15:25:15 2004// +/swap.h/1.1/Fri Jan 21 18:21:07 2005// +/syscall.h/1.1/Fri Mar 9 19:35:41 2001// +/sysctl.h/1.2/Tue Aug 19 16:58:18 2003// +/sysinfo.h/1.3/Tue Aug 19 16:58:18 2003// +/syslog.h/1.6/Tue Aug 19 16:58:18 2003// +/sysmacros.h/1.1/Fri Jun 1 16:27:38 2001// +/time.h/1.12/Mon May 17 17:49:58 2004// +/timeb.h/1.2/Tue Aug 19 16:58:18 2003// +/times.h/1.5/Tue Aug 19 16:58:18 2003// +/timex.h/1.3/Tue Aug 19 16:58:18 2003// +/types.h/1.26/Wed Apr 14 13:33:41 2004// +/ucontext.h/1.6/Fri Oct 10 13:37:34 2003// +/uio.h/1.4/Tue Aug 19 16:58:18 2003// +/un.h/1.3/Tue Aug 19 16:58:18 2003// +/utsname.h/1.2/Tue Aug 19 16:58:18 2003// +/vfs.h/1.5/Tue Aug 19 16:58:18 2003// +/wait.h/1.10/Fri Dec 17 19:14:49 2004// +D diff -uNr dietlibc-0.27/include/sys/CVS/Repository dietlibc-0.28/include/sys/CVS/Repository --- dietlibc-0.27/include/sys/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/sys/CVS/Repository Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +dietlibc/include/sys diff -uNr dietlibc-0.27/include/sys/CVS/Root dietlibc-0.28/include/sys/CVS/Root --- dietlibc-0.27/include/sys/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/sys/CVS/Root Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/include/sys/cdefs.h dietlibc-0.28/include/sys/cdefs.h --- dietlibc-0.27/include/sys/cdefs.h Wed Jan 7 16:06:48 2004 +++ dietlibc-0.28/include/sys/cdefs.h Mon Dec 6 22:26:24 2004 @@ -63,4 +63,10 @@ #define __deprecated__ #endif +#if (__GNUC_ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) +# define __nonnull(params) __attribute__ ((__nonnull__ params)) +#else +# define __nonnull(params) +#endif + #endif diff -uNr dietlibc-0.27/include/sys/io.h dietlibc-0.28/include/sys/io.h --- dietlibc-0.27/include/sys/io.h Tue Aug 19 18:58:18 2003 +++ dietlibc-0.28/include/sys/io.h Tue Aug 24 12:10:48 2004 @@ -10,7 +10,7 @@ #ifndef __STRICT_ANSI__ /* anyone have a cleaner solution for this mess? */ -#ifdef __i386__ +#if defined(__i386__) || defined(__x86_64__) static inline unsigned char inb (unsigned short int port) { unsigned char _v; __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (port)); diff -uNr dietlibc-0.27/include/sys/mman.h dietlibc-0.28/include/sys/mman.h --- dietlibc-0.27/include/sys/mman.h Fri Oct 10 15:37:34 2003 +++ dietlibc-0.28/include/sys/mman.h Tue Nov 30 16:37:29 2004 @@ -3,6 +3,7 @@ #include #include +#include __BEGIN_DECLS @@ -171,6 +172,12 @@ extern void *mmap64 (void *__addr, size_t __len, int __prot, int __flags, int __fd, off64_t __offset) __THROW; +#ifndef __NO_STAT64 +#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 +#define mmap(a,b,c,d,e,f) mmap64(a,b,c,d,e,f) +#endif +#endif + int mlockall(int flags) __THROW; int mlock(const void *addr, size_t len) __THROW; int munlock(const void *addr, size_t len) __THROW; diff -uNr dietlibc-0.27/include/sys/ptrace.h dietlibc-0.28/include/sys/ptrace.h --- dietlibc-0.27/include/sys/ptrace.h Thu Jun 10 12:40:20 2004 +++ dietlibc-0.28/include/sys/ptrace.h Thu Nov 18 17:44:39 2004 @@ -26,7 +26,7 @@ #define PT_TRACE_ME PTRACE_TRACEME #define PT_READ_I PTRACE_PEEKTEXT #define PT_READ_D PTRACE_PEEKDATA -#define PT_READ_U PTRACE_READ_U +#define PT_READ_U PTRACE_PEEKUSER #define PT_WRITE_I PTRACE_POKETEXT #define PT_WRITE_D PTRACE_POKEDATA #define PT_WRITE_U PTRACE_POKEUSER diff -uNr dietlibc-0.27/include/sys/swap.h dietlibc-0.28/include/sys/swap.h --- dietlibc-0.27/include/sys/swap.h Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/include/sys/swap.h Fri Jan 21 19:21:07 2005 @@ -0,0 +1,19 @@ +#ifndef _SYS_SWAP_H +#define _SYS_SWAP_H + +#include + +#define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */ +#define SWAP_FLAG_PRIO_MASK 0x7fff +#define SWAP_FLAG_PRIO_SHIFT 0 + +#define MAX_SWAPFILES 32 + +__BEGIN_DECLS + +extern int swapon (const char *path, int flags) __THROW; +extern int swapoff (const char *path) __THROW; + +__END_DECLS + +#endif /* _SYS_SWAP_H */ diff -uNr dietlibc-0.27/include/sys/wait.h dietlibc-0.28/include/sys/wait.h --- dietlibc-0.27/include/sys/wait.h Tue Aug 19 18:58:18 2003 +++ dietlibc-0.28/include/sys/wait.h Fri Dec 17 20:14:49 2004 @@ -37,6 +37,10 @@ /* Nonzero if STATUS indicates the child dumped core. */ #define WCOREDUMP(status) ((status) & 0x80) +#ifdef _BSD_SOURCE +#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) +#endif + pid_t wait(int *status) __THROW; pid_t waitpid(pid_t pid, int *status, int options) __THROW; diff -uNr dietlibc-0.27/include/termios.h dietlibc-0.28/include/termios.h --- dietlibc-0.27/include/termios.h Fri Oct 10 15:37:34 2003 +++ dietlibc-0.28/include/termios.h Wed Aug 4 00:28:46 2004 @@ -381,6 +381,7 @@ int tcdrain(int fd) __THROW; int tcflow (int fd,int action) __THROW; int tcsendbreak (int fd,int duration) __THROW; +pid_t tcgetsid(int fildes) __THROW; __END_DECLS diff -uNr dietlibc-0.27/lib/CVS/Entries dietlibc-0.28/lib/CVS/Entries --- dietlibc-0.27/lib/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/lib/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,221 @@ +/__dtostr.c/1.21/Fri Dec 5 18:52:26 2003// +/__finite.c/1.1/Mon Mar 24 02:04:46 2003// +/__fstat64.c/1.4/Thu May 31 16:12:27 2001// +/__ftruncate64.c/1.2/Mon Oct 21 13:02:06 2002// +/__getcwd.c/1.2/Tue Aug 14 16:56:49 2001// +/__isinf.c/1.3/Sun Sep 14 23:29:03 2003// +/__isnan.c/1.5/Sun Sep 14 23:29:03 2003// +/__lltostr.c/1.3/Tue Aug 14 16:56:49 2001// +/__lstat64.c/1.4/Thu May 31 16:12:27 2001// +/__ltostr.c/1.3/Tue Aug 14 16:56:49 2001// +/__nice.c/1.2/Fri Jan 21 18:25:10 2005// +/__ptrace.c/1.2/Tue Mar 2 21:24:33 2004// +/__sendfile64.c/1.1/Mon May 19 11:35:46 2003// +/__stat64.c/1.4/Thu May 31 16:12:27 2001// +/__stat64_cvt.c/1.4/Wed Mar 10 15:24:50 2004// +/__stime.c/1.2/Mon Nov 18 01:16:51 2002// +/__sysctl.c/1.1/Tue Aug 19 15:28:11 2003// +/__truncate64.c/1.4/Mon Oct 21 13:02:06 2002// +/__v_printf.c/1.27/Fri Dec 5 18:52:27 2003// +/__v_scanf.c/1.19/Wed Oct 15 15:32:09 2003// +/_brk.c/1.5/Sat Feb 23 21:08:27 2002// +/abort.c/1.7/Sat Aug 23 16:12:47 2003// +/abs.c/1.3/Mon Jul 23 17:25:49 2001// +/accept.c/1.6/Tue Aug 27 13:55:31 2002// +/adjtime.c/1.2/Sun Nov 4 19:03:31 2001// +/alloc.c/1.39/Mon Jul 12 12:04:43 2004// +/assert_fail.c/1.5/Thu Oct 17 19:51:17 2002// +/atexit.c/1.13/Mon Jun 23 10:48:08 2003// +/atof.c/1.2/Thu Feb 15 22:20:06 2001// +/atoi.c/1.6/Thu May 9 01:01:16 2002// +/atol.c/1.6/Sat Feb 23 22:18:41 2002// +/atoll.c/1.4/Sat Feb 23 22:18:42 2002// +/bind.c/1.5/Tue Aug 27 13:55:31 2002// +/binshstr.c/1.1/Mon Sep 10 13:17:48 2001// +/bsearch.c/1.8/Tue Aug 19 17:29:38 2003// +/cfgetospeed.c/1.4/Tue Jan 29 01:40:15 2002// +/cfmakeraw.c/1.2/Tue Aug 14 16:56:50 2001// +/cfsetispeed.c/1.3/Tue Aug 14 16:56:50 2001// +/cfsetospeed.c/1.3/Tue Aug 14 16:56:50 2001// +/closedir.c/1.4/Wed Jul 3 20:33:37 2002// +/connect.c/1.7/Tue Aug 27 13:55:31 2002// +/creat.c/1.3/Sat Feb 23 22:18:42 2002// +/creat64.c/1.2/Fri Feb 2 21:42:24 2001// +/errlistu.c/1.1/Thu Aug 16 17:12:25 2001// +/errno_location.c/1.3/Thu Jun 7 12:29:35 2001// +/exec_lib.c/1.3/Tue Aug 14 16:56:50 2001// +/exec_lib.h/1.1/Mon Mar 19 17:37:53 2001// +/execl.c/1.4/Wed Oct 29 16:49:57 2003// +/execle.c/1.1/Thu Oct 4 14:50:49 2001// +/execlp.c/1.5/Wed Oct 29 16:47:34 2003// +/execv.c/1.4/Thu May 31 17:03:41 2001// +/execvp.c/1.9/Sun Mar 7 21:44:51 2004// +/ffs.c/1.1/Tue Aug 19 23:47:56 2003// +/ftw.c/1.7/Fri Sep 6 19:20:43 2002// +/ftw64.c/1.1/Thu Sep 23 21:25:58 2004// +/getdomainname.c/1.3/Tue Aug 14 16:56:50 2001// +/getenv.c/1.2/Tue Aug 14 16:56:50 2001// +/gethostname.c/1.3/Tue Aug 14 16:56:50 2001// +/getopt.c/1.15/Mon Jun 23 10:48:08 2003// +/getpeername.c/1.5/Tue Aug 27 13:55:31 2002// +/getpgrp.c/1.1/Tue Feb 27 14:51:54 2001// +/getsockname.c/1.5/Tue Aug 27 13:55:31 2002// +/getsockopt.c/1.5/Tue Aug 27 13:55:31 2002// +/htonl.c/1.5/Tue Aug 19 16:32:23 2003// +/htons.c/1.7/Tue Aug 19 16:32:23 2003// +/if_indextoname.c/1.2/Fri Jun 15 16:14:50 2001// +/if_nameindex.c/1.1/Sun Nov 4 23:37:25 2001// +/if_nametoindex.c/1.2/Fri Jun 15 16:14:50 2001// +/ipv6constants.c/1.1/Mon Sep 3 13:09:30 2001// +/isalnum.c/1.5/Tue Aug 14 16:56:50 2001// +/isalpha.c/1.6/Tue Aug 14 16:56:50 2001// +/isascii.c/1.3/Tue Jul 17 17:58:25 2001// +/isatty.c/1.5/Tue Aug 14 16:56:50 2001// +/isblank.c/1.2/Tue Jul 17 17:58:25 2001// +/iscntrl.c/1.4/Tue Aug 14 16:56:50 2001// +/isdigit.c/1.4/Tue Aug 14 16:56:50 2001// +/isgraph.c/1.5/Tue Aug 14 16:56:50 2001// +/islower.c/1.4/Tue Aug 14 16:56:50 2001// +/isprint.c/1.4/Tue Aug 14 16:56:50 2001// +/ispunct.c/1.4/Tue Aug 14 16:56:50 2001// +/isspace.c/1.5/Tue Aug 14 16:56:50 2001// +/isupper.c/1.4/Tue Aug 14 16:56:50 2001// +/isxdigit.c/1.6/Tue Aug 14 16:56:50 2001// +/labs.c/1.3/Mon Jul 23 17:25:49 2001// +/listen.c/1.5/Tue Aug 27 13:55:31 2002// +/llabs.c/1.4/Tue Aug 14 16:56:50 2001// +/lockf.c/1.3/Thu May 31 17:03:41 2001// +/longjmp.c/1.6/Wed Mar 20 16:57:53 2002// +/lseek64.c/1.5/Mon Nov 12 14:47:00 2001// +/memccpy.c/1.2/Tue Aug 14 16:56:50 2001// +/memchr.c/1.5/Fri Mar 26 23:28:13 2004// +/memcmp.c/1.5/Wed Oct 15 15:32:09 2003// +/memcpy.c/1.4/Sun Dec 21 12:06:36 2003// +/memmem.c/1.1/Thu Aug 23 16:57:52 2001// +/memmove.c/1.2/Tue Aug 14 16:56:50 2001// +/memrchr.c/1.2/Wed Jun 5 00:42:40 2002// +/memset.c/1.2/Sat Feb 23 22:18:42 2002// +/mkfifo.c/1.4/Tue Aug 14 16:56:50 2001// +/mmap64.c/1.2/Mon Dec 13 10:21:31 2004// +/msgctl.c/1.3/Sat Jun 16 17:48:55 2001// +/msgget.c/1.3/Sat Jun 16 17:48:55 2001// +/msgrcv.c/1.3/Sat Jun 16 17:48:55 2001// +/msgsnd.c/1.4/Sat Jun 16 17:48:56 2001// +/open64.c/1.9/Tue Aug 14 16:56:50 2001// +/opendir.c/1.6/Wed Jul 3 20:33:38 2002// +/perror.c/1.14/Thu May 9 23:20:29 2002// +/pread.c/1.5/Mon May 10 21:05:07 2004// +/pselect.c/1.1/Mon May 17 17:44:56 2004// +/putenv.c/1.7/Wed Jul 3 20:33:38 2002// +/pwrite.c/1.4/Mon May 10 21:05:07 2004// +/qsort.c/1.8/Thu Jun 3 11:36:47 2004// +/raise.c/1.3/Sat Jun 16 17:48:56 2001// +/rand.c/1.3/Sun Oct 27 16:51:03 2002// +/rand48.c/1.3/Mon Oct 21 13:11:25 2002// +/rand_r.c/1.1/Sun Oct 27 16:51:03 2002// +/readdir.c/1.4/Wed Jul 3 20:33:38 2002// +/readdir64.c/1.6/Tue Mar 2 21:27:19 2004// +/reboot.c/1.3/Tue Aug 14 16:56:50 2001// +/recv.c/1.6/Tue Aug 27 13:55:31 2002// +/recvfrom.c/1.6/Tue Aug 27 13:55:31 2002// +/recvmsg.c/1.5/Tue Aug 27 13:55:31 2002// +/remove.c/1.5/Tue Aug 14 16:56:50 2001// +/rewind.c/1.1/Tue Jan 9 17:57:42 2001// +/rewinddir.c/1.3/Sat Feb 3 20:41:12 2001// +/sbrk.c/1.4/Sat Jan 12 02:38:32 2002// +/seekdir.c/1.3/Sat Feb 3 20:41:12 2001// +/semctl.c/1.5/Sat Feb 23 22:18:42 2002// +/semget.c/1.3/Fri Jun 15 16:14:50 2001// +/semop.c/1.3/Fri Jun 15 16:14:50 2001// +/send.c/1.6/Tue Aug 27 13:55:31 2002// +/sendmsg.c/1.5/Tue Aug 27 13:55:31 2002// +/sendto.c/1.6/Tue Aug 27 13:55:31 2002// +/setlinebuf.c/1.3/Sat Feb 23 22:18:42 2002// +/setpgrp.c/1.1/Tue Feb 27 14:51:55 2001// +/setsockopt.c/1.5/Tue Aug 27 13:55:31 2002// +/shmat.c/1.6/Fri Jun 15 16:14:50 2001// +/shmctl.c/1.3/Fri Jun 15 16:14:50 2001// +/shmdt.c/1.3/Fri Jun 15 16:14:50 2001// +/shmget.c/1.3/Fri Jun 15 16:14:50 2001// +/shutdown.c/1.5/Tue Aug 27 13:55:31 2002// +/sigaction.c/1.3/Mon Aug 19 17:08:56 2002// +/sigaddset.c/1.5/Tue May 14 07:35:38 2002// +/sigandset.c/1.1/Fri Dec 17 19:14:49 2004// +/sigdelset.c/1.5/Tue May 14 07:35:38 2002// +/sigemptyset.c/1.5/Thu Jul 26 13:14:34 2001// +/sigfillset.c/1.6/Thu Jul 26 13:14:34 2001// +/siginterrupt.c/1.1/Mon Jul 23 18:43:19 2001// +/sigisemptyset.c/1.1/Fri Dec 17 19:14:49 2004// +/sigismember.c/1.3/Tue May 14 07:35:38 2002// +/sigjmp.c/1.4/Wed Mar 20 16:57:53 2002// +/signal.c/1.5/Mon Dec 9 13:33:32 2002// +/sigorset.c/1.1/Fri Dec 17 19:14:49 2004// +/sigpending.c/1.2/Mon Jul 23 19:24:34 2001// +/sigprocmask.c/1.2/Mon Jul 23 19:24:34 2001// +/sigqueueinfo.c/1.2/Mon Jul 23 19:24:34 2001// +/sigsuspend.c/1.3/Tue Aug 14 16:56:50 2001// +/sigtimedwait.c/1.2/Mon Jul 23 19:24:34 2001// +/sigwait.c/1.1/Thu Oct 9 23:57:11 2003// +/sleep.c/1.3/Tue Aug 14 16:56:50 2001// +/snprintf.c/1.2/Tue Aug 14 16:56:50 2001// +/socket.c/1.5/Tue Aug 27 13:55:31 2002// +/socketpair.c/1.6/Tue Aug 27 13:55:31 2002// +/sprintf.c/1.5/Tue Aug 14 16:56:50 2001// +/sscanf.c/1.2/Tue Aug 14 16:56:50 2001// +/stack_smash_handler.c/1.1/Sat Sep 11 12:38:21 2004// +/stackgap.c/1.1/Sat Sep 11 12:38:21 2004// +/strcasecmp.c/1.5/Tue Aug 19 19:34:18 2003// +/strcat.c/1.1/Tue Jan 9 17:57:42 2001// +/strchr.c/1.4/Tue Aug 19 19:34:18 2003// +/strcmp.c/1.5/Sun Dec 21 12:06:36 2003// +/strcpy.c/1.4/Sun Dec 21 12:06:36 2003// +/strcspn.c/1.1/Tue Jan 9 17:57:43 2001// +/strdup.c/1.1/Tue Jan 9 17:57:43 2001// +/strerror.c/1.9/Mon Jan 13 15:16:28 2003// +/strlcat.c/1.1/Tue Jan 9 17:57:43 2001// +/strlcpy.3/1.1/Tue Jan 9 17:57:43 2001// +/strlcpy.c/1.1/Tue Jan 9 17:57:43 2001// +/strlen.c/1.3/Tue Aug 19 19:34:18 2003// +/strncasecmp.c/1.6/Tue Aug 19 19:34:18 2003// +/strncat.c/1.10/Sun Dec 12 17:08:36 2004// +/strncmp.c/1.4/Wed Oct 15 15:32:09 2003// +/strncpy.c/1.8/Sat Sep 11 12:37:57 2004// +/strpbrk.c/1.1/Tue Jan 9 17:57:43 2001// +/strrchr.c/1.3/Tue Aug 19 19:34:18 2003// +/strsep.c/1.4/Mon Jul 8 20:55:32 2002// +/strspn.c/1.1/Tue Jan 9 17:57:43 2001// +/strstr.c/1.5/Tue Aug 19 19:34:18 2003// +/strtod.c/1.6/Sat Feb 23 23:08:20 2002// +/strtof.c/1.1/Fri Sep 13 12:08:45 2002// +/strtok.c/1.4/Tue Aug 14 16:56:51 2001// +/strtok_r.c/1.2/Sat Oct 11 09:36:49 2003// +/strtol.c/1.7/Tue Aug 24 10:10:48 2004// +/strtold.c/1.1/Fri Sep 13 12:08:45 2002// +/strtoll.c/1.6/Mon Jul 5 21:55:44 2004// +/strtoul.c/1.19/Tue Jan 27 14:10:53 2004// +/strtoull.c/1.11/Mon Jul 5 21:55:44 2004// +/strxfrm.c/1.1/Tue May 7 10:03:07 2002// +/swab.c/1.1/Fri Sep 5 16:33:25 2003// +/sys_siglist.c/1.3/Sat Oct 18 15:53:35 2003// +/tcdrain.c/1.2/Tue Aug 14 16:56:51 2001// +/tcflow.c/1.2/Wed Aug 15 16:39:30 2001// +/tcflush.c/1.2/Tue Aug 14 16:56:51 2001// +/tcgetattr.c/1.1/Tue Jan 9 17:57:43 2001// +/tcgetpgrp.c/1.4/Thu May 9 01:01:16 2002// +/tcgetsid.c/1.1/Tue Aug 3 22:28:46 2004// +/tcsendbreak.c/1.1/Mon Aug 6 12:18:27 2001// +/tcsetattr.c/1.8/Fri Jan 11 18:06:53 2002// +/tcsetpgrp.c/1.3/Thu May 9 01:01:16 2002// +/telldir.c/1.3/Sat Feb 3 20:41:12 2001// +/tolower.c/1.2/Fri Jul 27 14:39:18 2001// +/toupper.c/1.2/Fri Jul 27 14:39:18 2001// +/ttyname.c/1.7/Sat Feb 23 22:18:42 2002// +/usleep.c/1.5/Sat Feb 23 20:33:51 2002// +/vfork.c/1.5/Fri May 17 12:35:34 2002// +/vsnprintf.c/1.28/Fri Mar 26 14:46:48 2004// +/vsprintf.c/1.6/Fri Dec 5 14:10:10 2003// +/vsscanf.c/1.13/Tue Aug 14 16:56:51 2001// +/wait.c/1.1/Tue Jan 9 17:57:43 2001// +/wait3.c/1.1/Tue Jan 9 17:57:43 2001// +/write12.c/1.4/Mon Jun 7 17:05:03 2004// +D diff -uNr dietlibc-0.27/lib/CVS/Repository dietlibc-0.28/lib/CVS/Repository --- dietlibc-0.27/lib/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/lib/CVS/Repository Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +dietlibc/lib diff -uNr dietlibc-0.27/lib/CVS/Root dietlibc-0.28/lib/CVS/Root --- dietlibc-0.27/lib/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/lib/CVS/Root Mon Jan 31 18:53:08 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/lib/__nice.c dietlibc-0.28/lib/__nice.c --- dietlibc-0.27/lib/__nice.c Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/lib/__nice.c Fri Jan 21 19:25:10 2005 @@ -0,0 +1,9 @@ +#include "syscalls.h" +#include +#include + +#ifndef __NR_nice +int nice(int i) { + return setpriority(PRIO_PROCESS,0,getpriority(PRIO_PROCESS,0)+i); +} +#endif diff -uNr dietlibc-0.27/lib/ftw64.c dietlibc-0.28/lib/ftw64.c --- dietlibc-0.27/lib/ftw64.c Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/lib/ftw64.c Thu Sep 23 23:25:58 2004 @@ -0,0 +1,48 @@ +#define _FILE_OFFSET_BITS 64 +#include +#include +#include +#include +#include +#include +#include +#include "dietdirent.h" + +int ftw64(const char*dir,int(*f)(const char*file,const struct stat* sb,int flag),int dpth){ + char* cd; + size_t cdl; + DIR* d; + struct dirent* de; + struct stat sb; + int r; + unsigned int oldlen=0; + char* filename; /* the warning gcc issues here is bogus */ + if(chdir(dir))return-1; + cd=alloca(PATH_MAX+1); + if(!getcwd(cd,PATH_MAX))return-1; + cd[PATH_MAX]='\0'; + cdl=strlen(cd); + if(!(d=opendir(".")))return-1; + while((de=readdir(d))){ + int flg; + size_t nl; + if(de->d_name[0]=='.'){if(!de->d_name[1])continue;if(de->d_name[1]=='.'&&!de->d_name[2])continue;} + nl=strlen(de->d_name); + if (nl+cdl+2>oldlen) + filename=alloca(oldlen=nl+cdl+2); + memmove(filename,cd,cdl); + filename[cdl]='/'; + memmove(filename+cdl+1,de->d_name,nl+1); + if(!lstat(de->d_name,&sb)){ + if(S_ISLNK(sb.st_mode))flg=FTW_SL;else if(S_ISDIR(sb.st_mode))flg=FTW_D;else flg=FTW_F; + }else flg=FTW_NS; + r=f(filename,&sb,flg); + if(r){closedir(d);return r;} + if(flg==FTW_D&&dpth){ + r=ftw(filename,f,dpth-1); + fchdir(d->fd); + if (r){closedir(d);return r;} + } + } + return closedir(d); +} diff -uNr dietlibc-0.27/lib/mmap64.c dietlibc-0.28/lib/mmap64.c --- dietlibc-0.27/lib/mmap64.c Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/lib/mmap64.c Mon Dec 13 11:21:31 2004 @@ -0,0 +1,21 @@ +#include +#include +#include +#include +#include + +#ifdef __NR_mmap2 +void*__mmap2(void*start,size_t length,int prot,int flags,int fd,off_t pgoffset); + +void*__libc_mmap64(void*addr,size_t len,int prot,int flags,int fd,off64_t offset); +void*__libc_mmap64(void*addr,size_t len,int prot,int flags,int fd,off64_t offset) { + if (offset&(PAGE_SIZE-1)) { + errno=-EINVAL; + return MAP_FAILED; + } + return __mmap2(addr,len,prot,flags,fd,offset>>PAGE_SHIFT); +} + +void*mmap64(void*addr,size_t len,int prot,int flags,int fd,off64_t offset) +__attribute__((weak,alias("__libc_mmap64"))); +#endif diff -uNr dietlibc-0.27/lib/sigandset.c dietlibc-0.28/lib/sigandset.c --- dietlibc-0.27/lib/sigandset.c Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/lib/sigandset.c Fri Dec 17 20:14:49 2004 @@ -0,0 +1,13 @@ +#define _GNU_SOURCE +#include + +int sigandset(sigset_t*set,const sigset_t*left,const sigset_t*right) +{ + set->sig[0]=left->sig[0]&right->sig[0]; + if (_NSIG_WORDS>1) set->sig[1]=left->sig[1]&right->sig[1]; + if (_NSIG_WORDS>2) { + set->sig[2]=left->sig[2]&right->sig[2]; + set->sig[3]=left->sig[3]&right->sig[3]; + } + return 0; +} diff -uNr dietlibc-0.27/lib/sigisemptyset.c dietlibc-0.28/lib/sigisemptyset.c --- dietlibc-0.27/lib/sigisemptyset.c Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/lib/sigisemptyset.c Fri Dec 17 20:14:49 2004 @@ -0,0 +1,14 @@ +#define _GNU_SOURCE +#include + +int sigisemptyset(const sigset_t*set) +{ + unsigned long ret; + ret=set->sig[0]; + if (_NSIG_WORDS>1) ret|=set->sig[1]; + if (_NSIG_WORDS>2) { + ret|=set->sig[2]; + ret|=set->sig[3]; + } + return ret; +} diff -uNr dietlibc-0.27/lib/sigorset.c dietlibc-0.28/lib/sigorset.c --- dietlibc-0.27/lib/sigorset.c Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/lib/sigorset.c Fri Dec 17 20:14:49 2004 @@ -0,0 +1,13 @@ +#define _GNU_SOURCE +#include + +int sigorset(sigset_t*set,const sigset_t*left,const sigset_t*right) +{ + set->sig[0]=left->sig[0]|right->sig[0]; + if (_NSIG_WORDS>1) set->sig[1]=left->sig[1]|right->sig[1]; + if (_NSIG_WORDS>2) { + set->sig[2]=left->sig[2]|right->sig[2]; + set->sig[3]=left->sig[3]|right->sig[3]; + } + return 0; +} diff -uNr dietlibc-0.27/lib/stack_smash_handler.c dietlibc-0.28/lib/stack_smash_handler.c --- dietlibc-0.27/lib/stack_smash_handler.c Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/lib/stack_smash_handler.c Sat Sep 11 14:38:21 2004 @@ -0,0 +1,19 @@ +#include + +void __stack_smash_handler(char* func,unsigned int damaged) { + char buf[sizeof(char*)*2+1]; + int i; + for (i=0; i>=4; + } + buf[sizeof(buf)-1]=0; + __write2("stack smashed in "); + __write2(func); + __write2(" (value 0x"); + __write2(buf); + __write2(")\n"); + _exit(0); +} diff -uNr dietlibc-0.27/lib/stackgap.c dietlibc-0.28/lib/stackgap.c --- dietlibc-0.27/lib/stackgap.c Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/lib/stackgap.c Sat Sep 11 14:38:21 2004 @@ -0,0 +1,20 @@ +#include +#include +#include +#include "dietfeatures.h" + +extern int main(int argc,char* argv[],char* envp[]); + +long __guard; + +int stackgap(int argc,char* argv[],char* envp[]) { + int fd=open("/dev/urandom",O_RDONLY); + unsigned short s; + volatile char* gap; + read(fd,&s,2); + read(fd,&__guard,sizeof(__guard)); + close(fd); + gap=alloca(s); + return main(argc,argv,envp); +} + diff -uNr dietlibc-0.27/lib/strncat.c dietlibc-0.28/lib/strncat.c --- dietlibc-0.27/lib/strncat.c Wed Aug 20 01:03:14 2003 +++ dietlibc-0.28/lib/strncat.c Sun Dec 12 18:08:36 2004 @@ -1,25 +1,13 @@ #include "dietfeatures.h" #include -#ifdef WANT_NON_COMPLIANT_STRNCAT -/* this implementation is not standards compliant. - * the standard says that strncat(dest,"foobar",3) should write 'f', 'o' - * and 'o'. The programmer is then expected to overwrite the last byte - * with '\0', which is often forgotten. This implementation makes sure - * the last written bytes is always '\0'. */ -#endif - /* gcc is broken and has a non-SUSv2 compliant internal prototype. * This causes it to warn about a type mismatch here. Ignore it. */ char *strncat(char *s, const char *t, size_t n) { char *dest=s; register char *max; s+=strlen(s); -#ifdef WANT_NON_COMPLIANT_STRNCAT - if (__unlikely((max=s+n-1)<=s)) goto fini; -#else if (__unlikely((max=s+n)==s)) goto fini; -#endif for (;;) { if (__unlikely(!(*s = *t))) break; if (__unlikely(++s==max)) break; ++t; #ifndef WANT_SMALL_STRING_ROUTINES diff -uNr dietlibc-0.27/lib/strncpy.c dietlibc-0.28/lib/strncpy.c --- dietlibc-0.27/lib/strncpy.c Tue May 7 12:03:07 2002 +++ dietlibc-0.28/lib/strncpy.c Sat Sep 11 14:37:57 2004 @@ -11,5 +11,8 @@ memset(dest,0,n); #endif memccpy(dest,src,0,n); +#ifdef WANT_NON_COMPLIANT_STRNCAT + dest[n-1]=0; +#endif return dest; } diff -uNr dietlibc-0.27/lib/strtol.c dietlibc-0.28/lib/strtol.c --- dietlibc-0.27/lib/strtol.c Wed Oct 15 17:32:09 2003 +++ dietlibc-0.28/lib/strtol.c Tue Aug 24 12:10:48 2004 @@ -4,7 +4,11 @@ #include #include +#if __WORDSIZE == 64 +#define ABS_LONG_MIN 9223372036854775808UL +#else #define ABS_LONG_MIN 2147483648UL +#endif long int strtol(const char *nptr, char **endptr, int base) { int neg=0; diff -uNr dietlibc-0.27/lib/tcgetsid.c dietlibc-0.28/lib/tcgetsid.c --- dietlibc-0.27/lib/tcgetsid.c Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/lib/tcgetsid.c Wed Aug 4 00:28:46 2004 @@ -0,0 +1,8 @@ +#include +#include + +pid_t tcgetsid(int fildes) { + pid_t pid; + return ioctl(fildes, TIOCGSID, &pid)==-1?-1:pid; +} + diff -uNr dietlibc-0.27/libcompat/CVS/Entries dietlibc-0.28/libcompat/CVS/Entries --- dietlibc-0.27/libcompat/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libcompat/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,22 @@ +/ctermid.c/1.1/Sat Mar 15 02:36:42 2003// +/cuserid.c/1.2/Sat Mar 15 02:36:42 2003// +/daemon.c/1.1/Thu Feb 28 16:13:20 2002// +/err.c/1.1/Fri Jun 13 18:41:41 2003// +/errx.c/1.1/Fri Jun 13 18:41:41 2003// +/ffsl.c/1.2/Sat Aug 23 16:25:06 2003// +/ffsll.c/1.2/Sat Aug 23 16:25:06 2003// +/ftok.c/1.1/Sat Mar 15 02:36:42 2003// +/getdelim.c/1.2/Sat Aug 23 16:55:05 2003// +/getline.c/1.2/Sat Aug 23 16:50:54 2003// +/rcmd.c/1.1/Thu Nov 20 23:48:47 2003// +/re_bsd.c/1.2/Thu Apr 4 20:27:25 2002// +/stpcpy.c/1.1/Fri May 3 21:22:06 2002// +/syscall.S/1.5/Wed Dec 17 01:08:56 2003// +/utimes.c/1.2/Tue Aug 19 19:34:18 2003// +/verr.c/1.1/Fri Jun 13 18:41:41 2003// +/verrx.c/1.1/Fri Jun 13 18:41:41 2003// +/vwarn.c/1.2/Thu Jun 19 10:40:48 2003// +/vwarnx.c/1.1/Fri Jun 13 18:27:07 2003// +/warn.c/1.1/Fri Jun 13 18:41:41 2003// +/warnx.c/1.1/Fri Jun 13 18:27:07 2003// +D diff -uNr dietlibc-0.27/libcompat/CVS/Repository dietlibc-0.28/libcompat/CVS/Repository --- dietlibc-0.27/libcompat/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libcompat/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/libcompat diff -uNr dietlibc-0.27/libcompat/CVS/Root dietlibc-0.28/libcompat/CVS/Root --- dietlibc-0.27/libcompat/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libcompat/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/libcruft/CVS/Entries dietlibc-0.28/libcruft/CVS/Entries --- dietlibc-0.27/libcruft/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libcruft/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,94 @@ +/___div.c/1.1/Fri Mar 9 19:35:41 2001// +/__end_parse.c/1.2/Thu Jan 24 00:45:55 2002// +/__fprepare_parse.c/1.1/Tue Apr 8 16:41:27 2003// +/__parse.c/1.1/Tue Oct 23 01:44:39 2001// +/__parse_1.c/1.1/Tue Oct 23 01:44:39 2001// +/__parse_nws.c/1.2/Wed Oct 24 17:06:03 2001// +/__parse_ws.c/1.2/Wed Oct 24 17:06:03 2001// +/__prepare_parse.c/1.7/Tue Aug 19 17:13:46 2003// +/alphasort.c/1.2/Sat Feb 23 22:18:42 2002// +/alphasort64.c/1.1/Wed Feb 5 18:29:27 2003// +/bcopy.c/1.4/Sat Feb 23 22:18:42 2002// +/bindtextdomain.c/1.3/Fri Nov 14 15:16:51 2003// +/bzero.c/1.2/Sat Feb 23 22:18:42 2002// +/clock.c/1.8/Sat Feb 23 22:18:42 2002// +/confstr.c/1.1/Mon Aug 18 17:32:52 2003// +/dcgettext.c/1.1/Tue Nov 4 18:26:52 2003// +/dgettext.c/1.1/Tue Nov 4 18:26:52 2003// +/dn_expand.c/1.5/Wed Jul 10 22:20:34 2002// +/dnscruft.c/1.20/Fri Sep 19 23:25:58 2003// +/dnscruft2.c/1.27/Fri Feb 21 02:33:21 2003// +/dnscruft3.c/1.1/Sat Jun 2 00:59:41 2001// +/dnscruft4.c/1.2/Sat Feb 23 22:18:42 2002// +/fgetpwent.c/1.1/Tue Apr 8 16:41:27 2003// +/fgetpwent_r.c/1.1/Tue Apr 8 16:41:27 2003// +/getdtablesize.c/1.1/Wed May 2 23:19:55 2001// +/getgrent.c/1.3/Mon Oct 29 17:21:10 2001// +/getgrent_r.c/1.4/Sat Feb 23 22:18:42 2002// +/getgrgid.c/1.3/Mon Oct 29 17:21:10 2001// +/getgrgid_r.c/1.2/Mon Oct 29 17:21:10 2001// +/getgrnam.c/1.3/Mon Oct 29 17:21:10 2001// +/getgrnam_r.c/1.2/Mon Oct 29 17:21:10 2001// +/gethostbyaddr.c/1.5/Sat Feb 23 22:18:42 2002// +/gethostbyaddr2_r.c/1.2/Thu Jul 26 12:32:45 2001// +/gethostbyaddr_r.c/1.8/Thu Jun 3 16:05:54 2004// +/gethostbyname.c/1.6/Sat Oct 13 18:10:20 2001// +/gethostbyname2.c/1.6/Sat Feb 23 22:18:42 2002// +/gethostbyname2_r.c/1.12/Tue Aug 19 16:58:18 2003// +/gethostbyname_r.c/1.14/Sun Oct 27 16:51:03 2002// +/getlogin.c/1.3/Sat Feb 23 22:18:42 2002// +/getopt_data.c/1.2/Mon Sep 24 14:58:06 2001// +/getopt_long.c/1.7/Mon Jun 23 10:48:11 2003// +/getopt_long_only.c/1.5/Mon Jun 23 10:48:11 2003// +/getpagesize.c/1.4/Sat Feb 23 22:18:42 2002// +/getpass.c/1.4/Mon Jan 21 15:30:18 2002// +/getpwent.c/1.3/Mon Oct 29 17:21:10 2001// +/getpwent_r.c/1.4/Sat Feb 23 22:18:42 2002// +/getpwnam.c/1.6/Mon Oct 29 17:21:10 2001// +/getpwnam_r.c/1.2/Mon Oct 29 17:21:10 2001// +/getpwuid.c/1.4/Mon Oct 29 17:21:10 2001// +/getpwuid_r.c/1.2/Mon Oct 29 17:21:10 2001// +/getspent.c/1.3/Mon Oct 29 17:21:10 2001// +/getspent_r.c/1.4/Sat Feb 23 22:18:42 2002// +/getspnam.c/1.3/Mon Oct 29 17:21:10 2001// +/getspnam_r.c/1.2/Mon Oct 29 17:21:10 2001// +/gettext.c/1.1/Tue Nov 4 18:26:52 2003// +/getusershell.c/1.2/Sat Feb 23 22:18:42 2002// +/grbuf.c/1.1/Wed Oct 24 19:47:43 2001// +/h_errno.c/1.1/Fri Feb 23 13:22:35 2001// +/herrno_location.c/1.3/Sat Feb 23 22:18:42 2002// +/herror.c/1.3/Sat Feb 23 22:18:42 2002// +/hstrerror.c/1.5/Mon Oct 8 18:22:29 2001// +/inet_addr.c/1.1/Fri Feb 23 13:22:35 2001// +/inet_aton.c/1.3/Sat Feb 9 00:45:18 2002// +/inet_ntoa.c/1.5/Sat Feb 23 23:08:20 2002// +/inet_ntoa_r.c/1.1/Sat May 5 22:57:52 2001// +/inet_ntop.c/1.7/Thu Jan 15 18:44:59 2004// +/inet_pton.c/1.11/Tue Jul 2 23:05:47 2002// +/initgroups.c/1.6/Mon Jun 7 16:19:57 2004// +/killpg.c/1.1/Thu Jul 18 23:00:23 2002// +/localeconv.c/1.1/Wed Jan 16 13:21:43 2002// +/mkdtemp.c/1.8/Thu Aug 16 18:44:17 2001// +/mkstemp.c/1.12/Thu Aug 16 18:44:17 2001// +/mktemp.c/1.4/Thu Aug 16 18:44:17 2001// +/nl_langinfo.c/1.1/Mon Dec 15 20:43:56 2003// +/pwbuf.c/1.1/Wed Oct 24 17:27:12 2001// +/res_close.c/1.1/Thu Jun 3 11:10:55 2004// +/res_init.c/1.3/Wed Jun 13 15:54:11 2001// +/res_mkquery.c/1.7/Wed Nov 10 17:45:17 2004// +/res_query.c/1.18/Fri Jan 21 17:43:12 2005// +/res_search.c/1.4/Fri Jan 21 17:43:12 2005// +/scan_ulong.c/1.1/Tue Oct 23 01:44:39 2001// +/scandir.c/1.5/Mon Nov 3 14:19:21 2003// +/scandir64.c/1.2/Mon Nov 3 14:19:21 2003// +/setegid.c/1.2/Sat Feb 23 22:18:42 2002// +/seteuid.c/1.2/Sat Feb 23 22:18:42 2002// +/setlocale.c/1.3/Fri Aug 13 14:03:30 2004// +/spbuf.c/1.1/Wed Oct 24 19:47:43 2001// +/strerror_r.c/1.2/Fri Oct 24 15:21:50 2003// +/sysconf.c/1.6/Fri Dec 20 13:32:37 2002// +/sysconf_cpus.c/1.7/Fri Mar 26 14:52:46 2004// +/tempnam.c/1.5/Sat Feb 23 23:08:20 2002// +/textdomain.c/1.2/Fri Nov 14 14:52:16 2003// +/tmpnam.c/1.2/Sat Feb 23 22:18:42 2002// +D diff -uNr dietlibc-0.27/libcruft/CVS/Repository dietlibc-0.28/libcruft/CVS/Repository --- dietlibc-0.27/libcruft/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libcruft/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/libcruft diff -uNr dietlibc-0.27/libcruft/CVS/Root dietlibc-0.28/libcruft/CVS/Root --- dietlibc-0.27/libcruft/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libcruft/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/libcruft/res_mkquery.c dietlibc-0.28/libcruft/res_mkquery.c --- dietlibc-0.27/libcruft/res_mkquery.c Thu Jul 11 00:20:34 2002 +++ dietlibc-0.28/libcruft/res_mkquery.c Wed Nov 10 18:45:17 2004 @@ -42,6 +42,7 @@ int res_mkquery(int op, const char *dname, int class, int type, char* data, int datalen, const unsigned char* newrr, char* buf, int buflen) { unsigned char packet[512]; + unsigned long len=0; memmove(packet,dnspacket,12); if ((_res.options&RES_RECURSE)==0) packet[2]=0; *(unsigned short*)packet=rand(); @@ -52,10 +53,12 @@ while (*y) { while (*y=='.') ++y; for (tmp=y; *tmp && *tmp!='.'; ++tmp) ; + if (tmp-y > 63) return -1; *x=tmp-y; if (!(tmp-y)) break; + if ((len+=*x+1) > 254) return -1; ++x; - if (x>=packet+510-(tmp-y)) { return -1; } +// if (x>=packet+510-(tmp-y)) { return -1; } memmove(x,y,tmp-y); x+=tmp-y; if (!*tmp) { diff -uNr dietlibc-0.27/libcruft/res_query.c dietlibc-0.28/libcruft/res_query.c --- dietlibc-0.27/libcruft/res_query.c Sat Sep 20 19:49:19 2003 +++ dietlibc-0.28/libcruft/res_query.c Fri Jan 21 18:43:12 2005 @@ -145,7 +145,10 @@ } } } - h_errno=NO_DATA; + h_errno=TRY_AGAIN; return -1; } +#ifndef WANT_FULL_RESOLV_CONF +int res_search(const char *dname, int class, int type, unsigned char *answer, int anslen) __attribute__((alias("res_query"))); +#endif diff -uNr dietlibc-0.27/libcruft/res_search.c dietlibc-0.28/libcruft/res_search.c --- dietlibc-0.27/libcruft/res_search.c Sun Feb 24 00:08:20 2002 +++ dietlibc-0.28/libcruft/res_search.c Fri Jan 21 18:43:12 2005 @@ -10,7 +10,9 @@ #include #include #include +#include "dietfeatures.h" +#ifdef WANT_FULL_RESOLV_CONF extern int __dns_search; extern char *__dns_domains[]; @@ -33,3 +35,4 @@ } return res; } +#endif diff -uNr dietlibc-0.27/libcruft/setlocale.c dietlibc-0.28/libcruft/setlocale.c --- dietlibc-0.27/libcruft/setlocale.c Mon Sep 22 19:48:56 2003 +++ dietlibc-0.28/libcruft/setlocale.c Fri Aug 13 16:03:30 2004 @@ -2,6 +2,6 @@ char *setlocale (int category, const char *locale) { (void)category; - if (locale) return 0; + if (locale && (locale[0]!='C' || locale[1])) return 0; return "C"; } diff -uNr dietlibc-0.27/libcrypt/CVS/Entries dietlibc-0.28/libcrypt/CVS/Entries --- dietlibc-0.27/libcrypt/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libcrypt/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,4 @@ +/crypt.c/1.7/Sat Feb 23 21:08:27 2002// +/md5.c/1.15/Tue Feb 26 15:40:18 2002// +/md5crypt.c/1.2/Sat Feb 23 22:18:43 2002// +D diff -uNr dietlibc-0.27/libcrypt/CVS/Repository dietlibc-0.28/libcrypt/CVS/Repository --- dietlibc-0.27/libcrypt/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libcrypt/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/libcrypt diff -uNr dietlibc-0.27/libcrypt/CVS/Root dietlibc-0.28/libcrypt/CVS/Root --- dietlibc-0.27/libcrypt/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libcrypt/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/libdl/CVS/Entries dietlibc-0.28/libdl/CVS/Entries --- dietlibc-0.27/libdl/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libdl/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,20 @@ +/Makefile/1.14/Fri Dec 17 20:37:28 2004// +/README/1.10/Fri Nov 15 15:39:17 2002// +/_dl_alloc.c/1.14/Mon Mar 11 19:21:11 2002// +/_dl_int.h/1.39/Sat Jan 29 02:29:16 2005// +/_dl_jump.S/1.11/Mon Mar 4 16:18:13 2002// +/_dl_load.c/1.23/Fri Aug 30 12:25:06 2002// +/_dl_main.c/1.28/Sat Jan 29 02:29:16 2005// +/_dl_open.c/1.19/Mon Mar 11 19:21:12 2002// +/_dl_queue.c/1.7/Wed Sep 10 13:10:16 2003// +/_dl_rel.c/1.7/Mon Mar 11 19:21:12 2002// +/_dl_rel.h/1.4/Sat Jan 29 02:34:22 2005// +/_dl_relocate.c/1.27/Sat Jan 29 02:29:16 2005// +/_dl_search.c/1.15/Mon Mar 11 19:21:12 2002// +/dladdr.c/1.1/Fri Dec 17 19:33:50 2004// +/dlclose.c/1.15/Fri Dec 17 19:14:49 2004// +/dlerror.c/1.7/Fri Sep 13 14:37:21 2002// +/dlopen.c/1.13/Fri Nov 8 09:10:35 2002// +/dlsym.c/1.22/Sat Jan 29 02:29:16 2005// +/elf_hash.h/1.3/Sat Jan 29 02:29:16 2005// +D diff -uNr dietlibc-0.27/libdl/CVS/Entries.Log dietlibc-0.28/libdl/CVS/Entries.Log --- dietlibc-0.27/libdl/CVS/Entries.Log Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libdl/CVS/Entries.Log Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +A D/test//// diff -uNr dietlibc-0.27/libdl/CVS/Repository dietlibc-0.28/libdl/CVS/Repository --- dietlibc-0.27/libdl/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libdl/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/libdl diff -uNr dietlibc-0.27/libdl/CVS/Root dietlibc-0.28/libdl/CVS/Root --- dietlibc-0.27/libdl/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libdl/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/libdl/Makefile dietlibc-0.28/libdl/Makefile --- dietlibc-0.27/libdl/Makefile Wed Feb 19 14:18:40 2003 +++ dietlibc-0.28/libdl/Makefile Fri Dec 17 21:37:28 2004 @@ -7,7 +7,9 @@ OBJ = _dl_jump.o $(SRC:.c=.o) #CFLAGS = -Wall -D__OD_CLEAN_ROOM -DNODIETREF -fPIC -g -O -CFLAGS = -Wall -O2 -D__OD_CLEAN_ROOM -DNODIETREF -fPIC -frerun-loop-opt -fschedule-insns2 $(DEB) # -fomit-frame-pointer +#CFLAGS = -Wall -O2 -Bsymbolic -D__OD_CLEAN_ROOM -DNODIETREF -fPIC -frerun-loop-opt -fschedule-insns2 $(DEB) +CFLAGS = -Wall -g -O -I.. -isystem ../include -Bsymbolic -D__OD_CLEAN_ROOM -DNODIETREF -fPIC -frerun-loop-opt -fschedule-insns2 $(DEB) +# -fomit-frame-pointer %.o : %.S $(DCC) $(CFLAGS) -c -o $@ $^ @@ -21,7 +23,7 @@ $(CROSS)gcc -O -g test/a.c t.out -L/opt/diet/lib-i386 -lc -lgcc -o $@ -Wl,-dynamic-linker=`pwd`/t.out -nostdlib t.out: _dl_main.o - $(CROSS)ld -shared -o $@ $? -soname=libdl.so + $(CROSS)ld -shared -o $@ $? -soname=libdl.so -Bsymbolic all: test.out libdl.a diff -uNr dietlibc-0.27/libdl/_dl_int.h dietlibc-0.28/libdl/_dl_int.h --- dietlibc-0.27/libdl/_dl_int.h Wed Feb 19 21:16:01 2003 +++ dietlibc-0.28/libdl/_dl_int.h Sat Jan 29 03:29:16 2005 @@ -1,6 +1,10 @@ #ifndef ___DL_INT_H__ #define ___DL_INT_H__ +//#define DEBUG + +#include "dietfeatures.h" + #if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) #define ELF_CLASS ELFCLASS64 #else @@ -8,6 +12,7 @@ #endif #include +#define _GNU_SOURCE #include #include "_dl_rel.h" @@ -48,15 +53,6 @@ #endif -//#define DEBUG -#ifdef DEBUG -#ifndef __DIET_LD_SO__ -#include -#define pf(s) write(2,s,strlen(s)) -#define ph(l) fdprintf(2,"%08lx",(l)) -#endif -#endif - #define RTLD_USER 0x10000000 #define RTLD_NOSONAME 0x20000000 #define LDSO_FLAGS (RTLD_LAZY|RTLD_GLOBAL|RTLD_NOSONAME) @@ -83,7 +79,7 @@ unsigned long*pltgot; /* PLT/GOT */ /* symbol resolve helper */ - unsigned long*hash_tab; /* hash table */ + unsigned int*hash_tab; /* hash table */ char * dyn_str_tab; /* dyn_name table */ Elf_Sym * dyn_sym_tab; /* dynamic symbol table */ _dl_rel_t* plt_rel; /* PLT relocation table */ @@ -97,14 +93,17 @@ struct r_debug { int r_version; struct _dl_handle* r_map; - unsigned long r_brk; + void(*r_brk)(); enum { RT_CONSISTENT, /* mapping complete */ RT_ADD, /* begin add object */ RT_DELETE, /* begin del object */ } r_state; - unsigned long r_ldbase; + Elf_Addr r_ldbase; }; +#ifdef WANT_LD_SO_GDB_SUPPORT +extern struct r_debug _r_debug; +#endif #define HASH_BUCKET_LEN(p) (*((p))) #define HASH_BUCKET(p) ((p)+2) @@ -134,9 +133,10 @@ int _dl_search(char *buf, int len, const char *filename); /* dlsym.c */ -void *_dlsym(void*dh,char*symbol); -void *_dl_sym_search_str(struct _dl_handle*h,char*name); +void *_dlsym(void*dh,const char*symbol); +void *_dl_sym_search_str(struct _dl_handle*h,const char*name); void *_dl_sym(struct _dl_handle * h, int symbol); +void *_dl_sym_next(struct _dl_handle * h, int symbol); /* _dl_queue.c */ int _dl_queue_lib(const char* name, int flags); diff -uNr dietlibc-0.27/libdl/_dl_main.c dietlibc-0.28/libdl/_dl_main.c --- dietlibc-0.27/libdl/_dl_main.c Wed Sep 10 15:10:16 2003 +++ dietlibc-0.28/libdl/_dl_main.c Sat Jan 29 03:29:16 2005 @@ -50,6 +50,11 @@ extern char*strdup(const char*s); extern void free(void*p); +__attribute__((visibility("hidden"))) +unsigned long _dl_main(int argc,char*argv[],char*envp[],unsigned long _dynamic); +__attribute__((visibility("hidden"))) +unsigned long do_resolve(struct _dl_handle*dh,unsigned long off); + #if defined(__i386__) asm(".text \n" @@ -180,26 +185,14 @@ #warning "x86_64 is not tested yet..." -static unsigned long*x86_64__got=0; -static unsigned long __start=(unsigned long)&_start; - asm(".text \n" ".type _start,@function \n" "_start: \n" " movq %rsp,%rbp # save stack \n" " movq (%rbp), %rdi # argc \n" -" leaq 4(%rbp),%rsi # argv \n" +" leaq 8(%rbp),%rsi # argv \n" " leaq 8(%rsi,%rdi,8),%rdx # envp \n" -/* get 'relocated' address of _DYNAMIC */ -" leaq _DYNAMIC@GOTPCREL(%rip), %rcx \n" -" subq _DYNAMIC@GOT, %rcx \n" -" movq %rcx, x86_64__got(%rip) # save got address \n" -" movq (%rcx), %rcx \n" -/* %rcx still needs the load-address added... */ -" leaq _start(%rip), %r8 # relocated _start address \n" -" subq __start(%rip), %r8 # unrelocated _start address \n" -//" movq %r8, __loadaddr(%rip) # save base address \n" -" addq %r8, %rcx \n" +" leaq _DYNAMIC(%rip), %rcx # relocated address of _DYNAMIC \n" /* call _dl_main */ " call _dl_main \n" /* restore stack */ @@ -290,7 +283,9 @@ ); static inline unsigned long* get_got(void) { - return x86_64__got; + unsigned long*ret; + asm("lea _GLOBAL_OFFSET_TABLE_(%%rip),%0" : "=r"(ret) ); + return ret; } static inline int work_on_pltgot(struct _dl_handle*dh) { @@ -665,22 +660,23 @@ return ret; } -#ifdef __GDB_SUPPORT__ -volatile void _dl_debug_state(void); +#ifdef WANT_LD_SO_GDB_SUPPORT /* gdb debug break point */ -void _dl_debug_state() {} - -/* gdb debug init stuff */ -struct r_debug _r_debug; -static struct r_debug* _dl_debug_init(Elf_Addr dl_base) { - if (_r_debug.r_brk==0) { - _r_debug.r_version = 1; - _r_debug.r_ldbase = dl_base; - _r_debug.r_map = _dl_root_handle; /* this my be wrong */ - _r_debug.r_brk = (Elf_Addr)&_dl_debug_state; +static volatile void _dl_debug_state(void) { +#ifdef DEBUG + struct _dl_handle*tmp; + pf(__FUNCTION__); pf(": r_state "); ph(_r_debug.r_state); pf("\n"); + for (tmp=_r_debug.r_map;tmp;tmp=tmp->next) { + pf("link_map "); ph((unsigned long)tmp); + pf(" l_addr "); ph((unsigned long)tmp->mem_base); + pf(" l_name "); pf(tmp->l_name ? tmp->l_name : ""); + pf(" l_ld "); ph((unsigned long)tmp->dynamic); pf("\n"); } - return &_r_debug; +#endif } + +/* gdb debug init stuff */ +static struct r_debug _r_debug; #endif /* now reuse some unchanged sources */ @@ -688,6 +684,7 @@ #include "_dl_alloc.c" #include "dlsym.c" +#include "dladdr.c" #include "_dl_search.c" @@ -713,7 +710,7 @@ static void _DIE_() { _dl_sys_exit(213); } /* lazy function resolver */ -static unsigned long do_resolve(struct _dl_handle*dh,unsigned long off) { +unsigned long do_resolve(struct _dl_handle*dh,unsigned long off) { _dl_rel_t *tmp = ((void*)dh->plt_rel)+off; int sym=ELF_R_SYM(tmp->r_info); register unsigned long sym_val; @@ -768,7 +765,6 @@ Elf_Phdr*ld[4]={0,0,0,0}; Elf_Phdr*dyn=0; - if (0) { pathname=0; } /* no unused parameter */ if (fd==-1) return 0; if (_dl_sys_fstat(fd,&st)<0) { @@ -866,10 +862,13 @@ if (ret) { ++ret->lnk_count; - if (flags&RTLD_USER) + if (flags&RTLD_USER) { + ret->l_name=strdup(pathname); ret->name=strdup(fn); - else + } else { + ret->l_name=_dl_lib_strdup(pathname); ret->name=_dl_lib_strdup(fn); + } ret->flags=flags; ret->dynamic=(Elf_Dyn*)(m+dyn->p_vaddr); } @@ -968,18 +967,21 @@ /* BASIC RELOCATION */ case DT_REL: + case DT_RELA: rel = (_dl_rel_t*)(dh->mem_base+_dynamic[i].d_un.d_val); #ifdef DEBUG pf(__FUNCTION__); pf(": have rel @ "); ph((long)rel); pf("\n"); #endif break; case DT_RELENT: + case DT_RELAENT: relent=_dynamic[i].d_un.d_val; #ifdef DEBUG pf(__FUNCTION__); pf(": have relent @ "); ph((long)relent); pf("\n"); #endif break; case DT_RELSZ: + case DT_RELASZ: relsize=_dynamic[i].d_un.d_val; #ifdef DEBUG pf(__FUNCTION__); pf(": have relsize @ "); ph((long)relsize); pf("\n"); @@ -1081,7 +1083,7 @@ #ifdef DEBUG pf(__FUNCTION__); pf(": rel plt/got\n"); #endif - for(tmp=plt_rel;tmpflags&RTLD_NOW)) { unsigned long sym=(unsigned long)_dl_sym(dh,ELF_R_SYM(tmp->r_info)); if (sym) *((unsigned long*)(dh->mem_base+tmp->r_offset))=sym; @@ -1116,6 +1118,14 @@ struct _dl_handle*ret=0; if ((ret=_dl_map_lib(fn,pathname,fd,flags))) { ret=_dl_dyn_scan(ret,ret->dynamic); +#ifdef WANT_LD_SO_GDB_SUPPORT + if (ret) { + _r_debug.r_state=RT_ADD; + _dl_debug_state(); + _r_debug.r_state=RT_CONSISTENT; + _dl_debug_state(); + } +#endif } return ret; } @@ -1252,7 +1262,7 @@ /* start of libdl dynamic linker */ -static unsigned long _dl_main(int argc,char*argv[],char*envp[],unsigned long _dynamic) { +unsigned long _dl_main(int argc,char*argv[],char*envp[],unsigned long _dynamic) { unsigned long*got; struct _dl_handle*prog,*mydh; struct _dl_handle my_dh; @@ -1277,6 +1287,7 @@ my_dh.mem_base=(char*)loadaddr; my_dh.mem_size=0; my_dh.lnk_count=1024; + my_dh.l_name=0; /* filled in later from PT_INTERP */ my_dh.name="libdl.so"; my_dh.flags=LDSO_FLAGS; @@ -1318,7 +1329,9 @@ for(i=0;(il_name=(char*)prog_ph[i].p_vaddr; } } if (prog_dynamic==0) { @@ -1326,6 +1339,7 @@ pf(" error with program: no dynamic section ?\n"); return (unsigned long)_DIE_; } + prog->l_name=0; prog->name=0; prog->lnk_count=1024; prog->dynamic=prog_dynamic; @@ -1340,6 +1354,24 @@ return (unsigned long)_DIE_; } +#ifdef WANT_LD_SO_GDB_SUPPORT + _r_debug.r_version=1; + _r_debug.r_map=_dl_root_handle; + _r_debug.r_brk=(void*)&_dl_debug_state; + _r_debug.r_state=RT_CONSISTENT; + _r_debug.r_ldbase=loadaddr; + if (prog_dynamic) { + for (i=0;prog_dynamic[i].d_tag;++i) + if (prog_dynamic[i].d_tag==DT_DEBUG) { + prog_dynamic[i].d_un.d_ptr=(Elf_Addr)&_r_debug; +#ifdef DEBUG + pf(__FUNCTION__); pf(": set DT_DEBUG @ "); ph(prog_dynamic[i].d_un.d_val); pf("\n"); +#endif + } + } + _dl_debug_state(); +#endif + /* now start the program */ #ifdef DEBUG pf(__FUNCTION__); pf(": now jump to program entrypoint\n"); diff -uNr dietlibc-0.27/libdl/_dl_rel.h dietlibc-0.28/libdl/_dl_rel.h --- dietlibc-0.27/libdl/_dl_rel.h Wed Feb 19 14:18:40 2003 +++ dietlibc-0.28/libdl/_dl_rel.h Sat Jan 29 03:34:22 2005 @@ -16,7 +16,8 @@ #define _dl_rel_t Elf_Rela #define _DL_REL_T DT_RELA -#define _DL_REL_PLT(b,r) (*(unsigned long*)((b)+(r)->r_offset)=(unsigned long)((b)+(r)->r_addend)) +#define _DL_REL_PLT(b,r) (*(unsigned long*)((b)+(r)->r_offset)+=(unsigned long)(b)) +//#define _DL_REL_PLT(b,r) (*(unsigned long*)((b)+(r)->r_offset)=(unsigned long)((b)+(r)->r_addend)) #else /* there are no known linux supported arch with mixed relocation types ... */ diff -uNr dietlibc-0.27/libdl/_dl_relocate.c dietlibc-0.28/libdl/_dl_relocate.c --- dietlibc-0.27/libdl/_dl_relocate.c Wed Feb 19 14:18:40 2003 +++ dietlibc-0.28/libdl/_dl_relocate.c Sat Jan 29 03:29:16 2005 @@ -48,11 +48,12 @@ if (typ==R_386_32) { /* 1 */ *loc=(unsigned long)(dh->mem_base+dh->dyn_sym_tab[ELF_R_SYM(rel->r_info)].st_value); } else if (typ==R_386_COPY) { /* 5 */ - int len=dh->dyn_sym_tab[ELF_R_SYM(rel->r_info)].st_size; + unsigned long len=dh->dyn_sym_tab[ELF_R_SYM(rel->r_info)].st_size; + void*from=_dl_sym_next(dh,ELF_R_SYM(rel->r_info)); #ifdef DEBUG - pf(__FUNCTION__); pf(": R_386_COPY !\n"); + pf(__FUNCTION__); pf(": R_386_COPY from "); ph((unsigned long)from); pf("\n"); #endif - memcpy(loc,(void*)(unsigned long)_dl_sym(dh,ELF_R_SYM(rel->r_info)),len); + memcpy(loc,from,len); } else if (typ==R_386_GLOB_DAT) { /* 6 */ *loc=(unsigned long)_dl_sym(dh,ELF_R_SYM(rel->r_info)); } else if (typ==R_386_JMP_SLOT) { /* 7 */ @@ -67,11 +68,12 @@ if (typ==R_ARM_ABS32) { /* 2 */ *loc=(unsigned long)(dh->mem_base+dh->dyn_sym_tab[ELF_R_SYM(rel->r_info)].st_value); } else if (typ==R_ARM_COPY) { /* 20 */ - int len=dh->dyn_sym_tab[ELF_R_SYM(rel->r_info)].st_size; + unsigned long len=dh->dyn_sym_tab[ELF_R_SYM(rel->r_info)].st_size; + void*from=_dl_sym_next(dh,ELF_R_SYM(rel->r_info)); #ifdef DEBUG - pf(__FUNCTION__); pf(": R_ARM_COPY !\n"); + pf(__FUNCTION__); pf(": R_ARM_COPY from "); ph((unsigned long)from); pf("\n"); #endif - memcpy(loc,(void*)(unsigned long)_dl_sym(dh,ELF_R_SYM(rel->r_info)),len); + memcpy(loc,from,len); } else if (typ==R_ARM_GLOB_DAT) { /* 21 */ *loc=(unsigned long)_dl_sym(dh,ELF_R_SYM(rel->r_info)); } else if (typ==R_ARM_JUMP_SLOT) { /* 22 */ @@ -82,6 +84,28 @@ } else ret=1; #endif +#ifdef __x86_64__ + if (typ==R_X86_64_64) { /* 1 */ + *loc=(unsigned long)(dh->mem_base+dh->dyn_sym_tab[ELF_R_SYM(rel->r_info)].st_value); + } else if (typ==R_X86_64_COPY) { /* 5 */ + unsigned long len=dh->dyn_sym_tab[ELF_R_SYM(rel->r_info)].st_size; + void*from=_dl_sym_next(dh,ELF_R_SYM(rel->r_info)); +#ifdef DEBUG + pf(__FUNCTION__); pf(": R_X86_64_COPY from "); ph((unsigned long)from); pf("\n"); +#endif + memcpy(loc,from,len); + } else if (typ==R_X86_64_GLOB_DAT) { /* 6 */ + *loc=(unsigned long)_dl_sym(dh,ELF_R_SYM(rel->r_info)); + } else if (typ==R_X86_64_JUMP_SLOT) { /* 7 */ + *loc=((unsigned long)dh->mem_base)+rel->r_addend; + } else if (typ==R_X86_64_RELATIVE) { /* 8 */ + *loc=((unsigned long)dh->mem_base)+rel->r_addend; + } else if (typ==R_X86_64_32) { /* 10 */ + *loc=((unsigned long)(dh->mem_base+dh->dyn_sym_tab[ELF_R_SYM(rel->r_info)].st_value))&0xffffffffUL; + } else if (typ==R_X86_64_NONE) { /* 0 */ + } else + ret=1; +#endif #ifdef DEBUG pf(__FUNCTION__); pf(": @ "); ph((unsigned long)loc); pf(" val "); ph(*(unsigned long*)loc); pf("\n"); diff -uNr dietlibc-0.27/libdl/dladdr.c dietlibc-0.28/libdl/dladdr.c --- dietlibc-0.27/libdl/dladdr.c Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libdl/dladdr.c Fri Dec 17 20:33:50 2004 @@ -0,0 +1,39 @@ +#include "_dl_int.h" + +static struct _dl_handle*_dl_addr_search_dh(char*addr) +{ + struct _dl_handle*bestdh,*dh; + for (bestdh=0,dh=_dl_root_handle;dh;dh=dh->next) + if (dh->mem_base<=(char*)addr && + (!bestdh||bestdh->mem_basemem_base)) + bestdh=dh; + return bestdh; +} + +static Elf_Sym*_dl_addr_search_sym(struct _dl_handle*dh,char*addr) +{ + Elf_Sym*bestsym,*sym; + /* we assume the string table follows the symbol table (so does glibc) */ + for (bestsym=0,sym=dh->dyn_sym_tab;(char*)symdyn_str_tab;++sym) + if (dh->mem_base+sym->st_value<=addr && + (!bestsym||bestsym->st_valuest_value)) + bestsym=sym; + return bestsym; +} + +int dladdr(void *addr, Dl_info *info) { + struct _dl_handle*dh; + dh=_dl_addr_search_dh((char*)addr); + if (dh) { + Elf_Sym*sym; + sym=_dl_addr_search_sym(dh,(char*)addr); + if (sym) { + info->dli_fname=dh->l_name; + info->dli_fbase=dh->mem_base; + info->dli_sname=dh->dyn_str_tab+sym->st_name; + info->dli_saddr=dh->mem_base+sym->st_value; + return 1; + } + } + return 0; +} diff -uNr dietlibc-0.27/libdl/dlclose.c dietlibc-0.28/libdl/dlclose.c --- dietlibc-0.27/libdl/dlclose.c Wed Nov 6 20:03:50 2002 +++ dietlibc-0.28/libdl/dlclose.c Fri Dec 17 20:14:49 2004 @@ -33,6 +33,12 @@ if (munmap(dh->mem_base,dh->mem_size)==-1) return -1; #endif _dl_free_handle(handle); +#ifdef WANT_LD_SO_GDB_SUPPORT + _r_debug.r_state=RT_DELETE; + _dl_debug_state(); + _r_debug.r_state=RT_CONSISTENT; + _dl_debug_state(); +#endif } return 0; } diff -uNr dietlibc-0.27/libdl/dlsym.c dietlibc-0.28/libdl/dlsym.c --- dietlibc-0.27/libdl/dlsym.c Fri Jan 30 19:27:32 2004 +++ dietlibc-0.28/libdl/dlsym.c Sat Jan 29 03:29:16 2005 @@ -9,10 +9,10 @@ unsigned long*sym=0; if (handle) { struct _dl_handle*dh=(struct _dl_handle*)handle; - unsigned long hash =elf_hash(symbol); - unsigned long bhash=hash%HASH_BUCKET_LEN(dh->hash_tab); - unsigned long*chain=HASH_CHAIN(dh->hash_tab); - unsigned long ind; + unsigned int hash =elf_hash(symbol); + unsigned int bhash=hash%HASH_BUCKET_LEN(dh->hash_tab); + unsigned int*chain=HASH_CHAIN(dh->hash_tab); + unsigned int ind; char *name=dh->dyn_str_tab; #ifdef DEBUG @@ -27,10 +27,10 @@ while(ind) { int ptr=dh->dyn_sym_tab[ind].st_name; #ifdef DEBUG -// pf(__FUNCTION__); pf(": symbol(\""); pf(name+ptr); pf("\",\"); pf(symbol); pf("\")\n"); +// pf(__FUNCTION__); pf(": symbol(\""); pf(name+ptr); pf("\",\""); pf(symbol); pf("\")\n"); #endif - if (strcmp(name+ptr,symbol)==0) { - if (ELF_ST_TYPE(dh->dyn_sym_tab[ind].st_shndx)!=0) { + if (strcmp(name+ptr,symbol)==0 && dh->dyn_sym_tab[ind].st_value!=0) { + if (dh->dyn_sym_tab[ind].st_shndx!=SHN_UNDEF) { sym=(long*)(dh->mem_base+dh->dyn_sym_tab[ind].st_value); break; /* ok found ... */ } @@ -47,13 +47,13 @@ #ifdef __DIET_LD_SO__ static #endif -void*_dl_sym_search_str(struct _dl_handle*dh,char*name) { +void*_dl_sym_search_str(struct _dl_handle*dh_begin,const char*name) { void *sym=0; struct _dl_handle*tmp; #ifdef DEBUG pf(__FUNCTION__); pf(": search for: "); pf(name); pf("\n"); #endif - for (tmp=_dl_root_handle;tmp && (!sym);tmp=tmp->next) { + for (tmp=dh_begin;tmp && (!sym);tmp=tmp->next) { // if (!(tmp->flags&RTLD_GLOBAL)) continue; #ifdef DEBUG pf(__FUNCTION__); pf(": searching in "); pf(tmp->name); pf("\n"); @@ -71,7 +71,19 @@ #endif void*_dl_sym(struct _dl_handle*dh,int symbol) { char *name=dh->dyn_str_tab+dh->dyn_sym_tab[symbol].st_name; - void*sym=_dl_sym_search_str(dh,name); + void*sym=_dl_sym_search_str(_dl_root_handle,name); +#ifdef DEBUG + pf(__FUNCTION__); pf(": "); ph(symbol); pf(" -> "); ph((long)sym); pf("\n"); +#endif + return sym; +} + +#ifdef __DIET_LD_SO__ +static +#endif +void*_dl_sym_next(struct _dl_handle*dh,int symbol) { + char *name=dh->dyn_str_tab+dh->dyn_sym_tab[symbol].st_name; + void*sym=_dl_sym_search_str(dh->next,name); #ifdef DEBUG pf(__FUNCTION__); pf(": "); ph(symbol); pf(" -> "); ph((long)sym); pf("\n"); #endif diff -uNr dietlibc-0.27/libdl/elf_hash.h dietlibc-0.28/libdl/elf_hash.h --- dietlibc-0.27/libdl/elf_hash.h Mon Jan 14 18:25:15 2002 +++ dietlibc-0.28/libdl/elf_hash.h Sat Jan 29 03:29:16 2005 @@ -1,10 +1,10 @@ -static unsigned long elf_hash(const unsigned char *name) { - unsigned long h=0, g; +static unsigned int elf_hash(const unsigned char *name) { + unsigned int h=0, g; while (*name) { h = (h<<4) + *(name++); if ((g = h&0xf0000000)) h ^= g>>24; - h &= ~g; + h ^= g; } return h; } diff -uNr dietlibc-0.27/libdl/test/CVS/Entries dietlibc-0.28/libdl/test/CVS/Entries --- dietlibc-0.27/libdl/test/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libdl/test/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,3 @@ +/test.c/1.1/Thu Jun 21 14:28:02 2001// +/test_so.c/1.1/Thu Jun 21 14:28:02 2001// +D diff -uNr dietlibc-0.27/libdl/test/CVS/Repository dietlibc-0.28/libdl/test/CVS/Repository --- dietlibc-0.27/libdl/test/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libdl/test/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/libdl/test diff -uNr dietlibc-0.27/libdl/test/CVS/Root dietlibc-0.28/libdl/test/CVS/Root --- dietlibc-0.27/libdl/test/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libdl/test/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/liblatin1/CVS/Entries dietlibc-0.28/liblatin1/CVS/Entries --- dietlibc-0.27/liblatin1/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/liblatin1/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,6 @@ +/latin1-iscntrl.c/1.2/Mon Jan 21 15:30:19 2002// +/latin1-isgraph.c/1.4/Sun Sep 14 23:29:03 2003// +/latin1-islower.c/1.3/Sun Sep 14 23:29:03 2003// +/latin1-isprint.c/1.4/Tue Aug 19 17:13:46 2003// +/latin1-isupper.c/1.2/Mon Jan 21 15:30:19 2002// +D diff -uNr dietlibc-0.27/liblatin1/CVS/Repository dietlibc-0.28/liblatin1/CVS/Repository --- dietlibc-0.27/liblatin1/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/liblatin1/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/liblatin1 diff -uNr dietlibc-0.27/liblatin1/CVS/Root dietlibc-0.28/liblatin1/CVS/Root --- dietlibc-0.27/liblatin1/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/liblatin1/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/libm/CVS/Entries dietlibc-0.28/libm/CVS/Entries --- dietlibc-0.27/libm/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libm/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,15 @@ +/acosh.c/1.1/Fri Jul 27 20:30:34 2001// +/asinh.c/1.1/Fri Jul 27 20:30:34 2001// +/atanh.c/1.1/Fri Jul 27 20:30:34 2001// +/bessel.c/1.3/Mon Nov 18 01:16:51 2002// +/cosh.c/1.1/Fri Jul 27 20:30:34 2001// +/erf.c/1.2/Mon Nov 18 01:16:51 2002// +/gamma.c/1.2/Mon Nov 18 01:16:51 2002// +/ipow.c/1.2/Mon Mar 4 18:25:54 2002// +/modf.c/1.1/Sun Mar 30 19:19:53 2003// +/poly.c/1.2/Mon Nov 18 01:16:51 2002// +/pow.c/1.4/Fri Oct 10 13:37:34 2003// +/rint.c/1.2/Mon Jul 30 13:45:43 2001// +/sinh.c/1.1/Fri Jul 27 20:30:34 2001// +/tanh.c/1.1/Fri Jul 27 20:30:34 2001// +D diff -uNr dietlibc-0.27/libm/CVS/Repository dietlibc-0.28/libm/CVS/Repository --- dietlibc-0.27/libm/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libm/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/libm diff -uNr dietlibc-0.27/libm/CVS/Root dietlibc-0.28/libm/CVS/Root --- dietlibc-0.27/libm/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libm/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/libpthread/CVS/Entries dietlibc-0.28/libpthread/CVS/Entries --- dietlibc-0.27/libpthread/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libpthread/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,88 @@ +/.cvsignore/1.1/Mon Aug 18 17:32:52 2003// +/CHANGES/1.10/Wed Sep 17 15:06:10 2003// +/Makefile/1.15/Mon Aug 18 17:32:52 2003// +/README/1.6/Mon Aug 18 17:32:52 2003// +/pthread_atfork.c/1.6/Mon Aug 18 17:32:52 2003// +/pthread_attr_getdetachstate.c/1.3/Mon Aug 18 17:32:52 2003// +/pthread_attr_getinheritsched.c/1.3/Mon Aug 18 17:32:52 2003// +/pthread_attr_getschedparam.c/1.3/Mon Aug 18 17:32:52 2003// +/pthread_attr_getschedpolicy.c/1.3/Mon Aug 18 17:32:52 2003// +/pthread_attr_getscope.c/1.3/Mon Aug 18 17:32:52 2003// +/pthread_attr_getstackaddr.c/1.3/Mon Aug 18 17:32:52 2003// +/pthread_attr_getstacksize.c/1.2/Mon Aug 18 17:32:52 2003// +/pthread_attr_setdetachstate.c/1.4/Mon Aug 18 17:32:52 2003// +/pthread_attr_setinheritsched.c/1.4/Mon Aug 18 17:32:52 2003// +/pthread_attr_setschedparam.c/1.5/Mon Aug 18 17:32:52 2003// +/pthread_attr_setschedpolicy.c/1.4/Mon Aug 18 17:32:52 2003// +/pthread_attr_setscope.c/1.4/Mon Aug 18 17:32:52 2003// +/pthread_attr_setstackaddr.c/1.3/Mon Aug 18 17:32:52 2003// +/pthread_attr_setstacksize.c/1.3/Mon Aug 18 17:32:52 2003// +/pthread_cleanup.c/1.1/Mon Aug 18 17:32:52 2003// +/pthread_cond_broadcast.c/1.3/Mon Aug 18 17:32:52 2003// +/pthread_cond_destroy.c/1.4/Mon Aug 18 17:32:52 2003// +/pthread_cond_init.c/1.3/Mon Aug 18 17:32:52 2003// +/pthread_cond_signal.c/1.4/Mon Sep 8 11:49:10 2003// +/pthread_cond_timedwait.c/1.5/Mon Aug 18 17:32:52 2003// +/pthread_cond_wait.c/1.3/Mon Aug 18 17:32:52 2003// +/pthread_condattr_getshared.c/1.1/Mon Aug 18 17:32:53 2003// +/pthread_condattr_setshared.c/1.1/Mon Aug 18 17:32:53 2003// +/pthread_create.c/1.12/Wed Sep 17 15:06:10 2003// +/pthread_detach.c/1.3/Mon Aug 18 17:32:53 2003// +/pthread_dns_cruft.c/1.1/Mon Aug 18 17:32:53 2003// +/pthread_equal.c/1.2/Mon Aug 18 17:32:53 2003// +/pthread_errno.c/1.1/Sat Jun 9 17:45:50 2001// +/pthread_fdglue2.c/1.6/Sun Sep 14 04:40:37 2003// +/pthread_fflush.c/1.1/Tue Nov 4 18:09:42 2003// +/pthread_fgetc.c/1.1/Thu May 10 16:22:53 2001// +/pthread_flockfile.c/1.2/Thu Jul 26 16:08:10 2001// +/pthread_fputc.c/1.2/Mon Jul 9 13:54:07 2001// +/pthread_ftrylockfile.c/1.1/Sat Jan 3 02:17:32 2004// +/pthread_funlockfile.c/1.3/Thu Jul 26 16:08:10 2001// +/pthread_internal.c/1.17/Mon Jun 7 17:05:03 2004// +/pthread_join.c/1.4/Mon Sep 29 14:00:59 2003// +/pthread_key.c/1.5/Mon Sep 29 14:00:59 2003// +/pthread_kill.c/1.1/Mon Aug 18 17:32:53 2003// +/pthread_mutex_destroy.c/1.5/Mon Aug 18 17:32:53 2003// +/pthread_mutex_init.c/1.5/Mon Aug 18 17:32:53 2003// +/pthread_mutex_lock.c/1.6/Tue Nov 11 18:27:41 2003// +/pthread_mutex_trylock.c/1.5/Mon Aug 18 17:32:53 2003// +/pthread_mutex_unlock.c/1.6/Tue Nov 11 18:27:41 2003// +/pthread_mutexattr_getkind_np.c/1.2/Mon Aug 18 17:32:53 2003// +/pthread_mutexattr_init.c/1.2/Mon Aug 18 17:32:53 2003// +/pthread_mutexattr_setkind_np.c/1.3/Mon Aug 18 17:32:53 2003// +/pthread_self.c/1.4/Mon Aug 18 17:32:53 2003// +/pthread_semaphore_destroy.c/1.1/Wed Sep 17 15:06:10 2003// +/pthread_semaphore_getvalue.c/1.1/Wed Sep 17 15:06:10 2003// +/pthread_semaphore_init.c/1.1/Wed Sep 17 15:06:10 2003// +/pthread_semaphore_misc.c/1.1/Wed Sep 17 15:06:10 2003// +/pthread_semaphore_post.c/1.1/Wed Sep 17 15:06:10 2003// +/pthread_semaphore_trywait.c/1.1/Wed Sep 17 15:06:10 2003// +/pthread_semaphore_wait.c/1.1/Wed Sep 17 15:06:10 2003// +/pthread_setcancelstate.c/1.4/Mon Aug 18 17:32:53 2003// +/pthread_setschedparam.c/1.4/Mon Aug 18 17:32:53 2003// +/pthread_sigaction.c/1.1/Mon Aug 18 17:32:53 2003// +/pthread_sigmask.c/1.3/Mon Aug 18 17:32:53 2003// +/pthread_spinlock.c/1.6/Mon Aug 18 17:32:53 2003// +/pthread_sys_alloc.c/1.9/Tue Nov 11 18:27:41 2003// +/pthread_sys_close.c/1.2/Mon Aug 18 17:32:53 2003// +/pthread_sys_create.c/1.2/Mon Aug 18 17:32:53 2003// +/pthread_sys_fcntl.c/1.3/Mon Aug 18 17:32:53 2003// +/pthread_sys_fdatasync.c/1.2/Mon Aug 18 17:32:53 2003// +/pthread_sys_fsync.c/1.2/Mon Aug 18 17:32:53 2003// +/pthread_sys_logging.c/1.4/Mon Aug 18 17:32:53 2003// +/pthread_sys_msync.c/1.1/Mon Aug 18 17:32:53 2003// +/pthread_sys_nanosleep.c/1.2/Mon Aug 18 17:32:53 2003// +/pthread_sys_open.c/1.4/Mon Aug 18 17:32:53 2003// +/pthread_sys_pause.c/1.2/Mon Aug 18 17:32:53 2003// +/pthread_sys_read.c/1.2/Mon Aug 18 17:32:53 2003// +/pthread_sys_sigsuspend.c/1.2/Mon Aug 18 17:32:53 2003// +/pthread_sys_sleep.c/1.1/Mon Aug 18 17:32:53 2003// +/pthread_sys_tcdrain.c/1.4/Mon Aug 18 17:32:53 2003// +/pthread_sys_waitpid.c/1.3/Mon Aug 18 17:32:53 2003// +/pthread_sys_write.c/1.2/Mon Aug 18 17:32:53 2003// +/test-basic.c/1.2/Mon Sep 29 14:00:59 2003// +/test-threads_busy.c/1.1/Mon Aug 18 17:32:53 2003// +/test-threads_busy_inc.c/1.1/Mon Aug 18 17:32:53 2003// +/test-threads_many.c/1.2/Mon Sep 29 14:00:59 2003// +/thread_internal.h/1.28/Tue Nov 11 18:27:41 2003// +D diff -uNr dietlibc-0.27/libpthread/CVS/Repository dietlibc-0.28/libpthread/CVS/Repository --- dietlibc-0.27/libpthread/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libpthread/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/libpthread diff -uNr dietlibc-0.27/libpthread/CVS/Root dietlibc-0.28/libpthread/CVS/Root --- dietlibc-0.27/libpthread/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libpthread/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/libregex/CVS/Entries dietlibc-0.28/libregex/CVS/Entries --- dietlibc-0.27/libregex/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libregex/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,2 @@ +/rx.c/1.26/Sat Sep 11 11:59:38 2004// +D diff -uNr dietlibc-0.27/libregex/CVS/Repository dietlibc-0.28/libregex/CVS/Repository --- dietlibc-0.27/libregex/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libregex/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/libregex diff -uNr dietlibc-0.27/libregex/CVS/Root dietlibc-0.28/libregex/CVS/Root --- dietlibc-0.27/libregex/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libregex/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/libregex/rx.c dietlibc-0.28/libregex/rx.c --- dietlibc-0.27/libregex/rx.c Mon Sep 8 01:18:38 2003 +++ dietlibc-0.28/libregex/rx.c Sat Sep 11 13:59:38 2004 @@ -353,9 +353,15 @@ if (tmp==s) return s; } // printf("b->p from %p to ",b->p); - if (!(b->p=realloc(b->p,++b->num*sizeof(p)))) return s; + { + struct piece* tmp; + if (!(tmp=realloc(b->p,++b->num*sizeof(p)))) return s; +// printf("piece realloc: %p -> %p (%d*%d)\n",b->p,tmp,b->num,sizeof(p)); + b->p=tmp; + } // printf("%p (size %d)\n",b->p,b->num*sizeof(p)); b->p[b->num-1]=p; +// printf("assigned piece %d in branch %p\n",b->num-1,b->p); if (*tmp=='|') { break; } s=tmp; } @@ -393,9 +399,15 @@ tmp=parsebranch(&b,s,p,&r->pieces); if (tmp==s) return s; // printf("r->b from %p to ",r->b); - if (!(r->b=realloc(r->b,++r->num*sizeof(b)))) return s; + { + struct branch* tmp; + if (!(tmp=realloc(r->b,++r->num*sizeof(b)))) return s; +// printf("branch realloc: %p -> %p (%d*%d)\n",r->b,tmp,r->num,sizeof(b)); + r->b=tmp; + } // printf("%p (size %d)\n",r->b,r->num*sizeof(b)); r->b[r->num-1]=b; +// printf("assigned branch %d at %p\n",r->num-1,r->b); s=tmp; if (*s=='|') ++s; } return tmp; @@ -472,13 +484,22 @@ return REG_NOMATCH; } - +static void __regfree(struct regex* r) { + int i; + for (i=0; inum; ++i) { + int j,k; + k=r->b[i].num; + for (j=0; jb[i].p[j].a.type==REGEX) + __regfree(&r->b[i].p[j].a.u.r); + free(r->b[i].p); + } + free(r->b); +} void regfree(regex_t* preg) { - int i; - for (i=0; ir.num; ++i) - free(preg->r.b[i].p); - free(preg->r.b); + __regfree(&preg->r); + memset(preg,0,sizeof(regex_t)); } size_t regerror(int errcode, const regex_t*__restrict__ preg, char*__restrict__ errbuf, size_t errbuf_size) { diff -uNr dietlibc-0.27/librpc/CVS/Entries dietlibc-0.28/librpc/CVS/Entries --- dietlibc-0.27/librpc/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/librpc/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,39 @@ +/auth_none.c/1.6/Tue Aug 19 19:34:18 2003// +/auth_unix.c/1.6/Tue Aug 19 19:34:18 2003// +/authunix_prot.c/1.2/Fri Jun 15 16:14:51 2001// +/bindresvport.c/1.4/Mon Jun 25 15:39:09 2001// +/clnt_generic.c/1.4/Mon Jun 25 15:39:09 2001// +/clnt_perror.c/1.2/Tue Aug 19 19:34:18 2003// +/clnt_raw.c/1.5/Tue Aug 19 19:34:18 2003// +/clnt_simple.c/1.4/Tue Aug 19 19:34:18 2003// +/clnt_tcp.c/1.8/Fri Sep 12 23:14:45 2003// +/clnt_udp.c/1.8/Fri Sep 12 22:30:36 2003// +/get_myaddress.c/1.3/Tue Aug 19 19:34:18 2003// +/getrpcent.c/1.2/Tue Oct 9 18:02:11 2001// +/getrpcport.c/1.3/Tue Jun 26 15:19:11 2001// +/pmap_clnt.c/1.4/Sat Feb 23 22:18:43 2002// +/pmap_getmaps.c/1.3/Fri Oct 5 00:26:12 2001// +/pmap_getport.c/1.4/Tue Aug 19 16:32:24 2003// +/pmap_prot.c/1.1/Wed May 2 23:19:56 2001// +/pmap_prot2.c/1.2/Fri Jun 15 16:14:51 2001// +/pmap_rmt.c/1.6/Fri Sep 12 23:14:45 2003// +/rpc_callmsg.c/1.3/Tue Jun 26 15:19:11 2001// +/rpc_commondata.c/1.1/Wed May 2 23:19:56 2001// +/rpc_dtablesize.c/1.2/Tue Aug 19 19:34:18 2003// +/rpc_prot.c/1.4/Tue Aug 19 19:34:18 2003// +/svc.c/1.5/Tue Aug 19 19:34:18 2003// +/svc_auth.c/1.2/Tue Aug 19 19:34:18 2003// +/svc_auth_unix.c/1.4/Tue Aug 19 19:34:18 2003// +/svc_raw.c/1.5/Tue Aug 19 19:34:18 2003// +/svc_run.c/1.3/Thu May 31 17:03:41 2001// +/svc_simple.c/1.4/Tue Aug 19 19:34:18 2003// +/svc_tcp.c/1.7/Fri Sep 12 23:14:45 2003// +/svc_udp.c/1.7/Tue Aug 19 19:34:18 2003// +/xdr.c/1.4/Tue Aug 19 15:17:04 2003// +/xdr_array.c/1.4/Wed Jul 31 21:42:20 2002// +/xdr_float.c/1.1/Wed May 2 23:19:57 2001// +/xdr_mem.c/1.8/Tue Aug 19 19:34:18 2003// +/xdr_rec.c/1.10/Tue Aug 19 23:03:14 2003// +/xdr_reference.c/1.3/Mon Jun 25 15:39:09 2001// +/xdr_stdio.c/1.6/Tue Aug 19 19:34:18 2003// +D diff -uNr dietlibc-0.27/librpc/CVS/Repository dietlibc-0.28/librpc/CVS/Repository --- dietlibc-0.27/librpc/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/librpc/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/librpc diff -uNr dietlibc-0.27/librpc/CVS/Root dietlibc-0.28/librpc/CVS/Root --- dietlibc-0.27/librpc/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/librpc/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/libshell/CVS/Entries dietlibc-0.28/libshell/CVS/Entries --- dietlibc-0.27/libshell/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libshell/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,6 @@ +/basename.c/1.1/Tue Jul 17 17:39:08 2001// +/dirname.c/1.3/Tue Jan 27 13:31:05 2004// +/fnmatch.c/1.14/Tue Jan 27 21:43:55 2004// +/glob.c/1.8/Wed Feb 12 13:20:39 2003// +/realpath.c/1.10/Mon May 10 16:44:14 2004// +D diff -uNr dietlibc-0.27/libshell/CVS/Repository dietlibc-0.28/libshell/CVS/Repository --- dietlibc-0.27/libshell/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libshell/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/libshell diff -uNr dietlibc-0.27/libshell/CVS/Root dietlibc-0.28/libshell/CVS/Root --- dietlibc-0.27/libshell/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libshell/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/libstdio/CVS/Entries dietlibc-0.28/libstdio/CVS/Entries --- dietlibc-0.27/libstdio/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libstdio/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,44 @@ +/clearerr.c/1.2/Tue Nov 4 18:09:42 2003// +/fclose.c/1.6/Tue Nov 11 18:39:51 2003// +/fdglue.c/1.12/Tue Mar 2 21:27:19 2004// +/fdglue2.c/1.15/Tue Mar 2 21:27:19 2004// +/fdopen.c/1.6/Tue Nov 4 18:09:42 2003// +/fdprintf.c/1.1/Tue Jul 31 17:19:55 2001// +/feof.c/1.4/Tue Nov 11 18:27:41 2003// +/ferror.c/1.2/Tue Nov 11 18:27:41 2003// +/fflush.c/1.18/Tue Nov 4 18:09:42 2003// +/fgetc_unlocked.c/1.8/Tue Nov 11 18:31:27 2003// +/fgetpos.c/1.1/Mon Oct 22 20:20:53 2001// +/fgets.c/1.5/Tue Nov 11 18:39:51 2003// +/fileno.c/1.2/Tue Nov 11 18:31:27 2003// +/fopen.c/1.8/Tue Nov 11 18:27:41 2003// +/fprintf.c/1.3/Wed Jul 18 01:26:10 2001// +/fputc_unlocked.c/1.14/Tue Nov 11 18:27:41 2003// +/fputs.c/1.2/Tue Nov 11 18:39:51 2003// +/fread.c/1.20/Fri Jun 4 17:37:47 2004// +/freopen.c/1.7/Tue Nov 11 18:27:41 2003// +/fscanf.c/1.2/Tue Aug 14 16:56:51 2001// +/fseek.c/1.7/Tue Nov 4 18:09:42 2003// +/fseeko.c/1.5/Tue Nov 4 18:09:42 2003// +/fseeko64.c/1.6/Tue Nov 4 18:09:42 2003// +/fsetpos.c/1.1/Mon Oct 22 20:20:53 2001// +/ftell.c/1.5/Fri Nov 14 14:52:16 2003// +/ftello.c/1.4/Fri Nov 14 14:52:16 2003// +/ftello64.c/1.6/Fri Nov 14 14:52:16 2003// +/fwrite.c/1.15/Wed Apr 14 13:13:29 2004// +/printf.c/1.4/Wed Jul 18 01:26:10 2001// +/putchar.c/1.3/Mon Jul 8 20:55:32 2002// +/puts.c/1.4/Tue Nov 11 18:31:27 2003// +/scanf.c/1.2/Tue Aug 14 16:56:51 2001// +/setvbuf.c/1.8/Tue Nov 4 18:09:42 2003// +/stderr.c/1.9/Sun Sep 14 04:40:37 2003// +/stdin.c/1.9/Wed Oct 29 17:26:43 2003// +/stdout.c/1.8/Sun Sep 14 04:40:37 2003// +/tmpfile.c/1.5/Tue Nov 4 18:09:42 2003// +/ungetc.c/1.5/Tue Nov 4 18:09:42 2003// +/vfdprintf.c/1.2/Mon Nov 18 01:16:51 2002// +/vfprintf.c/1.2/Thu Jul 26 11:31:45 2001// +/vfscanf.c/1.1/Wed Jul 11 22:29:08 2001// +/vprintf.c/1.8/Sat Feb 23 22:18:43 2002// +/vscanf.c/1.2/Tue Aug 7 21:04:07 2001// +D diff -uNr dietlibc-0.27/libstdio/CVS/Repository dietlibc-0.28/libstdio/CVS/Repository --- dietlibc-0.27/libstdio/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libstdio/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/libstdio diff -uNr dietlibc-0.27/libstdio/CVS/Root dietlibc-0.28/libstdio/CVS/Root --- dietlibc-0.27/libstdio/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libstdio/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/libugly/CVS/Entries dietlibc-0.28/libugly/CVS/Entries --- dietlibc-0.27/libugly/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libugly/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,66 @@ +/addmntent.c/1.2/Fri Nov 14 15:16:55 2003// +/asctime.c/1.1/Thu Feb 1 22:14:06 2001// +/asctime_r.c/1.2/Fri Jul 20 13:10:07 2001// +/asprintf.c/1.5/Tue Jan 29 02:00:05 2002// +/ctime.c/1.3/Mon Jul 22 15:54:34 2002// +/difftime.c/1.5/Sat Feb 23 21:06:17 2002// +/dirfd.c/1.1/Tue Nov 13 16:19:36 2001// +/endmntent.c/1.2/Wed Jun 11 08:20:47 2003// +/facilitynames.c/1.1/Fri Mar 16 20:09:19 2001// +/freeaddrinfo.c/1.1/Fri May 18 19:15:01 2001// +/ftime.c/1.1/Fri May 11 20:08:59 2001// +/gai_strerror.c/1.3/Sat Oct 6 23:49:59 2001// +/getaddrinfo.c/1.11/Mon Oct 6 23:42:53 2003// +/gethostent.c/1.11/Mon Jun 23 10:48:13 2003// +/getmntent.c/1.4/Thu May 9 01:09:49 2002// +/getnameinfo.c/1.8/Fri Oct 31 01:34:37 2003// +/getprotobyname.c/1.1/Thu Oct 25 22:23:55 2001// +/getprotobyname_r.c/1.2/Mon Oct 29 17:21:10 2001// +/getprotobynumber.c/1.1/Thu Oct 25 22:23:55 2001// +/getprotobynumber_r.c/1.2/Mon Oct 29 17:21:10 2001// +/getprotoent.c/1.10/Mon Oct 29 17:21:10 2001// +/getprotoent_r.c/1.3/Thu May 9 01:01:17 2002// +/getservbyname.c/1.1/Wed Oct 24 17:06:04 2001// +/getservbyname_r.c/1.4/Sat Jun 1 17:11:27 2002// +/getservbyport.c/1.1/Wed Oct 24 17:06:04 2001// +/getservbyport_r.c/1.3/Mon Oct 29 17:21:10 2001// +/getservent.c/1.9/Mon Oct 29 17:21:10 2001// +/getservent_r.c/1.7/Thu May 9 01:01:17 2002// +/gmtime.c/1.1/Thu Feb 1 23:33:25 2001// +/gmtime_r.c/1.6/Tue Jan 1 22:00:43 2002// +/grantpt.c/1.1/Mon Feb 18 19:53:17 2002// +/hasmntopt.c/1.2/Sat Jan 26 22:36:46 2002// +/iconv.c/1.9/Mon Apr 5 16:58:48 2004// +/iconv_close.c/1.6/Sat Feb 23 22:18:44 2002// +/iconv_open.c/1.7/Mon Dec 1 17:42:12 2003// +/isleap.c/1.2/Sat Feb 23 22:18:44 2002// +/localtime.c/1.1/Thu Feb 1 23:39:08 2001// +/localtime_r.c/1.7/Sat Mar 27 00:47:00 2004// +/logging.c/1.16/Tue Nov 11 18:27:41 2003// +/mktime.c/1.10/Sat Mar 27 00:47:00 2004// +/netent.c/1.5/Tue Oct 9 18:02:11 2001// +/openpty.c/1.4/Sat Feb 23 22:18:44 2002// +/pclose.c/1.1/Mon Feb 12 19:01:37 2001// +/popen.c/1.6/Tue Jan 29 18:54:03 2002// +/prioritynames.c/1.1/Fri Mar 16 20:09:19 2001// +/protoent_buf.c/1.1/Thu Oct 25 22:23:55 2001// +/ptsname.c/1.2/Sat Feb 23 22:18:44 2002// +/putpwent.c/1.3/Sat Feb 9 00:45:19 2002// +/servent_buf.c/1.1/Wed Oct 24 17:06:04 2001// +/setenv.c/1.4/Thu Jan 24 00:43:11 2002// +/setmntent.c/1.1/Sun May 6 00:34:27 2001// +/strftime.c/1.8/Tue Feb 18 21:00:14 2003// +/strndup.c/1.3/Tue Aug 19 21:40:28 2003// +/strptime.c/1.1/Thu Nov 20 23:48:47 2003// +/strsignal.c/1.8/Wed Sep 25 15:03:19 2002// +/system.c/1.15/Sat Feb 23 21:06:17 2002// +/time_table_spd.c/1.4/Fri Jul 27 14:39:19 2001// +/timegm.c/1.3/Fri Jan 21 18:01:04 2005// +/timezone.c/1.2/Thu Nov 8 14:58:57 2001// +/tzfile.c/1.18/Fri Dec 17 18:47:58 2004// +/unlockpt.c/1.1/Mon Feb 18 19:53:17 2002// +/unsetenv.c/1.2/Wed Apr 14 13:13:29 2004// +/utent.c/1.8/Sat Feb 23 22:18:44 2002// +/vasprintf.c/1.3/Thu Oct 30 11:55:08 2003// +/wtent.c/1.5/Tue Apr 8 16:38:10 2003// +D diff -uNr dietlibc-0.27/libugly/CVS/Repository dietlibc-0.28/libugly/CVS/Repository --- dietlibc-0.27/libugly/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libugly/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/libugly diff -uNr dietlibc-0.27/libugly/CVS/Root dietlibc-0.28/libugly/CVS/Root --- dietlibc-0.27/libugly/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/libugly/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/libugly/timegm.c dietlibc-0.28/libugly/timegm.c --- dietlibc-0.27/libugly/timegm.c Sat Mar 27 01:47:00 2004 +++ dietlibc-0.28/libugly/timegm.c Fri Jan 21 19:01:04 2005 @@ -14,7 +14,7 @@ if (t->tm_min>60) { t->tm_hour += t->tm_min/60; t->tm_min%=60; } if (t->tm_hour>60) { t->tm_mday += t->tm_hour/60; t->tm_hour%=60; } if (t->tm_mon>12) { t->tm_year += t->tm_mon/12; t->tm_mon%=12; } - while (t->tm_mday>__spm[t->tm_mon]) { + while (t->tm_mday>__spm[1+t->tm_mon]) { if (t->tm_mon==1 && __isleap(t->tm_year+1900)) { if (t->tm_mon==31+29) break; --t->tm_mday; diff -uNr dietlibc-0.27/libugly/tzfile.c dietlibc-0.28/libugly/tzfile.c --- dietlibc-0.27/libugly/tzfile.c Mon Jun 7 18:19:57 2004 +++ dietlibc-0.28/libugly/tzfile.c Fri Dec 17 19:47:58 2004 @@ -38,11 +38,11 @@ tzlen=len; } -static unsigned long __myntohl(const unsigned char* c) { - return (((unsigned long)c[0])<<24) + - (((unsigned long)c[1])<<16) + - (((unsigned long)c[2])<<8) + - ((unsigned long)c[3]); +static int32_t __myntohl(const unsigned char* c) { + return (((uint32_t)c[0])<<24) + + (((uint32_t)c[1])<<16) + + (((uint32_t)c[2])<<8) + + ((uint32_t)c[3]); } time_t __tzfile_map(time_t t, int *isdst, int forward); @@ -96,7 +96,7 @@ i=tmp[i-1]; /* printf("using index %d\n",i); */ tmp+=tzh_timecnt; - tz+=tzh_timecnt*5+tzh_leapcnt*4+tzh_typecnt*6; + tz+=tzh_timecnt*5+tzh_typecnt*6; tmp+=i*6; /* printf("(%lu,%d,%d)\n",ntohl(*(int*)tmp),tmp[4],tmp[5]); */ *isdst=tmp[4]; diff -uNr dietlibc-0.27/longlong.h dietlibc-0.28/longlong.h --- dietlibc-0.27/longlong.h Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/longlong.h Thu Aug 12 14:51:36 2004 @@ -0,0 +1,1333 @@ +/* longlong.h -- definitions for mixed size 32/64 bit arithmetic. + Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* You have to define the following before including this file: + + UWtype -- An unsigned type, default type for operations (typically a "word") + UHWtype -- An unsigned type, at least half the size of UWtype. + UDWtype -- An unsigned type, at least twice as large a UWtype + W_TYPE_SIZE -- size in bits of UWtype + + UQItype -- Unsigned 8 bit type. + SItype, USItype -- Signed and unsigned 32 bit types. + DItype, UDItype -- Signed and unsigned 64 bit types. + + On a 32 bit machine UWtype should typically be USItype; + on a 64 bit machine, UWtype should typically be UDItype. +*/ + +#define __BITS4 (W_TYPE_SIZE / 4) +#define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2)) +#define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1)) +#define __ll_highpart(t) ((UWtype) (t) >> (W_TYPE_SIZE / 2)) + +#ifndef W_TYPE_SIZE +#define W_TYPE_SIZE 32 +#define UWtype USItype +#define UHWtype USItype +#define UDWtype UDItype +#endif + +/* Define auxiliary asm macros. + + 1) umul_ppmm(high_prod, low_prod, multipler, multiplicand) multiplies two + UWtype integers MULTIPLER and MULTIPLICAND, and generates a two UWtype + word product in HIGH_PROD and LOW_PROD. + + 2) __umulsidi3(a,b) multiplies two UWtype integers A and B, and returns a + UDWtype product. This is just a variant of umul_ppmm. + + 3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator, + denominator) divides a UDWtype, composed by the UWtype integers + HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and places the quotient + in QUOTIENT and the remainder in REMAINDER. HIGH_NUMERATOR must be less + than DENOMINATOR for correct operation. If, in addition, the most + significant bit of DENOMINATOR must be 1, then the pre-processor symbol + UDIV_NEEDS_NORMALIZATION is defined to 1. + + 4) sdiv_qrnnd(quotient, remainder, high_numerator, low_numerator, + denominator). Like udiv_qrnnd but the numbers are signed. The quotient + is rounded towards 0. + + 5) count_leading_zeros(count, x) counts the number of zero-bits from the + msb to the first nonzero bit in the UWtype X. This is the number of + steps X needs to be shifted left to set the msb. Undefined for X == 0, + unless the symbol COUNT_LEADING_ZEROS_0 is defined to some value. + + 6) count_trailing_zeros(count, x) like count_leading_zeros, but counts + from the least significant end. + + 7) add_ssaaaa(high_sum, low_sum, high_addend_1, low_addend_1, + high_addend_2, low_addend_2) adds two UWtype integers, composed by + HIGH_ADDEND_1 and LOW_ADDEND_1, and HIGH_ADDEND_2 and LOW_ADDEND_2 + respectively. The result is placed in HIGH_SUM and LOW_SUM. Overflow + (i.e. carry out) is not stored anywhere, and is lost. + + 8) sub_ddmmss(high_difference, low_difference, high_minuend, low_minuend, + high_subtrahend, low_subtrahend) subtracts two two-word UWtype integers, + composed by HIGH_MINUEND_1 and LOW_MINUEND_1, and HIGH_SUBTRAHEND_2 and + LOW_SUBTRAHEND_2 respectively. The result is placed in HIGH_DIFFERENCE + and LOW_DIFFERENCE. Overflow (i.e. carry out) is not stored anywhere, + and is lost. + + If any of these macros are left undefined for a particular CPU, + C macros are used. */ + +/* The CPUs come in alphabetical order below. + + Please add support for more CPUs here, or improve the current support + for the CPUs below! + (E.g. WE32100, IBM360.) */ + +#if defined (__GNUC__) && !defined (NO_ASM) + +/* We sometimes need to clobber "cc" with gcc2, but that would not be + understood by gcc1. Use cpp to avoid major code duplication. */ +#if __GNUC__ < 2 +#define __CLOBBER_CC +#define __AND_CLOBBER_CC +#else /* __GNUC__ >= 2 */ +#define __CLOBBER_CC : "cc" +#define __AND_CLOBBER_CC , "cc" +#endif /* __GNUC__ < 2 */ + +#if defined (__alpha) && W_TYPE_SIZE == 64 +#define umul_ppmm(ph, pl, m0, m1) \ + do { \ + UDItype __m0 = (m0), __m1 = (m1); \ + __asm__ ("umulh %r1,%2,%0" \ + : "=r" ((UDItype) ph) \ + : "%rJ" (__m0), \ + "rI" (__m1)); \ + (pl) = __m0 * __m1; \ + } while (0) +#define UMUL_TIME 46 +#ifndef LONGLONG_STANDALONE +#define udiv_qrnnd(q, r, n1, n0, d) \ + do { UDItype __r; \ + (q) = __udiv_qrnnd (&__r, (n1), (n0), (d)); \ + (r) = __r; \ + } while (0) +extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype); +#define UDIV_TIME 220 +#endif /* LONGLONG_STANDALONE */ +#ifdef __alpha_cix__ +#define count_leading_zeros(COUNT,X) \ + __asm__("ctlz %1,%0" : "=r"(COUNT) : "r"(X)) +#define count_trailing_zeros(COUNT,X) \ + __asm__("cttz %1,%0" : "=r"(COUNT) : "r"(X)) +#define COUNT_LEADING_ZEROS_0 64 +#else +extern const UQItype __clz_tab[]; +#define count_leading_zeros(COUNT,X) \ + do { \ + UDItype __xr = (X), __t, __a; \ + __asm__("cmpbge $31,%1,%0" : "=r"(__t) : "r"(__xr)); \ + __a = __clz_tab[__t ^ 0xff] - 1; \ + __asm__("extbl %1,%2,%0" : "=r"(__t) : "r"(__xr), "r"(__a)); \ + (COUNT) = 64 - (__clz_tab[__t] + __a*8); \ + } while (0) +#define count_trailing_zeros(COUNT,X) \ + do { \ + UDItype __xr = (X), __t, __a; \ + __asm__("cmpbge $31,%1,%0" : "=r"(__t) : "r"(__xr)); \ + __t = ~__t & -~__t; \ + __a = ((__t & 0xCC) != 0) * 2; \ + __a += ((__t & 0xF0) != 0) * 4; \ + __a += ((__t & 0xAA) != 0); \ + __asm__("extbl %1,%2,%0" : "=r"(__t) : "r"(__xr), "r"(__a)); \ + __a <<= 3; \ + __t &= -__t; \ + __a += ((__t & 0xCC) != 0) * 2; \ + __a += ((__t & 0xF0) != 0) * 4; \ + __a += ((__t & 0xAA) != 0); \ + (COUNT) = __a; \ + } while (0) +#endif /* __alpha_cix__ */ +#endif /* __alpha */ + +#if defined (__arc__) && W_TYPE_SIZE == 32 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("add.f %1, %4, %5\n\tadc %0, %2, %3" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "%r" ((USItype) (ah)), \ + "rIJ" ((USItype) (bh)), \ + "%r" ((USItype) (al)), \ + "rIJ" ((USItype) (bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("sub.f %1, %4, %5\n\tsbc %0, %2, %3" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "r" ((USItype) (ah)), \ + "rIJ" ((USItype) (bh)), \ + "r" ((USItype) (al)), \ + "rIJ" ((USItype) (bl))) +/* Call libgcc routine. */ +#define umul_ppmm(w1, w0, u, v) \ +do { \ + DWunion __w; \ + __w.ll = __umulsidi3 (u, v); \ + w1 = __w.s.high; \ + w0 = __w.s.low; \ +} while (0) +#define __umulsidi3 __umulsidi3 +UDItype __umulsidi3 (USItype, USItype); +#endif + +#if defined (__arm__) && W_TYPE_SIZE == 32 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("adds %1, %4, %5\n\tadc %0, %2, %3" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "%r" ((USItype) (ah)), \ + "rI" ((USItype) (bh)), \ + "%r" ((USItype) (al)), \ + "rI" ((USItype) (bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("subs %1, %4, %5\n\tsbc %0, %2, %3" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "r" ((USItype) (ah)), \ + "rI" ((USItype) (bh)), \ + "r" ((USItype) (al)), \ + "rI" ((USItype) (bl))) +#define umul_ppmm(xh, xl, a, b) \ +{register USItype __t0, __t1, __t2; \ + __asm__ ("%@ Inlined umul_ppmm\n" \ + " mov %2, %5, lsr #16\n" \ + " mov %0, %6, lsr #16\n" \ + " bic %3, %5, %2, lsl #16\n" \ + " bic %4, %6, %0, lsl #16\n" \ + " mul %1, %3, %4\n" \ + " mul %4, %2, %4\n" \ + " mul %3, %0, %3\n" \ + " mul %0, %2, %0\n" \ + " adds %3, %4, %3\n" \ + " addcs %0, %0, #65536\n" \ + " adds %1, %1, %3, lsl #16\n" \ + " adc %0, %0, %3, lsr #16" \ + : "=&r" ((USItype) (xh)), \ + "=r" ((USItype) (xl)), \ + "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \ + : "r" ((USItype) (a)), \ + "r" ((USItype) (b)));} +#define UMUL_TIME 20 +#define UDIV_TIME 100 +#endif /* __arm__ */ + +#if defined (__hppa) && W_TYPE_SIZE == 32 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("add %4,%5,%1\n\taddc %2,%3,%0" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "%rM" ((USItype) (ah)), \ + "rM" ((USItype) (bh)), \ + "%rM" ((USItype) (al)), \ + "rM" ((USItype) (bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("sub %4,%5,%1\n\tsubb %2,%3,%0" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "rM" ((USItype) (ah)), \ + "rM" ((USItype) (bh)), \ + "rM" ((USItype) (al)), \ + "rM" ((USItype) (bl))) +#if defined (_PA_RISC1_1) +#define umul_ppmm(w1, w0, u, v) \ + do { \ + union \ + { \ + UDItype __f; \ + struct {USItype __w1, __w0;} __w1w0; \ + } __t; \ + __asm__ ("xmpyu %1,%2,%0" \ + : "=x" (__t.__f) \ + : "x" ((USItype) (u)), \ + "x" ((USItype) (v))); \ + (w1) = __t.__w1w0.__w1; \ + (w0) = __t.__w1w0.__w0; \ + } while (0) +#define UMUL_TIME 8 +#else +#define UMUL_TIME 30 +#endif +#define UDIV_TIME 40 +#define count_leading_zeros(count, x) \ + do { \ + USItype __tmp; \ + __asm__ ( \ + "ldi 1,%0\n" \ +" extru,= %1,15,16,%%r0 ; Bits 31..16 zero?\n" \ +" extru,tr %1,15,16,%1 ; No. Shift down, skip add.\n"\ +" ldo 16(%0),%0 ; Yes. Perform add.\n" \ +" extru,= %1,23,8,%%r0 ; Bits 15..8 zero?\n" \ +" extru,tr %1,23,8,%1 ; No. Shift down, skip add.\n"\ +" ldo 8(%0),%0 ; Yes. Perform add.\n" \ +" extru,= %1,27,4,%%r0 ; Bits 7..4 zero?\n" \ +" extru,tr %1,27,4,%1 ; No. Shift down, skip add.\n"\ +" ldo 4(%0),%0 ; Yes. Perform add.\n" \ +" extru,= %1,29,2,%%r0 ; Bits 3..2 zero?\n" \ +" extru,tr %1,29,2,%1 ; No. Shift down, skip add.\n"\ +" ldo 2(%0),%0 ; Yes. Perform add.\n" \ +" extru %1,30,1,%1 ; Extract bit 1.\n" \ +" sub %0,%1,%0 ; Subtract it.\n" \ + : "=r" (count), "=r" (__tmp) : "1" (x)); \ + } while (0) +#endif + +#if (defined (__i370__) || defined (__mvs__)) && W_TYPE_SIZE == 32 +#define umul_ppmm(xh, xl, m0, m1) \ + do { \ + union {UDItype __ll; \ + struct {USItype __h, __l;} __i; \ + } __xx; \ + USItype __m0 = (m0), __m1 = (m1); \ + __asm__ ("mr %0,%3" \ + : "=r" (__xx.__i.__h), \ + "=r" (__xx.__i.__l) \ + : "%1" (__m0), \ + "r" (__m1)); \ + (xh) = __xx.__i.__h; (xl) = __xx.__i.__l; \ + (xh) += ((((SItype) __m0 >> 31) & __m1) \ + + (((SItype) __m1 >> 31) & __m0)); \ + } while (0) +#define smul_ppmm(xh, xl, m0, m1) \ + do { \ + union {DItype __ll; \ + struct {USItype __h, __l;} __i; \ + } __xx; \ + __asm__ ("mr %0,%3" \ + : "=r" (__xx.__i.__h), \ + "=r" (__xx.__i.__l) \ + : "%1" (m0), \ + "r" (m1)); \ + (xh) = __xx.__i.__h; (xl) = __xx.__i.__l; \ + } while (0) +#define sdiv_qrnnd(q, r, n1, n0, d) \ + do { \ + union {DItype __ll; \ + struct {USItype __h, __l;} __i; \ + } __xx; \ + __xx.__i.__h = n1; __xx.__i.__l = n0; \ + __asm__ ("dr %0,%2" \ + : "=r" (__xx.__ll) \ + : "0" (__xx.__ll), "r" (d)); \ + (q) = __xx.__i.__l; (r) = __xx.__i.__h; \ + } while (0) +#endif + +#if (defined (__i386__) || defined (__i486__)) && W_TYPE_SIZE == 32 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("addl %5,%1\n\tadcl %3,%0" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "%0" ((USItype) (ah)), \ + "g" ((USItype) (bh)), \ + "%1" ((USItype) (al)), \ + "g" ((USItype) (bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("subl %5,%1\n\tsbbl %3,%0" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "0" ((USItype) (ah)), \ + "g" ((USItype) (bh)), \ + "1" ((USItype) (al)), \ + "g" ((USItype) (bl))) +#define umul_ppmm(w1, w0, u, v) \ + __asm__ ("mull %3" \ + : "=a" ((USItype) (w0)), \ + "=d" ((USItype) (w1)) \ + : "%0" ((USItype) (u)), \ + "rm" ((USItype) (v))) +#define udiv_qrnnd(q, r, n1, n0, dv) \ + __asm__ ("divl %4" \ + : "=a" ((USItype) (q)), \ + "=d" ((USItype) (r)) \ + : "0" ((USItype) (n0)), \ + "1" ((USItype) (n1)), \ + "rm" ((USItype) (dv))) +#define count_leading_zeros(count, x) \ + do { \ + USItype __cbtmp; \ + __asm__ ("bsrl %1,%0" \ + : "=r" (__cbtmp) : "rm" ((USItype) (x))); \ + (count) = __cbtmp ^ 31; \ + } while (0) +#define count_trailing_zeros(count, x) \ + __asm__ ("bsfl %1,%0" : "=r" (count) : "rm" ((USItype)(x))) +#define UMUL_TIME 40 +#define UDIV_TIME 40 +#endif /* 80x86 */ + +#if defined (__i960__) && W_TYPE_SIZE == 32 +#define umul_ppmm(w1, w0, u, v) \ + ({union {UDItype __ll; \ + struct {USItype __l, __h;} __i; \ + } __xx; \ + __asm__ ("emul %2,%1,%0" \ + : "=d" (__xx.__ll) \ + : "%dI" ((USItype) (u)), \ + "dI" ((USItype) (v))); \ + (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;}) +#define __umulsidi3(u, v) \ + ({UDItype __w; \ + __asm__ ("emul %2,%1,%0" \ + : "=d" (__w) \ + : "%dI" ((USItype) (u)), \ + "dI" ((USItype) (v))); \ + __w; }) +#endif /* __i960__ */ + +#if defined (__M32R__) && W_TYPE_SIZE == 32 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + /* The cmp clears the condition bit. */ \ + __asm__ ("cmp %0,%0\n\taddx %%5,%1\n\taddx %%3,%0" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "%0" ((USItype) (ah)), \ + "r" ((USItype) (bh)), \ + "%1" ((USItype) (al)), \ + "r" ((USItype) (bl)) \ + : "cbit") +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + /* The cmp clears the condition bit. */ \ + __asm__ ("cmp %0,%0\n\tsubx %5,%1\n\tsubx %3,%0" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "0" ((USItype) (ah)), \ + "r" ((USItype) (bh)), \ + "1" ((USItype) (al)), \ + "r" ((USItype) (bl)) \ + : "cbit") +#endif /* __M32R__ */ + +#if defined (__mc68000__) && W_TYPE_SIZE == 32 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("add%.l %5,%1\n\taddx%.l %3,%0" \ + : "=d" ((USItype) (sh)), \ + "=&d" ((USItype) (sl)) \ + : "%0" ((USItype) (ah)), \ + "d" ((USItype) (bh)), \ + "%1" ((USItype) (al)), \ + "g" ((USItype) (bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("sub%.l %5,%1\n\tsubx%.l %3,%0" \ + : "=d" ((USItype) (sh)), \ + "=&d" ((USItype) (sl)) \ + : "0" ((USItype) (ah)), \ + "d" ((USItype) (bh)), \ + "1" ((USItype) (al)), \ + "g" ((USItype) (bl))) + +/* The '020, '030, '040 and CPU32 have 32x32->64 and 64/32->32q-32r. */ +#if defined (__mc68020__) || defined(mc68020) \ + || defined(__mc68030__) || defined(mc68030) \ + || defined(__mc68040__) || defined(mc68040) \ + || defined(__mcpu32__) || defined(mcpu32) +#define umul_ppmm(w1, w0, u, v) \ + __asm__ ("mulu%.l %3,%1:%0" \ + : "=d" ((USItype) (w0)), \ + "=d" ((USItype) (w1)) \ + : "%0" ((USItype) (u)), \ + "dmi" ((USItype) (v))) +#define UMUL_TIME 45 +#define udiv_qrnnd(q, r, n1, n0, d) \ + __asm__ ("divu%.l %4,%1:%0" \ + : "=d" ((USItype) (q)), \ + "=d" ((USItype) (r)) \ + : "0" ((USItype) (n0)), \ + "1" ((USItype) (n1)), \ + "dmi" ((USItype) (d))) +#define UDIV_TIME 90 +#define sdiv_qrnnd(q, r, n1, n0, d) \ + __asm__ ("divs%.l %4,%1:%0" \ + : "=d" ((USItype) (q)), \ + "=d" ((USItype) (r)) \ + : "0" ((USItype) (n0)), \ + "1" ((USItype) (n1)), \ + "dmi" ((USItype) (d))) + +#else /* not mc68020 */ +#if !defined(__mcf5200__) +/* %/ inserts REGISTER_PREFIX, %# inserts IMMEDIATE_PREFIX. */ +#define umul_ppmm(xh, xl, a, b) \ + __asm__ ("| Inlined umul_ppmm\n" \ + " move%.l %2,%/d0\n" \ + " move%.l %3,%/d1\n" \ + " move%.l %/d0,%/d2\n" \ + " swap %/d0\n" \ + " move%.l %/d1,%/d3\n" \ + " swap %/d1\n" \ + " move%.w %/d2,%/d4\n" \ + " mulu %/d3,%/d4\n" \ + " mulu %/d1,%/d2\n" \ + " mulu %/d0,%/d3\n" \ + " mulu %/d0,%/d1\n" \ + " move%.l %/d4,%/d0\n" \ + " eor%.w %/d0,%/d0\n" \ + " swap %/d0\n" \ + " add%.l %/d0,%/d2\n" \ + " add%.l %/d3,%/d2\n" \ + " jcc 1f\n" \ + " add%.l %#65536,%/d1\n" \ + "1: swap %/d2\n" \ + " moveq %#0,%/d0\n" \ + " move%.w %/d2,%/d0\n" \ + " move%.w %/d4,%/d2\n" \ + " move%.l %/d2,%1\n" \ + " add%.l %/d1,%/d0\n" \ + " move%.l %/d0,%0" \ + : "=g" ((USItype) (xh)), \ + "=g" ((USItype) (xl)) \ + : "g" ((USItype) (a)), \ + "g" ((USItype) (b)) \ + : "d0", "d1", "d2", "d3", "d4") +#define UMUL_TIME 100 +#define UDIV_TIME 400 +#endif /* not mcf5200 */ +#endif /* not mc68020 */ + +/* The '020, '030, '040 and '060 have bitfield insns. */ +#if defined (__mc68020__) || defined(mc68020) \ + || defined(__mc68030__) || defined(mc68030) \ + || defined(__mc68040__) || defined(mc68040) \ + || defined(__mc68060__) || defined(mc68060) +#define count_leading_zeros(count, x) \ + __asm__ ("bfffo %1{%b2:%b2},%0" \ + : "=d" ((USItype) (count)) \ + : "od" ((USItype) (x)), "n" (0)) +#endif +#endif /* mc68000 */ + +#if defined (__m88000__) && W_TYPE_SIZE == 32 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("addu.co %1,%r4,%r5\n\taddu.ci %0,%r2,%r3" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "%rJ" ((USItype) (ah)), \ + "rJ" ((USItype) (bh)), \ + "%rJ" ((USItype) (al)), \ + "rJ" ((USItype) (bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("subu.co %1,%r4,%r5\n\tsubu.ci %0,%r2,%r3" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "rJ" ((USItype) (ah)), \ + "rJ" ((USItype) (bh)), \ + "rJ" ((USItype) (al)), \ + "rJ" ((USItype) (bl))) +#define count_leading_zeros(count, x) \ + do { \ + USItype __cbtmp; \ + __asm__ ("ff1 %0,%1" \ + : "=r" (__cbtmp) \ + : "r" ((USItype) (x))); \ + (count) = __cbtmp ^ 31; \ + } while (0) +#define COUNT_LEADING_ZEROS_0 63 /* sic */ +#if defined (__mc88110__) +#define umul_ppmm(wh, wl, u, v) \ + do { \ + union {UDItype __ll; \ + struct {USItype __h, __l;} __i; \ + } __xx; \ + __asm__ ("mulu.d %0,%1,%2" \ + : "=r" (__xx.__ll) \ + : "r" ((USItype) (u)), \ + "r" ((USItype) (v))); \ + (wh) = __xx.__i.__h; \ + (wl) = __xx.__i.__l; \ + } while (0) +#define udiv_qrnnd(q, r, n1, n0, d) \ + ({union {UDItype __ll; \ + struct {USItype __h, __l;} __i; \ + } __xx; \ + USItype __q; \ + __xx.__i.__h = (n1); __xx.__i.__l = (n0); \ + __asm__ ("divu.d %0,%1,%2" \ + : "=r" (__q) \ + : "r" (__xx.__ll), \ + "r" ((USItype) (d))); \ + (r) = (n0) - __q * (d); (q) = __q; }) +#define UMUL_TIME 5 +#define UDIV_TIME 25 +#else +#define UMUL_TIME 17 +#define UDIV_TIME 150 +#endif /* __mc88110__ */ +#endif /* __m88000__ */ + +#if defined (__mips__) && W_TYPE_SIZE == 32 +#define umul_ppmm(w1, w0, u, v) \ + __asm__ ("multu %2,%3" \ + : "=l" ((USItype) (w0)), \ + "=h" ((USItype) (w1)) \ + : "d" ((USItype) (u)), \ + "d" ((USItype) (v))) +#define UMUL_TIME 10 +#define UDIV_TIME 100 +#endif /* __mips__ */ + +#if defined (__ns32000__) && W_TYPE_SIZE == 32 +#define umul_ppmm(w1, w0, u, v) \ + ({union {UDItype __ll; \ + struct {USItype __l, __h;} __i; \ + } __xx; \ + __asm__ ("meid %2,%0" \ + : "=g" (__xx.__ll) \ + : "%0" ((USItype) (u)), \ + "g" ((USItype) (v))); \ + (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;}) +#define __umulsidi3(u, v) \ + ({UDItype __w; \ + __asm__ ("meid %2,%0" \ + : "=g" (__w) \ + : "%0" ((USItype) (u)), \ + "g" ((USItype) (v))); \ + __w; }) +#define udiv_qrnnd(q, r, n1, n0, d) \ + ({union {UDItype __ll; \ + struct {USItype __l, __h;} __i; \ + } __xx; \ + __xx.__i.__h = (n1); __xx.__i.__l = (n0); \ + __asm__ ("deid %2,%0" \ + : "=g" (__xx.__ll) \ + : "0" (__xx.__ll), \ + "g" ((USItype) (d))); \ + (r) = __xx.__i.__l; (q) = __xx.__i.__h; }) +#define count_trailing_zeros(count,x) \ + do { \ + __asm__ ("ffsd %2,%0" \ + : "=r" ((USItype) (count)) \ + : "0" ((USItype) 0), \ + "r" ((USItype) (x))); \ + } while (0) +#endif /* __ns32000__ */ + +/* FIXME: We should test _IBMR2 here when we add assembly support for the + system vendor compilers. + FIXME: What's needed for gcc PowerPC VxWorks? __vxworks__ is not good + enough, since that hits ARM and m68k too. */ +#if (defined (_ARCH_PPC) /* AIX */ \ + || defined (_ARCH_PWR) /* AIX */ \ + || defined (_ARCH_COM) /* AIX */ \ + || defined (__powerpc__) /* gcc */ \ + || defined (__POWERPC__) /* BEOS */ \ + || defined (__ppc__) /* Darwin */ \ + || defined (PPC) /* GNU/Linux, SysV */ \ + ) && W_TYPE_SIZE == 32 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + do { \ + if (__builtin_constant_p (bh) && (bh) == 0) \ + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \ + : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\ + else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \ + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \ + : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\ + else \ + __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \ + : "=r" (sh), "=&r" (sl) \ + : "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \ + } while (0) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + do { \ + if (__builtin_constant_p (ah) && (ah) == 0) \ + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \ + : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\ + else if (__builtin_constant_p (ah) && (ah) == ~(USItype) 0) \ + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \ + : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\ + else if (__builtin_constant_p (bh) && (bh) == 0) \ + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \ + : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\ + else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \ + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \ + : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\ + else \ + __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \ + : "=r" (sh), "=&r" (sl) \ + : "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \ + } while (0) +#define count_leading_zeros(count, x) \ + __asm__ ("{cntlz|cntlzw} %0,%1" : "=r" (count) : "r" (x)) +#define COUNT_LEADING_ZEROS_0 32 +#if defined (_ARCH_PPC) || defined (__powerpc__) || defined (__POWERPC__) \ + || defined (__ppc__) || defined (PPC) || defined (__vxworks__) +#define umul_ppmm(ph, pl, m0, m1) \ + do { \ + USItype __m0 = (m0), __m1 = (m1); \ + __asm__ ("mulhwu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \ + (pl) = __m0 * __m1; \ + } while (0) +#define UMUL_TIME 15 +#define smul_ppmm(ph, pl, m0, m1) \ + do { \ + SItype __m0 = (m0), __m1 = (m1); \ + __asm__ ("mulhw %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \ + (pl) = __m0 * __m1; \ + } while (0) +#define SMUL_TIME 14 +#define UDIV_TIME 120 +#elif defined (_ARCH_PWR) +#define UMUL_TIME 8 +#define smul_ppmm(xh, xl, m0, m1) \ + __asm__ ("mul %0,%2,%3" : "=r" (xh), "=q" (xl) : "r" (m0), "r" (m1)) +#define SMUL_TIME 4 +#define sdiv_qrnnd(q, r, nh, nl, d) \ + __asm__ ("div %0,%2,%4" : "=r" (q), "=q" (r) : "r" (nh), "1" (nl), "r" (d)) +#define UDIV_TIME 100 +#endif +#endif /* 32-bit POWER architecture variants. */ + +/* We should test _IBMR2 here when we add assembly support for the system + vendor compilers. */ +#if (defined (_ARCH_PPC64) || defined (__powerpc64__)) && W_TYPE_SIZE == 64 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + do { \ + if (__builtin_constant_p (bh) && (bh) == 0) \ + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \ + : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\ + else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \ + __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \ + : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\ + else \ + __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \ + : "=r" (sh), "=&r" (sl) \ + : "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \ + } while (0) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + do { \ + if (__builtin_constant_p (ah) && (ah) == 0) \ + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \ + : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\ + else if (__builtin_constant_p (ah) && (ah) == ~(UDItype) 0) \ + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \ + : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\ + else if (__builtin_constant_p (bh) && (bh) == 0) \ + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \ + : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\ + else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \ + __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \ + : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\ + else \ + __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \ + : "=r" (sh), "=&r" (sl) \ + : "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \ + } while (0) +#define count_leading_zeros(count, x) \ + __asm__ ("cntlzd %0,%1" : "=r" (count) : "r" (x)) +#define COUNT_LEADING_ZEROS_0 64 +#define umul_ppmm(ph, pl, m0, m1) \ + do { \ + UDItype __m0 = (m0), __m1 = (m1); \ + __asm__ ("mulhdu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \ + (pl) = __m0 * __m1; \ + } while (0) +#define UMUL_TIME 15 +#define smul_ppmm(ph, pl, m0, m1) \ + do { \ + DItype __m0 = (m0), __m1 = (m1); \ + __asm__ ("mulhd %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \ + (pl) = __m0 * __m1; \ + } while (0) +#define SMUL_TIME 14 /* ??? */ +#define UDIV_TIME 120 /* ??? */ +#endif /* 64-bit PowerPC. */ + +#if defined (__ibm032__) /* RT/ROMP */ && W_TYPE_SIZE == 32 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("a %1,%5\n\tae %0,%3" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "%0" ((USItype) (ah)), \ + "r" ((USItype) (bh)), \ + "%1" ((USItype) (al)), \ + "r" ((USItype) (bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("s %1,%5\n\tse %0,%3" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "0" ((USItype) (ah)), \ + "r" ((USItype) (bh)), \ + "1" ((USItype) (al)), \ + "r" ((USItype) (bl))) +#define umul_ppmm(ph, pl, m0, m1) \ + do { \ + USItype __m0 = (m0), __m1 = (m1); \ + __asm__ ( \ + "s r2,r2\n" \ +" mts r10,%2\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" m r2,%3\n" \ +" cas %0,r2,r0\n" \ +" mfs r10,%1" \ + : "=r" ((USItype) (ph)), \ + "=r" ((USItype) (pl)) \ + : "%r" (__m0), \ + "r" (__m1) \ + : "r2"); \ + (ph) += ((((SItype) __m0 >> 31) & __m1) \ + + (((SItype) __m1 >> 31) & __m0)); \ + } while (0) +#define UMUL_TIME 20 +#define UDIV_TIME 200 +#define count_leading_zeros(count, x) \ + do { \ + if ((x) >= 0x10000) \ + __asm__ ("clz %0,%1" \ + : "=r" ((USItype) (count)) \ + : "r" ((USItype) (x) >> 16)); \ + else \ + { \ + __asm__ ("clz %0,%1" \ + : "=r" ((USItype) (count)) \ + : "r" ((USItype) (x))); \ + (count) += 16; \ + } \ + } while (0) +#endif + +#if defined (__sh2__) && W_TYPE_SIZE == 32 +#define umul_ppmm(w1, w0, u, v) \ + __asm__ ( \ + "dmulu.l %2,%3\n\tsts macl,%1\n\tsts mach,%0" \ + : "=r" ((USItype)(w1)), \ + "=r" ((USItype)(w0)) \ + : "r" ((USItype)(u)), \ + "r" ((USItype)(v)) \ + : "macl", "mach") +#define UMUL_TIME 5 +#endif + +#if defined (__SH5__) && __SHMEDIA__ && W_TYPE_SIZE == 32 +#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v) +#define count_leading_zeros(count, x) \ + do \ + { \ + UDItype x_ = (USItype)(x); \ + SItype c_; \ + \ + __asm__ ("nsb %1, %0" : "=r" (c_) : "r" (x_)); \ + (count) = c_ - 31; \ + } \ + while (0) +#define COUNT_LEADING_ZEROS_0 32 +#endif + +#if defined (__sparc__) && !defined (__arch64__) && !defined (__sparcv9) \ + && W_TYPE_SIZE == 32 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("addcc %r4,%5,%1\n\taddx %r2,%3,%0" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "%rJ" ((USItype) (ah)), \ + "rI" ((USItype) (bh)), \ + "%rJ" ((USItype) (al)), \ + "rI" ((USItype) (bl)) \ + __CLOBBER_CC) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("subcc %r4,%5,%1\n\tsubx %r2,%3,%0" \ + : "=r" ((USItype) (sh)), \ + "=&r" ((USItype) (sl)) \ + : "rJ" ((USItype) (ah)), \ + "rI" ((USItype) (bh)), \ + "rJ" ((USItype) (al)), \ + "rI" ((USItype) (bl)) \ + __CLOBBER_CC) +#if defined (__sparc_v8__) +#define umul_ppmm(w1, w0, u, v) \ + __asm__ ("umul %2,%3,%1;rd %%y,%0" \ + : "=r" ((USItype) (w1)), \ + "=r" ((USItype) (w0)) \ + : "r" ((USItype) (u)), \ + "r" ((USItype) (v))) +#define udiv_qrnnd(__q, __r, __n1, __n0, __d) \ + __asm__ ("mov %2,%%y;nop;nop;nop;udiv %3,%4,%0;umul %0,%4,%1;sub %3,%1,%1"\ + : "=&r" ((USItype) (__q)), \ + "=&r" ((USItype) (__r)) \ + : "r" ((USItype) (__n1)), \ + "r" ((USItype) (__n0)), \ + "r" ((USItype) (__d))) +#else +#if defined (__sparclite__) +/* This has hardware multiply but not divide. It also has two additional + instructions scan (ffs from high bit) and divscc. */ +#define umul_ppmm(w1, w0, u, v) \ + __asm__ ("umul %2,%3,%1;rd %%y,%0" \ + : "=r" ((USItype) (w1)), \ + "=r" ((USItype) (w0)) \ + : "r" ((USItype) (u)), \ + "r" ((USItype) (v))) +#define udiv_qrnnd(q, r, n1, n0, d) \ + __asm__ ("! Inlined udiv_qrnnd\n" \ +" wr %%g0,%2,%%y ! Not a delayed write for sparclite\n" \ +" tst %%g0\n" \ +" divscc %3,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%%g1\n" \ +" divscc %%g1,%4,%0\n" \ +" rd %%y,%1\n" \ +" bl,a 1f\n" \ +" add %1,%4,%1\n" \ +"1: ! End of inline udiv_qrnnd" \ + : "=r" ((USItype) (q)), \ + "=r" ((USItype) (r)) \ + : "r" ((USItype) (n1)), \ + "r" ((USItype) (n0)), \ + "rI" ((USItype) (d)) \ + : "g1" __AND_CLOBBER_CC) +#define UDIV_TIME 37 +#define count_leading_zeros(count, x) \ + do { \ + __asm__ ("scan %1,1,%0" \ + : "=r" ((USItype) (count)) \ + : "r" ((USItype) (x))); \ + } while (0) +/* Early sparclites return 63 for an argument of 0, but they warn that future + implementations might change this. Therefore, leave COUNT_LEADING_ZEROS_0 + undefined. */ +#else +/* SPARC without integer multiplication and divide instructions. + (i.e. at least Sun4/20,40,60,65,75,110,260,280,330,360,380,470,490) */ +#define umul_ppmm(w1, w0, u, v) \ + __asm__ ("! Inlined umul_ppmm\n" \ +" wr %%g0,%2,%%y ! SPARC has 0-3 delay insn after a wr\n"\ +" sra %3,31,%%o5 ! Don't move this insn\n" \ +" and %2,%%o5,%%o5 ! Don't move this insn\n" \ +" andcc %%g0,0,%%g1 ! Don't move this insn\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,%3,%%g1\n" \ +" mulscc %%g1,0,%%g1\n" \ +" add %%g1,%%o5,%0\n" \ +" rd %%y,%1" \ + : "=r" ((USItype) (w1)), \ + "=r" ((USItype) (w0)) \ + : "%rI" ((USItype) (u)), \ + "r" ((USItype) (v)) \ + : "g1", "o5" __AND_CLOBBER_CC) +#define UMUL_TIME 39 /* 39 instructions */ +/* It's quite necessary to add this much assembler for the sparc. + The default udiv_qrnnd (in C) is more than 10 times slower! */ +#define udiv_qrnnd(__q, __r, __n1, __n0, __d) \ + __asm__ ("! Inlined udiv_qrnnd\n" \ +" mov 32,%%g1\n" \ +" subcc %1,%2,%%g0\n" \ +"1: bcs 5f\n" \ +" addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n" \ +" sub %1,%2,%1 ! this kills msb of n\n" \ +" addx %1,%1,%1 ! so this can't give carry\n" \ +" subcc %%g1,1,%%g1\n" \ +"2: bne 1b\n" \ +" subcc %1,%2,%%g0\n" \ +" bcs 3f\n" \ +" addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n" \ +" b 3f\n" \ +" sub %1,%2,%1 ! this kills msb of n\n" \ +"4: sub %1,%2,%1\n" \ +"5: addxcc %1,%1,%1\n" \ +" bcc 2b\n" \ +" subcc %%g1,1,%%g1\n" \ +"! Got carry from n. Subtract next step to cancel this carry.\n" \ +" bne 4b\n" \ +" addcc %0,%0,%0 ! shift n1n0 and a 0-bit in lsb\n" \ +" sub %1,%2,%1\n" \ +"3: xnor %0,0,%0\n" \ +" ! End of inline udiv_qrnnd" \ + : "=&r" ((USItype) (__q)), \ + "=&r" ((USItype) (__r)) \ + : "r" ((USItype) (__d)), \ + "1" ((USItype) (__n1)), \ + "0" ((USItype) (__n0)) : "g1" __AND_CLOBBER_CC) +#define UDIV_TIME (3+7*32) /* 7 instructions/iteration. 32 iterations. */ +#endif /* __sparclite__ */ +#endif /* __sparc_v8__ */ +#endif /* sparc32 */ + +#if ((defined (__sparc__) && defined (__arch64__)) || defined (__sparcv9)) \ + && W_TYPE_SIZE == 64 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("addcc %r4,%5,%1\n\t" \ + "add %r2,%3,%0\n\t" \ + "bcs,a,pn %%xcc, 1f\n\t" \ + "add %0, 1, %0\n" \ + "1:" \ + : "=r" ((UDItype)(sh)), \ + "=&r" ((UDItype)(sl)) \ + : "%rJ" ((UDItype)(ah)), \ + "rI" ((UDItype)(bh)), \ + "%rJ" ((UDItype)(al)), \ + "rI" ((UDItype)(bl)) \ + __CLOBBER_CC) + +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("subcc %r4,%5,%1\n\t" \ + "sub %r2,%3,%0\n\t" \ + "bcs,a,pn %%xcc, 1f\n\t" \ + "sub %0, 1, %0\n\t" \ + "1:" \ + : "=r" ((UDItype)(sh)), \ + "=&r" ((UDItype)(sl)) \ + : "rJ" ((UDItype)(ah)), \ + "rI" ((UDItype)(bh)), \ + "rJ" ((UDItype)(al)), \ + "rI" ((UDItype)(bl)) \ + __CLOBBER_CC) + +#define umul_ppmm(wh, wl, u, v) \ + do { \ + UDItype tmp1, tmp2, tmp3, tmp4; \ + __asm__ __volatile__ ( \ + "srl %7,0,%3\n\t" \ + "mulx %3,%6,%1\n\t" \ + "srlx %6,32,%2\n\t" \ + "mulx %2,%3,%4\n\t" \ + "sllx %4,32,%5\n\t" \ + "srl %6,0,%3\n\t" \ + "sub %1,%5,%5\n\t" \ + "srlx %5,32,%5\n\t" \ + "addcc %4,%5,%4\n\t" \ + "srlx %7,32,%5\n\t" \ + "mulx %3,%5,%3\n\t" \ + "mulx %2,%5,%5\n\t" \ + "sethi %%hi(0x80000000),%2\n\t" \ + "addcc %4,%3,%4\n\t" \ + "srlx %4,32,%4\n\t" \ + "add %2,%2,%2\n\t" \ + "movcc %%xcc,%%g0,%2\n\t" \ + "addcc %5,%4,%5\n\t" \ + "sllx %3,32,%3\n\t" \ + "add %1,%3,%1\n\t" \ + "add %5,%2,%0" \ + : "=r" ((UDItype)(wh)), \ + "=&r" ((UDItype)(wl)), \ + "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3), "=&r" (tmp4) \ + : "r" ((UDItype)(u)), \ + "r" ((UDItype)(v)) \ + __CLOBBER_CC); \ + } while (0) +#define UMUL_TIME 96 +#define UDIV_TIME 230 +#endif /* sparc64 */ + +#if defined (__vax__) && W_TYPE_SIZE == 32 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("addl2 %5,%1\n\tadwc %3,%0" \ + : "=g" ((USItype) (sh)), \ + "=&g" ((USItype) (sl)) \ + : "%0" ((USItype) (ah)), \ + "g" ((USItype) (bh)), \ + "%1" ((USItype) (al)), \ + "g" ((USItype) (bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("subl2 %5,%1\n\tsbwc %3,%0" \ + : "=g" ((USItype) (sh)), \ + "=&g" ((USItype) (sl)) \ + : "0" ((USItype) (ah)), \ + "g" ((USItype) (bh)), \ + "1" ((USItype) (al)), \ + "g" ((USItype) (bl))) +#define umul_ppmm(xh, xl, m0, m1) \ + do { \ + union { \ + UDItype __ll; \ + struct {USItype __l, __h;} __i; \ + } __xx; \ + USItype __m0 = (m0), __m1 = (m1); \ + __asm__ ("emul %1,%2,$0,%0" \ + : "=r" (__xx.__ll) \ + : "g" (__m0), \ + "g" (__m1)); \ + (xh) = __xx.__i.__h; \ + (xl) = __xx.__i.__l; \ + (xh) += ((((SItype) __m0 >> 31) & __m1) \ + + (((SItype) __m1 >> 31) & __m0)); \ + } while (0) +#define sdiv_qrnnd(q, r, n1, n0, d) \ + do { \ + union {DItype __ll; \ + struct {SItype __l, __h;} __i; \ + } __xx; \ + __xx.__i.__h = n1; __xx.__i.__l = n0; \ + __asm__ ("ediv %3,%2,%0,%1" \ + : "=g" (q), "=g" (r) \ + : "g" (__xx.__ll), "g" (d)); \ + } while (0) +#endif /* __vax__ */ + +#if defined (__z8000__) && W_TYPE_SIZE == 16 +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("add %H1,%H5\n\tadc %H0,%H3" \ + : "=r" ((unsigned int)(sh)), \ + "=&r" ((unsigned int)(sl)) \ + : "%0" ((unsigned int)(ah)), \ + "r" ((unsigned int)(bh)), \ + "%1" ((unsigned int)(al)), \ + "rQR" ((unsigned int)(bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("sub %H1,%H5\n\tsbc %H0,%H3" \ + : "=r" ((unsigned int)(sh)), \ + "=&r" ((unsigned int)(sl)) \ + : "0" ((unsigned int)(ah)), \ + "r" ((unsigned int)(bh)), \ + "1" ((unsigned int)(al)), \ + "rQR" ((unsigned int)(bl))) +#define umul_ppmm(xh, xl, m0, m1) \ + do { \ + union {long int __ll; \ + struct {unsigned int __h, __l;} __i; \ + } __xx; \ + unsigned int __m0 = (m0), __m1 = (m1); \ + __asm__ ("mult %S0,%H3" \ + : "=r" (__xx.__i.__h), \ + "=r" (__xx.__i.__l) \ + : "%1" (__m0), \ + "rQR" (__m1)); \ + (xh) = __xx.__i.__h; (xl) = __xx.__i.__l; \ + (xh) += ((((signed int) __m0 >> 15) & __m1) \ + + (((signed int) __m1 >> 15) & __m0)); \ + } while (0) +#endif /* __z8000__ */ + +#endif /* __GNUC__ */ + +/* If this machine has no inline assembler, use C macros. */ + +#if !defined (add_ssaaaa) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + do { \ + UWtype __x; \ + __x = (al) + (bl); \ + (sh) = (ah) + (bh) + (__x < (al)); \ + (sl) = __x; \ + } while (0) +#endif + +#if !defined (sub_ddmmss) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + do { \ + UWtype __x; \ + __x = (al) - (bl); \ + (sh) = (ah) - (bh) - (__x > (al)); \ + (sl) = __x; \ + } while (0) +#endif + +#if !defined (umul_ppmm) +#define umul_ppmm(w1, w0, u, v) \ + do { \ + UWtype __x0, __x1, __x2, __x3; \ + UHWtype __ul, __vl, __uh, __vh; \ + \ + __ul = __ll_lowpart (u); \ + __uh = __ll_highpart (u); \ + __vl = __ll_lowpart (v); \ + __vh = __ll_highpart (v); \ + \ + __x0 = (UWtype) __ul * __vl; \ + __x1 = (UWtype) __ul * __vh; \ + __x2 = (UWtype) __uh * __vl; \ + __x3 = (UWtype) __uh * __vh; \ + \ + __x1 += __ll_highpart (__x0);/* this can't give carry */ \ + __x1 += __x2; /* but this indeed can */ \ + if (__x1 < __x2) /* did we get it? */ \ + __x3 += __ll_B; /* yes, add it in the proper pos. */ \ + \ + (w1) = __x3 + __ll_highpart (__x1); \ + (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \ + } while (0) +#endif + +#if !defined (__umulsidi3) +#define __umulsidi3(u, v) \ + ({DWunion __w; \ + umul_ppmm (__w.s.high, __w.s.low, u, v); \ + __w.ll; }) +#endif + +/* Define this unconditionally, so it can be used for debugging. */ +#define __udiv_qrnnd_c(q, r, n1, n0, d) \ + do { \ + UWtype __d1, __d0, __q1, __q0; \ + UWtype __r1, __r0, __m; \ + __d1 = __ll_highpart (d); \ + __d0 = __ll_lowpart (d); \ + \ + __r1 = (n1) % __d1; \ + __q1 = (n1) / __d1; \ + __m = (UWtype) __q1 * __d0; \ + __r1 = __r1 * __ll_B | __ll_highpart (n0); \ + if (__r1 < __m) \ + { \ + __q1--, __r1 += (d); \ + if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\ + if (__r1 < __m) \ + __q1--, __r1 += (d); \ + } \ + __r1 -= __m; \ + \ + __r0 = __r1 % __d1; \ + __q0 = __r1 / __d1; \ + __m = (UWtype) __q0 * __d0; \ + __r0 = __r0 * __ll_B | __ll_lowpart (n0); \ + if (__r0 < __m) \ + { \ + __q0--, __r0 += (d); \ + if (__r0 >= (d)) \ + if (__r0 < __m) \ + __q0--, __r0 += (d); \ + } \ + __r0 -= __m; \ + \ + (q) = (UWtype) __q1 * __ll_B | __q0; \ + (r) = __r0; \ + } while (0) + +/* If the processor has no udiv_qrnnd but sdiv_qrnnd, go through + __udiv_w_sdiv (defined in libgcc or elsewhere). */ +#if !defined (udiv_qrnnd) && defined (sdiv_qrnnd) +#define udiv_qrnnd(q, r, nh, nl, d) \ + do { \ + USItype __r; \ + (q) = __udiv_w_sdiv (&__r, nh, nl, d); \ + (r) = __r; \ + } while (0) +#endif + +/* If udiv_qrnnd was not defined for this processor, use __udiv_qrnnd_c. */ +#if !defined (udiv_qrnnd) +#define UDIV_NEEDS_NORMALIZATION 1 +#define udiv_qrnnd __udiv_qrnnd_c +#endif + +#if !defined (count_leading_zeros) +extern const UQItype __clz_tab[]; +#define count_leading_zeros(count, x) \ + do { \ + UWtype __xr = (x); \ + UWtype __a; \ + \ + if (W_TYPE_SIZE <= 32) \ + { \ + __a = __xr < ((UWtype)1<<2*__BITS4) \ + ? (__xr < ((UWtype)1<<__BITS4) ? 0 : __BITS4) \ + : (__xr < ((UWtype)1<<3*__BITS4) ? 2*__BITS4 : 3*__BITS4); \ + } \ + else \ + { \ + for (__a = W_TYPE_SIZE - 8; __a > 0; __a -= 8) \ + if (((__xr >> __a) & 0xff) != 0) \ + break; \ + } \ + \ + (count) = W_TYPE_SIZE - (__clz_tab[__xr >> __a] + __a); \ + } while (0) +#define COUNT_LEADING_ZEROS_0 W_TYPE_SIZE +#endif + +#if !defined (count_trailing_zeros) +/* Define count_trailing_zeros using count_leading_zeros. The latter might be + defined in asm, but if it is not, the C version above is good enough. */ +#define count_trailing_zeros(count, x) \ + do { \ + UWtype __ctz_x = (x); \ + UWtype __ctz_c; \ + count_leading_zeros (__ctz_c, __ctz_x & -__ctz_x); \ + (count) = W_TYPE_SIZE - 1 - __ctz_c; \ + } while (0) +#endif + +#ifndef UDIV_NEEDS_NORMALIZATION +#define UDIV_NEEDS_NORMALIZATION 0 +#endif diff -uNr dietlibc-0.27/mips/CVS/Entries dietlibc-0.28/mips/CVS/Entries --- dietlibc-0.27/mips/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/mips/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,37 @@ +/Makefile.add/1.14/Thu Aug 12 12:51:36 2004// +/__longjmp.S/1.3/Mon Apr 7 18:24:53 2003// +/__pread.S/1.1/Tue May 11 13:33:53 2004// +/__pwrite.S/1.1/Tue May 11 13:33:53 2004// +/__testandset.S/1.4/Wed Feb 19 12:10:12 2003// +/accept.S/1.1/Thu Sep 12 13:07:47 2002// +/bind.S/1.1/Thu Sep 12 13:11:22 2002// +/clone.S/1.6/Wed Mar 20 12:27:03 2002// +/connect.S/1.1/Thu Sep 12 13:07:47 2002// +/divdi3.c/1.1/Thu Aug 12 12:51:36 2004// +/errlist.S/1.1/Mon Jan 13 15:16:28 2003// +/getpeername.S/1.1/Thu Sep 12 13:07:47 2002// +/getsockname.S/1.1/Thu Sep 12 13:07:47 2002// +/getsockopt.S/1.1/Thu Sep 12 13:07:47 2002// +/listen.S/1.1/Thu Sep 12 13:07:47 2002// +/pipe.S/1.3/Mon Oct 21 11:29:25 2002// +/pread.c/1.2/Mon May 10 20:34:12 2004// +/pread64.c/1.2/Mon May 10 20:34:12 2004// +/pwrite.c/1.2/Mon May 10 20:34:12 2004// +/pwrite64.c/1.2/Mon May 10 20:34:12 2004// +/recv.S/1.1/Thu Sep 12 13:07:47 2002// +/recvfrom.S/1.1/Thu Sep 12 13:07:47 2002// +/recvmsg.S/1.1/Thu Sep 12 13:07:47 2002// +/select.S/1.2/Tue Jan 30 14:46:53 2001// +/send.S/1.1/Thu Sep 12 13:07:47 2002// +/sendmsg.S/1.1/Thu Sep 12 13:07:47 2002// +/sendto.S/1.1/Thu Sep 12 13:07:47 2002// +/setjmp.S/1.4/Thu Sep 12 10:33:48 2002// +/setsockopt.S/1.1/Thu Sep 12 13:07:47 2002// +/shutdown.S/1.1/Thu Sep 12 13:11:22 2002// +/socket.S/1.1/Thu Sep 12 13:07:47 2002// +/socketcall.S/1.1/Thu Sep 12 13:11:22 2002// +/socketpair.S/1.1/Thu Sep 12 13:07:47 2002// +/start.S/1.7/Sat Sep 11 12:37:57 2004// +/syscalls.h/1.5/Thu Nov 6 13:00:51 2003// +/unified.S/1.8/Wed Dec 11 19:31:04 2002// +D diff -uNr dietlibc-0.27/mips/CVS/Repository dietlibc-0.28/mips/CVS/Repository --- dietlibc-0.27/mips/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/mips/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/mips diff -uNr dietlibc-0.27/mips/CVS/Root dietlibc-0.28/mips/CVS/Root --- dietlibc-0.27/mips/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/mips/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/mips/Makefile.add dietlibc-0.28/mips/Makefile.add --- dietlibc-0.27/mips/Makefile.add Tue May 11 15:33:53 2004 +++ dietlibc-0.28/mips/Makefile.add Thu Aug 12 14:51:36 2004 @@ -11,4 +11,4 @@ endif CFLAGS+=$(ENDIAN) -Os -G 0 -fstrict-aliasing -fno-pic -mno-abicalls VPATH:=mips:syscalls.s:$(VPATH) -LIBOBJ+=$(OBJDIR)/pread64.o $(OBJDIR)/pwrite64.o +LIBOBJ+=$(OBJDIR)/pread64.o $(OBJDIR)/pwrite64.o $(OBJDIR)/divdi3.o diff -uNr dietlibc-0.27/mips/divdi3.c dietlibc-0.28/mips/divdi3.c --- dietlibc-0.27/mips/divdi3.c Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/mips/divdi3.c Thu Aug 12 14:51:36 2004 @@ -0,0 +1,342 @@ +/* 64-bit multiplication and division + Copyright (C) 1989, 1992-1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +#if __WORDSIZE == 32 + +typedef unsigned int UQItype __attribute__ ((mode (QI))); +typedef int SItype __attribute__ ((mode (SI))); +typedef unsigned int USItype __attribute__ ((mode (SI))); +typedef int DItype __attribute__ ((mode (DI))); +typedef unsigned int UDItype __attribute__ ((mode (DI))); +#define Wtype SItype +#define HWtype SItype +#define DWtype DItype +#define UWtype USItype +#define UHWtype USItype +#define UDWtype UDItype +#define W_TYPE_SIZE 32 + +#include "longlong.h" + +const +unsigned char __clz_tab[] = +{ + 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, +}; + +#if __BYTE_ORDER == __BIG_ENDIAN +struct DWstruct { Wtype high, low;}; +#elif __BYTE_ORDER == __LITTLE_ENDIAN +struct DWstruct { Wtype low, high;}; +#else +#error Unhandled endianity +#endif +typedef union { struct DWstruct s; DWtype ll; } DWunion; + +/* Prototypes of exported functions. */ +extern DWtype __divdi3 (DWtype u, DWtype v); +extern DWtype __moddi3 (DWtype u, DWtype v); +extern UDWtype __udivdi3 (UDWtype u, UDWtype v); +extern UDWtype __umoddi3 (UDWtype u, UDWtype v); + +static UDWtype +__udivmoddi4 (UDWtype n, UDWtype d, UDWtype *rp) +{ + DWunion ww; + DWunion nn, dd; + DWunion rr; + UWtype d0, d1, n0, n1, n2; + UWtype q0, q1; + UWtype b, bm; + + nn.ll = n; + dd.ll = d; + + d0 = dd.s.low; + d1 = dd.s.high; + n0 = nn.s.low; + n1 = nn.s.high; + +#if !UDIV_NEEDS_NORMALIZATION + if (d1 == 0) + { + if (d0 > n1) + { + /* 0q = nn / 0D */ + + udiv_qrnnd (q0, n0, n1, n0, d0); + q1 = 0; + + /* Remainder in n0. */ + } + else + { + /* qq = NN / 0d */ + + if (d0 == 0) + d0 = 1 / d0; /* Divide intentionally by zero. */ + + udiv_qrnnd (q1, n1, 0, n1, d0); + udiv_qrnnd (q0, n0, n1, n0, d0); + + /* Remainder in n0. */ + } + + if (rp != 0) + { + rr.s.low = n0; + rr.s.high = 0; + *rp = rr.ll; + } + } + +#else /* UDIV_NEEDS_NORMALIZATION */ + + if (d1 == 0) + { + if (d0 > n1) + { + /* 0q = nn / 0D */ + + count_leading_zeros (bm, d0); + + if (bm != 0) + { + /* Normalize, i.e. make the most significant bit of the + denominator set. */ + + d0 = d0 << bm; + n1 = (n1 << bm) | (n0 >> (W_TYPE_SIZE - bm)); + n0 = n0 << bm; + } + + udiv_qrnnd (q0, n0, n1, n0, d0); + q1 = 0; + + /* Remainder in n0 >> bm. */ + } + else + { + /* qq = NN / 0d */ + + if (d0 == 0) + d0 = 1 / d0; /* Divide intentionally by zero. */ + + count_leading_zeros (bm, d0); + + if (bm == 0) + { + /* From (n1 >= d0) /\ (the most significant bit of d0 is set), + conclude (the most significant bit of n1 is set) /\ (the + leading quotient digit q1 = 1). + + This special case is necessary, not an optimization. + (Shifts counts of W_TYPE_SIZE are undefined.) */ + + n1 -= d0; + q1 = 1; + } + else + { + /* Normalize. */ + + b = W_TYPE_SIZE - bm; + + d0 = d0 << bm; + n2 = n1 >> b; + n1 = (n1 << bm) | (n0 >> b); + n0 = n0 << bm; + + udiv_qrnnd (q1, n1, n2, n1, d0); + } + + /* n1 != d0... */ + + udiv_qrnnd (q0, n0, n1, n0, d0); + + /* Remainder in n0 >> bm. */ + } + + if (rp != 0) + { + rr.s.low = n0 >> bm; + rr.s.high = 0; + *rp = rr.ll; + } + } +#endif /* UDIV_NEEDS_NORMALIZATION */ + + else + { + if (d1 > n1) + { + /* 00 = nn / DD */ + + q0 = 0; + q1 = 0; + + /* Remainder in n1n0. */ + if (rp != 0) + { + rr.s.low = n0; + rr.s.high = n1; + *rp = rr.ll; + } + } + else + { + /* 0q = NN / dd */ + + count_leading_zeros (bm, d1); + if (bm == 0) + { + /* From (n1 >= d1) /\ (the most significant bit of d1 is set), + conclude (the most significant bit of n1 is set) /\ (the + quotient digit q0 = 0 or 1). + + This special case is necessary, not an optimization. */ + + /* The condition on the next line takes advantage of that + n1 >= d1 (true due to program flow). */ + if (n1 > d1 || n0 >= d0) + { + q0 = 1; + sub_ddmmss (n1, n0, n1, n0, d1, d0); + } + else + q0 = 0; + + q1 = 0; + + if (rp != 0) + { + rr.s.low = n0; + rr.s.high = n1; + *rp = rr.ll; + } + } + else + { + UWtype m1, m0; + /* Normalize. */ + + b = W_TYPE_SIZE - bm; + + d1 = (d1 << bm) | (d0 >> b); + d0 = d0 << bm; + n2 = n1 >> b; + n1 = (n1 << bm) | (n0 >> b); + n0 = n0 << bm; + + udiv_qrnnd (q0, n1, n2, n1, d1); + umul_ppmm (m1, m0, q0, d0); + + if (m1 > n1 || (m1 == n1 && m0 > n0)) + { + q0--; + sub_ddmmss (m1, m0, m1, m0, d1, d0); + } + + q1 = 0; + + /* Remainder in (n1n0 - m1m0) >> bm. */ + if (rp != 0) + { + sub_ddmmss (n1, n0, n1, n0, m1, m0); + rr.s.low = (n1 << b) | (n0 >> bm); + rr.s.high = n1 >> bm; + *rp = rr.ll; + } + } + } + } + + ww.s.low = q0; + ww.s.high = q1; + return ww.ll; +} + +DWtype +__divdi3 (DWtype u, DWtype v) +{ + Wtype c = 0; + DWtype w; + + if (u < 0) + { + c = ~c; + u = -u; + } + if (v < 0) + { + c = ~c; + v = -v; + } + w = __udivmoddi4 (u, v, NULL); + if (c) + w = -w; + return w; +} + +DWtype +__moddi3 (DWtype u, DWtype v) +{ + Wtype c = 0; + DWtype w; + + if (u < 0) + { + c = ~c; + u = -u; + } + if (v < 0) + v = -v; + __udivmoddi4 (u, v, &w); + if (c) + w = -w; + return w; +} + +UDWtype +__udivdi3 (UDWtype u, UDWtype v) +{ + return __udivmoddi4 (u, v, NULL); +} + +UDWtype +__umoddi3 (UDWtype u, UDWtype v) +{ + UDWtype w; + + __udivmoddi4 (u, v, &w); + return w; +} + +#endif diff -uNr dietlibc-0.27/mips/start.S dietlibc-0.28/mips/start.S --- dietlibc-0.27/mips/start.S Wed Aug 14 15:46:08 2002 +++ dietlibc-0.28/mips/start.S Sat Sep 11 14:37:57 2004 @@ -37,7 +37,11 @@ addu $a2, $a0, 1 /* load envp */ sll $a2, $a2, 2 +#ifdef WANT_STACKGAP + la $25, stackgap +#else la $25, main +#endif add $a2, $a2, $a1 sw $a2, environ jalr $25 diff -uNr dietlibc-0.27/mipsel/CVS/Entries dietlibc-0.28/mipsel/CVS/Entries --- dietlibc-0.27/mipsel/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/mipsel/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,3 @@ +/Makefile.add/1.3/Fri Aug 13 14:03:30 2004// +/syscalls.h/1.1/Fri Jan 9 17:41:05 2004// +D diff -uNr dietlibc-0.27/mipsel/CVS/Repository dietlibc-0.28/mipsel/CVS/Repository --- dietlibc-0.27/mipsel/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/mipsel/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/mipsel diff -uNr dietlibc-0.27/mipsel/CVS/Root dietlibc-0.28/mipsel/CVS/Root --- dietlibc-0.27/mipsel/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/mipsel/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/mipsel/Makefile.add dietlibc-0.28/mipsel/Makefile.add --- dietlibc-0.27/mipsel/Makefile.add Fri Jan 9 18:41:05 2004 +++ dietlibc-0.28/mipsel/Makefile.add Fri Aug 13 16:03:30 2004 @@ -1,3 +1,6 @@ +ifeq ($(CROSS),mips-linux-) ENDIAN=-EL +endif CFLAGS+=$(ENDIAN) -Os -G 0 -fstrict-aliasing -fno-pic -mno-abicalls VPATH:=mips:syscalls.s:$(VPATH) +LIBOBJ+=$(OBJDIR)/pread64.o $(OBJDIR)/pwrite64.o $(OBJDIR)/divdi3.o diff -uNr dietlibc-0.27/parisc/CVS/Entries dietlibc-0.28/parisc/CVS/Entries --- dietlibc-0.27/parisc/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/parisc/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,38 @@ +/Makefile.add/1.1/Fri Jan 11 18:06:53 2002// +/__longjmp.S/1.1/Fri Jan 11 18:06:53 2002// +/__testandset.S/1.2/Mon Jan 28 17:09:41 2002// +/accept.S/1.1/Wed Jul 3 20:33:38 2002// +/bind.S/1.1/Wed Jul 3 20:33:38 2002// +/clone.S/1.4/Tue Jun 11 10:59:44 2002// +/connect.S/1.1/Wed Jul 3 20:33:38 2002// +/getpeername.S/1.1/Wed Jul 3 20:33:38 2002// +/getsockname.S/1.1/Wed Jul 3 20:33:38 2002// +/getsockopt.S/1.1/Wed Jul 3 20:33:38 2002// +/listen.S/1.1/Wed Jul 3 20:33:38 2002// +/mmap.S/1.1/Fri Jan 11 18:06:53 2002// +/recv.S/1.1/Wed Jul 3 20:33:38 2002// +/recvfrom.S/1.1/Wed Jul 3 20:33:38 2002// +/recvmsg.S/1.1/Wed Jul 3 20:33:38 2002// +/send.S/1.1/Wed Jul 3 20:33:38 2002// +/sendmsg.S/1.1/Wed Jul 3 20:33:38 2002// +/sendto.S/1.1/Wed Jul 3 20:33:38 2002// +/setjmp.S/1.2/Sun Sep 21 13:03:49 2003// +/setsockopt.S/1.1/Wed Jul 3 20:33:38 2002// +/shutdown.S/1.1/Wed Jul 3 20:33:38 2002// +/socket.S/1.1/Wed Jul 3 20:33:38 2002// +/socketpair.S/1.1/Wed Jul 3 20:33:38 2002// +/start.S/1.3/Sat Sep 11 12:37:57 2004// +/strcasecmp.S/1.1/Thu Sep 4 01:50:50 2003// +/strchr.S/1.2/Sat Sep 20 12:18:44 2003// +/strcmp.S/1.1/Thu Sep 4 01:50:50 2003// +/strlen.S/1.3/Sun Sep 21 13:03:49 2003// +/strncasecmp.S/1.1/Thu Sep 4 01:50:50 2003// +/strncmp.S/1.1/Thu Sep 4 01:50:50 2003// +/strncpy.S/1.1/Thu Sep 4 01:50:50 2003// +/strpbrk.S/1.1/Thu Sep 4 01:50:50 2003// +/strrchr.S/1.1/Thu Sep 4 01:50:50 2003// +/strstr.S/1.2/Tue Sep 16 14:27:33 2003// +/syscalls.h/1.4/Sat Apr 12 15:21:46 2003// +/umount.S/1.1/Tue Sep 16 14:25:07 2003// +/unified.S/1.5/Thu Jan 31 12:53:45 2002// +D diff -uNr dietlibc-0.27/parisc/CVS/Repository dietlibc-0.28/parisc/CVS/Repository --- dietlibc-0.27/parisc/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/parisc/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/parisc diff -uNr dietlibc-0.27/parisc/CVS/Root dietlibc-0.28/parisc/CVS/Root --- dietlibc-0.27/parisc/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/parisc/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/parisc/start.S dietlibc-0.28/parisc/start.S --- dietlibc-0.27/parisc/start.S Fri Nov 14 14:59:00 2003 +++ dietlibc-0.28/parisc/start.S Sat Sep 11 14:37:57 2004 @@ -37,7 +37,11 @@ stw %r24, 0(%sr0, %r19) ldil L%$global$, %dp +#ifdef WANT_STACKGAP + bl stackgap, %rp +#else bl main, %rp +#endif ldo R%$global$(%dp), %dp b _exit or %r28, %r28, %r26 diff -uNr dietlibc-0.27/ppc/CVS/Entries dietlibc-0.28/ppc/CVS/Entries --- dietlibc-0.27/ppc/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/ppc/CVS/Entries Mon Jan 31 18:53:09 2005 @@ -0,0 +1,10 @@ +/Makefile.add/1.3/Tue Jan 30 15:01:20 2001// +/__longjmp.S/1.2/Thu Jan 25 17:23:36 2001// +/__testandset.S/1.4/Mon Sep 16 11:17:01 2002// +/clone.S/1.2/Thu Dec 13 16:05:03 2001// +/mmap.c/1.3/Mon Jun 18 21:08:07 2001// +/setjmp.S/1.1/Tue Jan 9 17:57:44 2001// +/start.S/1.6/Sat Sep 11 12:37:57 2004// +/syscalls.h/1.4/Fri Nov 7 14:24:39 2003// +/unified.S/1.8/Mon Jan 21 15:55:19 2002// +D diff -uNr dietlibc-0.27/ppc/CVS/Repository dietlibc-0.28/ppc/CVS/Repository --- dietlibc-0.27/ppc/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/ppc/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/ppc diff -uNr dietlibc-0.27/ppc/CVS/Root dietlibc-0.28/ppc/CVS/Root --- dietlibc-0.27/ppc/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/ppc/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/ppc/start.S dietlibc-0.28/ppc/start.S --- dietlibc-0.27/ppc/start.S Wed Sep 25 17:03:20 2002 +++ dietlibc-0.28/ppc/start.S Sat Sep 11 14:37:57 2004 @@ -30,8 +30,12 @@ mr 6,7 bl _dyn_start #else +#ifdef WANT_STACKGAP + bl stackgap +#else bl main #endif +#endif b exit .size _start,.-_start diff -uNr dietlibc-0.27/ppc64/CVS/Entries dietlibc-0.28/ppc64/CVS/Entries --- dietlibc-0.27/ppc64/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/ppc64/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,10 @@ +/Makefile.add/1.1/Fri Oct 10 13:37:34 2003// +/__longjmp.S/1.2/Fri Dec 17 18:47:58 2004// +/__testandset.S/1.1/Fri Oct 10 13:37:34 2003// +/clone.S/1.1/Fri Oct 10 13:37:34 2003// +/setjmp.S/1.2/Fri Dec 17 18:47:59 2004// +/start.S/1.2/Sat Sep 11 12:37:57 2004// +/syscalls.h/1.2/Fri Nov 7 14:24:39 2003// +/umount.S/1.1/Fri Dec 17 18:47:59 2004// +/unified.S/1.1/Fri Oct 10 13:37:34 2003// +D diff -uNr dietlibc-0.27/ppc64/CVS/Repository dietlibc-0.28/ppc64/CVS/Repository --- dietlibc-0.27/ppc64/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/ppc64/CVS/Repository Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +dietlibc/ppc64 diff -uNr dietlibc-0.27/ppc64/CVS/Root dietlibc-0.28/ppc64/CVS/Root --- dietlibc-0.27/ppc64/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/ppc64/CVS/Root Mon Jan 31 18:53:09 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/ppc64/__longjmp.S dietlibc-0.28/ppc64/__longjmp.S --- dietlibc-0.27/ppc64/__longjmp.S Fri Oct 10 15:37:34 2003 +++ dietlibc-0.28/ppc64/__longjmp.S Fri Dec 17 19:47:58 2004 @@ -1,59 +1,54 @@ #include - -#ifdef PIC -#define JUMPTARGET(name) name##@plt -#else -#define JUMPTARGET(name) name -#endif - -.global __longjmp -.type __longjmp,@function + .quad .__longjmp,.TOC.@tocbase,0 + .previous + .size __longjmp,24 + .type .__longjmp,@function + .globl .__longjmp .align 2 -__longjmp: - lwz 1,(JB_GPR1*4)(3) - lwz 2,(JB_GPR2*4)(3) - lwz 0,(JB_LR*4)(3) - lwz 14,((JB_GPRS+0)*4)(3) - lfd 14,((JB_FPRS+0*2)*4)(3) - lwz 15,((JB_GPRS+1)*4)(3) - lfd 15,((JB_FPRS+1*2)*4)(3) - lwz 16,((JB_GPRS+2)*4)(3) - lfd 16,((JB_FPRS+2*2)*4)(3) - lwz 17,((JB_GPRS+3)*4)(3) - lfd 17,((JB_FPRS+3*2)*4)(3) - lwz 18,((JB_GPRS+4)*4)(3) - lfd 18,((JB_FPRS+4*2)*4)(3) - lwz 19,((JB_GPRS+5)*4)(3) - lfd 19,((JB_FPRS+5*2)*4)(3) - lwz 20,((JB_GPRS+6)*4)(3) - lfd 20,((JB_FPRS+6*2)*4)(3) +.__longjmp: + ld 1,(JB_GPR1*8)(3) + ld 2,(JB_GPR2*8)(3) + ld 0,(JB_LR*8)(3) + ld 14,((JB_GPRS+0)*8)(3) + lfd 14,((JB_FPRS+0*2)*8)(3) + ld 15,((JB_GPRS+1)*8)(3) + lfd 15,((JB_FPRS+1*2)*8)(3) + ld 16,((JB_GPRS+2)*8)(3) + lfd 16,((JB_FPRS+2*2)*8)(3) + ld 17,((JB_GPRS+3)*8)(3) + lfd 17,((JB_FPRS+3*2)*8)(3) + ld 18,((JB_GPRS+4)*8)(3) + lfd 18,((JB_FPRS+4*2)*8)(3) + ld 19,((JB_GPRS+5)*8)(3) + lfd 19,((JB_FPRS+5*2)*8)(3) + ld 20,((JB_GPRS+6)*8)(3) + lfd 20,((JB_FPRS+6*2)*8)(3) mtlr 0 - lwz 21,((JB_GPRS+7)*4)(3) - lfd 21,((JB_FPRS+7*2)*4)(3) - lwz 22,((JB_GPRS+8)*4)(3) - lfd 22,((JB_FPRS+8*2)*4)(3) - lwz 0,(JB_CR*4)(3) - lwz 23,((JB_GPRS+9)*4)(3) - lfd 23,((JB_FPRS+9*2)*4)(3) - lwz 24,((JB_GPRS+10)*4)(3) - lfd 24,((JB_FPRS+10*2)*4)(3) - lwz 25,((JB_GPRS+11)*4)(3) - lfd 25,((JB_FPRS+11*2)*4)(3) + ld 21,((JB_GPRS+7)*8)(3) + lfd 21,((JB_FPRS+7*2)*8)(3) + ld 22,((JB_GPRS+8)*8)(3) + lfd 22,((JB_FPRS+8*2)*8)(3) + ld 0,(JB_CR*8)(3) + ld 23,((JB_GPRS+9)*8)(3) + lfd 23,((JB_FPRS+9*2)*8)(3) + ld 24,((JB_GPRS+10)*8)(3) + lfd 24,((JB_FPRS+10*2)*8)(3) + ld 25,((JB_GPRS+11)*8)(3) + lfd 25,((JB_FPRS+11*2)*8)(3) mtcrf 0xFF,0 - lwz 26,((JB_GPRS+12)*4)(3) - lfd 26,((JB_FPRS+12*2)*4)(3) - lwz 27,((JB_GPRS+13)*4)(3) - lfd 27,((JB_FPRS+13*2)*4)(3) - lwz 28,((JB_GPRS+14)*4)(3) - lfd 28,((JB_FPRS+14*2)*4)(3) - lwz 29,((JB_GPRS+15)*4)(3) - lfd 29,((JB_FPRS+15*2)*4)(3) - lwz 30,((JB_GPRS+16)*4)(3) - lfd 30,((JB_FPRS+16*2)*4)(3) - lwz 31,((JB_GPRS+17)*4)(3) - lfd 31,((JB_FPRS+17*2)*4)(3) + ld 26,((JB_GPRS+12)*8)(3) + lfd 26,((JB_FPRS+12*2)*8)(3) + ld 27,((JB_GPRS+13)*8)(3) + lfd 27,((JB_FPRS+13*2)*8)(3) + ld 28,((JB_GPRS+14)*8)(3) + lfd 28,((JB_FPRS+14*2)*8)(3) + ld 29,((JB_GPRS+15)*8)(3) + lfd 29,((JB_FPRS+15*2)*8)(3) + ld 30,((JB_GPRS+16)*8)(3) + lfd 30,((JB_FPRS+16*2)*8)(3) + ld 31,((JB_GPRS+17)*8)(3) + lfd 31,((JB_FPRS+17*2)*8)(3) mr 3,4 blr -.size __longjmp,.-__longjmp - +.size .__longjmp,.-.__longjmp diff -uNr dietlibc-0.27/ppc64/setjmp.S dietlibc-0.28/ppc64/setjmp.S --- dietlibc-0.27/ppc64/setjmp.S Fri Oct 10 15:37:34 2003 +++ dietlibc-0.28/ppc64/setjmp.S Fri Dec 17 19:47:59 2004 @@ -3,54 +3,57 @@ #ifdef PIC #define JUMPTARGET(name) name##@plt #else -#define JUMPTARGET(name) name +#define JUMPTARGET(name) .name #endif -.global __sigsetjmp -.type __sigsetjmp,@function + .quad .__sigsetjmp,.TOC.@tocbase,0 + .previous + .size __sigsetjmp,24 + .type .__sigsetjmp,@function + .globl .__sigsetjmp .align 2 -__sigsetjmp: - stw 1,(JB_GPR1*4)(3) +.__sigsetjmp: + std 1,(JB_GPR1*8)(3) mflr 0 - stw 2,(JB_GPR2*4)(3) - stw 14,((JB_GPRS+0)*4)(3) - stfd 14,((JB_FPRS+0*2)*4)(3) - stw 0,(JB_LR*4)(3) - stw 15,((JB_GPRS+1)*4)(3) - stfd 15,((JB_FPRS+1*2)*4)(3) + std 2,(JB_GPR2*8)(3) + std 14,((JB_GPRS+0)*8)(3) + stfd 14,((JB_FPRS+0*2)*8)(3) + std 0,(JB_LR*8)(3) + std 15,((JB_GPRS+1)*8)(3) + stfd 15,((JB_FPRS+1*2)*8)(3) mfcr 0 - stw 16,((JB_GPRS+2)*4)(3) - stfd 16,((JB_FPRS+2*2)*4)(3) - stw 0,(JB_CR*4)(3) - stw 17,((JB_GPRS+3)*4)(3) - stfd 17,((JB_FPRS+3*2)*4)(3) - stw 18,((JB_GPRS+4)*4)(3) - stfd 18,((JB_FPRS+4*2)*4)(3) - stw 19,((JB_GPRS+5)*4)(3) - stfd 19,((JB_FPRS+5*2)*4)(3) - stw 20,((JB_GPRS+6)*4)(3) - stfd 20,((JB_FPRS+6*2)*4)(3) - stw 21,((JB_GPRS+7)*4)(3) - stfd 21,((JB_FPRS+7*2)*4)(3) - stw 22,((JB_GPRS+8)*4)(3) - stfd 22,((JB_FPRS+8*2)*4)(3) - stw 23,((JB_GPRS+9)*4)(3) - stfd 23,((JB_FPRS+9*2)*4)(3) - stw 24,((JB_GPRS+10)*4)(3) - stfd 24,((JB_FPRS+10*2)*4)(3) - stw 25,((JB_GPRS+11)*4)(3) - stfd 25,((JB_FPRS+11*2)*4)(3) - stw 26,((JB_GPRS+12)*4)(3) - stfd 26,((JB_FPRS+12*2)*4)(3) - stw 27,((JB_GPRS+13)*4)(3) - stfd 27,((JB_FPRS+13*2)*4)(3) - stw 28,((JB_GPRS+14)*4)(3) - stfd 28,((JB_FPRS+14*2)*4)(3) - stw 29,((JB_GPRS+15)*4)(3) - stfd 29,((JB_FPRS+15*2)*4)(3) - stw 30,((JB_GPRS+16)*4)(3) - stfd 30,((JB_FPRS+16*2)*4)(3) - stw 31,((JB_GPRS+17)*4)(3) - stfd 31,((JB_FPRS+17*2)*4)(3) + std 16,((JB_GPRS+2)*8)(3) + stfd 16,((JB_FPRS+2*2)*8)(3) + std 0,(JB_CR*8)(3) + std 17,((JB_GPRS+3)*8)(3) + stfd 17,((JB_FPRS+3*2)*8)(3) + std 18,((JB_GPRS+4)*8)(3) + stfd 18,((JB_FPRS+4*2)*8)(3) + std 19,((JB_GPRS+5)*8)(3) + stfd 19,((JB_FPRS+5*2)*8)(3) + std 20,((JB_GPRS+6)*8)(3) + stfd 20,((JB_FPRS+6*2)*8)(3) + std 21,((JB_GPRS+7)*8)(3) + stfd 21,((JB_FPRS+7*2)*8)(3) + std 22,((JB_GPRS+8)*8)(3) + stfd 22,((JB_FPRS+8*2)*8)(3) + std 23,((JB_GPRS+9)*8)(3) + stfd 23,((JB_FPRS+9*2)*8)(3) + std 24,((JB_GPRS+10)*8)(3) + stfd 24,((JB_FPRS+10*2)*8)(3) + std 25,((JB_GPRS+11)*8)(3) + stfd 25,((JB_FPRS+11*2)*8)(3) + std 26,((JB_GPRS+12)*8)(3) + stfd 26,((JB_FPRS+12*2)*8)(3) + std 27,((JB_GPRS+13)*8)(3) + stfd 27,((JB_FPRS+13*2)*8)(3) + std 28,((JB_GPRS+14)*8)(3) + stfd 28,((JB_FPRS+14*2)*8)(3) + std 29,((JB_GPRS+15)*8)(3) + stfd 29,((JB_FPRS+15*2)*8)(3) + std 30,((JB_GPRS+16)*8)(3) + stfd 30,((JB_FPRS+16*2)*8)(3) + std 31,((JB_GPRS+17)*8)(3) + stfd 31,((JB_FPRS+17*2)*8)(3) b JUMPTARGET (__sigjmp_save) -.size __sigsetjmp,.-__sigsetjmp +.size .__sigsetjmp,.-.__sigsetjmp diff -uNr dietlibc-0.27/ppc64/start.S dietlibc-0.28/ppc64/start.S --- dietlibc-0.27/ppc64/start.S Fri Oct 10 15:37:34 2003 +++ dietlibc-0.28/ppc64/start.S Sat Sep 11 14:37:57 2004 @@ -53,8 +53,12 @@ bl ._dyn_start #else #warning static +#ifdef WANT_STACKGAP + bl .stackgap +#else bl .main #endif +#endif b .exit .LT_start: diff -uNr dietlibc-0.27/ppc64/umount.S dietlibc-0.28/ppc64/umount.S --- dietlibc-0.27/ppc64/umount.S Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/ppc64/umount.S Fri Dec 17 19:47:59 2004 @@ -0,0 +1,8 @@ +#include "syscalls.h" + + .text +diet_proto(umount) +.umount: + li 0, __NR_umount2 + li 4, 0 + b __unified_syscall diff -uNr dietlibc-0.27/profiling/CVS/Entries dietlibc-0.28/profiling/CVS/Entries --- dietlibc-0.27/profiling/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/profiling/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,6 @@ +/PORTING/1.1/Tue Apr 2 16:04:06 2002// +/README/1.1/Tue Apr 2 16:04:06 2002// +/__mcount.c/1.3/Sun Apr 7 22:13:52 2002// +/monitor.c/1.5/Sun Apr 7 22:13:52 2002// +/profil.c/1.2/Sun Apr 7 22:13:53 2002// +D diff -uNr dietlibc-0.27/profiling/CVS/Repository dietlibc-0.28/profiling/CVS/Repository --- dietlibc-0.27/profiling/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/profiling/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/profiling diff -uNr dietlibc-0.27/profiling/CVS/Root dietlibc-0.28/profiling/CVS/Root --- dietlibc-0.27/profiling/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/profiling/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/s390/CVS/Entries dietlibc-0.28/s390/CVS/Entries --- dietlibc-0.27/s390/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/s390/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,11 @@ +/Makefile.add/1.2/Sat Nov 9 18:10:23 2002// +/__longjmp.S/1.1/Mon Nov 26 14:50:08 2001// +/__testandset.S/1.1/Thu Nov 29 16:53:32 2001// +/__waitpid.c/1.1/Sat Nov 9 18:10:23 2002// +/clone.S/1.4/Mon Sep 16 11:17:01 2002// +/mmap.S/1.3/Fri Oct 10 13:37:34 2003// +/setjmp.S/1.1/Mon Nov 26 14:50:08 2001// +/start.S/1.4/Sat Sep 11 12:37:57 2004// +/syscalls.h/1.3/Sat Apr 12 15:21:46 2003// +/unified.S/1.4/Fri Oct 10 13:37:34 2003// +D diff -uNr dietlibc-0.27/s390/CVS/Repository dietlibc-0.28/s390/CVS/Repository --- dietlibc-0.27/s390/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/s390/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/s390 diff -uNr dietlibc-0.27/s390/CVS/Root dietlibc-0.28/s390/CVS/Root --- dietlibc-0.27/s390/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/s390/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/s390/start.S dietlibc-0.28/s390/start.S --- dietlibc-0.27/s390/start.S Fri Oct 10 15:37:34 2003 +++ dietlibc-0.28/s390/start.S Sat Sep 11 14:37:57 2004 @@ -46,8 +46,12 @@ #ifdef WANT_DYNAMIC .long _dyn_start #else +#ifdef WANT_STACKGAP + .long stackgap +#else .long main #endif +#endif .long exit .long environ diff -uNr dietlibc-0.27/s390x/CVS/Entries dietlibc-0.28/s390x/CVS/Entries --- dietlibc-0.27/s390x/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/s390x/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,11 @@ +/Makefile.add/1.1/Fri Oct 10 13:37:34 2003// +/__longjmp.S/1.1/Fri Oct 10 13:37:34 2003// +/__testandset.S/1.1/Fri Oct 10 13:37:34 2003// +/__waitpid.c/1.1/Fri Oct 10 13:37:34 2003// +/clone.S/1.1/Fri Oct 10 13:37:34 2003// +/mmap.S/1.1/Fri Oct 10 13:37:34 2003// +/setjmp.S/1.1/Fri Oct 10 13:37:34 2003// +/start.S/1.2/Sat Sep 11 12:37:57 2004// +/syscalls.h/1.1/Fri Oct 10 13:37:34 2003// +/unified.S/1.1/Fri Oct 10 13:37:34 2003// +D diff -uNr dietlibc-0.27/s390x/CVS/Repository dietlibc-0.28/s390x/CVS/Repository --- dietlibc-0.27/s390x/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/s390x/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/s390x diff -uNr dietlibc-0.27/s390x/CVS/Root dietlibc-0.28/s390x/CVS/Root --- dietlibc-0.27/s390x/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/s390x/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/s390x/start.S dietlibc-0.28/s390x/start.S --- dietlibc-0.27/s390x/start.S Fri Oct 10 15:37:34 2003 +++ dietlibc-0.28/s390x/start.S Sat Sep 11 14:37:57 2004 @@ -30,8 +30,12 @@ #ifdef WANT_DYNAMIC brasl %r14,_dyn_start #else +#ifdef WANT_STACKGAP + brasl %r14,stackgap +#else brasl %r14,main #endif +#endif /* call exit */ brasl %r14,exit diff -uNr dietlibc-0.27/sparc/CVS/Entries dietlibc-0.28/sparc/CVS/Entries --- dietlibc-0.27/sparc/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/sparc/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,32 @@ +/Makefile.add/1.4/Tue Feb 18 21:11:48 2003// +/__longjmp.S/1.4/Mon Jul 2 16:06:49 2001// +/__testandset.S/1.2/Fri Mar 23 18:53:28 2001// +/atol.S/1.1/Thu Sep 4 01:50:50 2003// +/clone.S/1.6/Thu May 15 15:17:10 2003// +/errlist.S/1.1/Mon Jan 13 15:16:28 2003// +/fork.S/1.5/Thu May 15 15:17:10 2003// +/memccpy.S/1.3/Wed Oct 15 16:19:53 2003// +/memchr.S/1.1/Thu Sep 4 01:50:50 2003// +/memcmp.S/1.1/Thu Sep 4 01:50:50 2003// +/memcpy.S/1.1/Thu Sep 4 01:50:50 2003// +/memmove.S/1.1/Thu Sep 4 01:50:50 2003// +/memset.S/1.1/Thu Sep 4 01:50:50 2003// +/pipe.S/1.4/Thu May 15 15:17:10 2003// +/setjmp.S/1.4/Mon Jul 2 16:06:49 2001// +/shmat.c/1.6/Sat Jun 16 17:48:57 2001// +/sigaction.c/1.3/Wed Jun 4 16:16:49 2003// +/start.S/1.9/Sat Sep 11 12:37:57 2004// +/strcat.S/1.1/Thu Sep 4 01:50:50 2003// +/strchr.S/1.1/Thu Sep 4 01:50:50 2003// +/strcmp.S/1.1/Thu Sep 4 01:50:50 2003// +/strcpy.S/1.1/Thu Sep 4 01:50:50 2003// +/strlen.S/1.1/Fri Jul 26 18:44:33 2002// +/strncmp.S/1.1/Thu Sep 4 01:50:50 2003// +/strncpy.S/1.1/Thu Sep 4 01:50:50 2003// +/strstr.S/1.1/Thu Sep 4 01:50:50 2003// +/syscalls.h/1.6/Fri Nov 7 14:24:39 2003// +/udiv.S/1.3/Tue Feb 18 21:11:48 2003// +/umul.S/1.2/Tue Feb 18 21:11:48 2003// +/unified.S/1.6/Wed Aug 20 14:13:41 2003// +/urem.S/1.3/Tue Feb 18 21:11:48 2003// +D diff -uNr dietlibc-0.27/sparc/CVS/Repository dietlibc-0.28/sparc/CVS/Repository --- dietlibc-0.27/sparc/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/sparc/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/sparc diff -uNr dietlibc-0.27/sparc/CVS/Root dietlibc-0.28/sparc/CVS/Root --- dietlibc-0.27/sparc/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/sparc/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/sparc/start.S dietlibc-0.28/sparc/start.S --- dietlibc-0.27/sparc/start.S Wed Aug 20 16:13:41 2003 +++ dietlibc-0.28/sparc/start.S Sat Sep 11 14:37:57 2004 @@ -32,8 +32,12 @@ #ifdef WANT_DYNAMIC call dyn_start #else +#ifdef WANT_STACKGAP + call stackgap +#else call main #endif +#endif mov %g1, %o3 b exit diff -uNr dietlibc-0.27/sparc64/CVS/Entries dietlibc-0.28/sparc64/CVS/Entries --- dietlibc-0.27/sparc64/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/sparc64/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,16 @@ +/Makefile.add/1.3/Thu Mar 25 21:11:00 2004// +/README/1.1/Tue Mar 26 13:07:38 2002// +/__longjmp.S/1.1/Tue Mar 26 13:07:38 2002// +/__testandset.S/1.1/Thu Mar 21 16:06:58 2002// +/__time.c/1.1/Thu Mar 25 21:11:00 2004// +/clone.S/1.1/Thu Mar 21 16:06:58 2002// +/errlist.S/1.1/Mon Jan 13 15:16:28 2003// +/fork.S/1.2/Thu May 15 15:17:10 2003// +/longjmp.S/1.2/Mon Sep 16 11:17:02 2002// +/pipe.S/1.2/Thu May 15 15:17:10 2003// +/setjmp.S/1.1/Tue Mar 26 13:07:38 2002// +/sigjmp.S/1.1/Tue Mar 26 13:07:38 2002// +/start.S/1.4/Sat Sep 11 12:37:57 2004// +/syscalls.h/1.1/Thu Mar 21 16:06:58 2002// +/unified.S/1.3/Wed Aug 20 14:13:41 2003// +D diff -uNr dietlibc-0.27/sparc64/CVS/Repository dietlibc-0.28/sparc64/CVS/Repository --- dietlibc-0.27/sparc64/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/sparc64/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/sparc64 diff -uNr dietlibc-0.27/sparc64/CVS/Root dietlibc-0.28/sparc64/CVS/Root --- dietlibc-0.27/sparc64/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/sparc64/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/sparc64/start.S dietlibc-0.28/sparc64/start.S --- dietlibc-0.27/sparc64/start.S Wed Aug 20 16:13:41 2003 +++ dietlibc-0.28/sparc64/start.S Sat Sep 11 14:37:57 2004 @@ -32,8 +32,12 @@ #ifdef WANT_DYNAMIC call dyn_start #else +#ifdef WANT_STACKGAP + call stackgap +#else call main #endif +#endif mov %g1, %o3 b exit diff -uNr dietlibc-0.27/syscalls.s/CVS/Entries dietlibc-0.28/syscalls.s/CVS/Entries --- dietlibc-0.27/syscalls.s/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/syscalls.s/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,193 @@ +/__getpagesize.S/1.1/Thu Apr 19 17:46:38 2001// +/__pread.S/1.4/Mon May 10 21:05:07 2004// +/__pwrite.S/1.2/Mon May 10 21:05:07 2004// +/__reboot.S/1.1/Mon Feb 5 17:49:41 2001// +/_llseek.S/1.3/Thu Apr 29 14:37:25 2004// +/access.S/1.1/Tue Jan 9 17:57:48 2001// +/adjtimex.S/1.1/Sat Aug 25 18:54:37 2001// +/alarm.S/1.3/Fri Oct 10 13:37:34 2003// +/bdflush.S/1.1/Mon Nov 11 16:51:46 2002// +/brk.S/1.1/Tue Jan 9 17:57:48 2001// +/capget.S/1.1/Tue Oct 7 14:39:44 2003// +/capset.S/1.1/Tue Oct 7 14:39:44 2003// +/chdir.S/1.1/Tue Jan 9 17:57:48 2001// +/chmod.S/1.1/Tue Jan 9 17:57:48 2001// +/chown.S/1.1/Tue Jan 9 17:57:48 2001// +/chown32.S/1.1/Mon Sep 3 23:35:15 2001// +/chroot.S/1.1/Tue Jan 9 17:57:48 2001// +/clock_getres.S/1.1/Wed Apr 14 13:13:29 2004// +/clock_gettime.S/1.1/Wed Apr 14 13:13:29 2004// +/clock_settime.S/1.1/Wed Apr 14 13:13:29 2004// +/close.S/1.2/Tue Jan 30 14:46:53 2001// +/create_module.S/1.1/Fri Sep 28 19:44:22 2001// +/delete_module.S/1.1/Fri Sep 28 19:44:22 2001// +/dup.S/1.1/Tue Jan 9 17:57:48 2001// +/dup2.S/1.1/Tue Jan 9 17:57:48 2001// +/environ.S/1.10/Tue Sep 28 00:01:30 2004// +/epoll_create.S/1.2/Sat Apr 12 15:19:01 2003// +/epoll_ctl.S/1.2/Sat Apr 12 15:19:01 2003// +/epoll_wait.S/1.2/Sat Apr 12 15:19:01 2003// +/errlist.S/1.6/Wed Aug 20 13:32:05 2003// +/errno.S/1.4/Fri Nov 15 15:39:17 2002// +/execve.S/1.1/Tue Jan 9 17:57:48 2001// +/fchdir.S/1.1/Tue Jan 9 17:57:48 2001// +/fchmod.S/1.1/Tue Jan 9 17:57:48 2001// +/fchown.S/1.1/Tue Jan 9 17:57:48 2001// +/fchown32.S/1.1/Mon Sep 3 23:35:15 2001// +/fcntl.S/1.2/Tue Jan 30 14:46:53 2001// +/fdatasync.S/1.1/Thu Feb 21 00:33:37 2002// +/flock.S/1.1/Tue Jan 9 17:57:48 2001// +/fork.S/1.2/Tue Jan 30 14:46:53 2001// +/fstat.S/1.1/Sat Feb 3 00:37:00 2001// +/fstat64.S/1.3/Sat Jan 4 22:21:48 2003// +/fstatfs.S/1.1/Tue Jan 9 17:57:48 2001// +/fsync.S/1.2/Tue Jan 30 15:33:27 2001// +/ftruncate.S/1.1/Tue Jan 9 17:57:48 2001// +/ftruncate64.S/1.1/Sun May 5 21:44:08 2002// +/getcwd.S/1.2/Wed May 9 01:16:05 2001// +/getdents.S/1.1/Tue Jan 9 17:57:48 2001// +/getdents64.S/1.3/Fri Nov 8 17:07:09 2002// +/getegid.S/1.1/Tue Jan 9 17:57:48 2001// +/getegid32.S/1.1/Mon Sep 3 23:35:15 2001// +/geteuid.S/1.1/Tue Jan 9 17:57:48 2001// +/geteuid32.S/1.1/Mon Sep 3 23:35:15 2001// +/getgid.S/1.1/Tue Jan 9 17:57:48 2001// +/getgid32.S/1.1/Mon Sep 3 23:35:15 2001// +/getgroups.S/1.1/Tue Jan 9 17:57:48 2001// +/getgroups32.S/1.1/Mon Sep 3 23:35:15 2001// +/getitimer.S/1.1/Wed Mar 14 15:22:21 2001// +/getpgid.S/1.1/Tue Jan 9 17:57:48 2001// +/getpid.S/1.1/Tue Jan 9 17:57:48 2001// +/getppid.S/1.1/Tue Jan 9 17:57:48 2001// +/getpriority.S/1.1/Thu Jan 25 12:48:03 2001// +/getresgid.S/1.1/Tue Jan 9 17:57:48 2001// +/getresgid32.S/1.1/Mon Sep 3 23:35:15 2001// +/getresuid.S/1.2/Thu May 31 19:35:04 2001// +/getrlimit.S/1.1/Tue Jan 9 17:57:48 2001// +/getrusage.S/1.1/Tue Jan 9 17:57:48 2001// +/getsid.S/1.1/Tue Jan 9 17:57:48 2001// +/gettimeofday.S/1.1/Tue Jan 9 17:57:48 2001// +/getuid.S/1.1/Tue Jan 9 17:57:49 2001// +/getuid32.S/1.1/Mon Sep 3 23:35:15 2001// +/init_module.S/1.1/Fri Sep 28 19:44:22 2001// +/ioctl.S/1.1/Tue Jan 9 17:57:49 2001// +/ioperm.S/1.1/Tue May 15 23:56:35 2001// +/iopl.S/1.2/Thu Apr 26 10:30:30 2001// +/ipc.S/1.2/Sat Jan 4 22:21:48 2003// +/kill.S/1.1/Tue Jan 9 17:57:49 2001// +/lchown.S/1.1/Tue Jan 9 17:57:49 2001// +/lchown32.S/1.1/Mon Sep 3 23:35:15 2001// +/link.S/1.1/Tue Jan 9 17:57:49 2001// +/lseek.S/1.2/Tue Jan 30 15:33:27 2001// +/lstat.S/1.1/Sat Feb 3 00:37:00 2001// +/lstat64.S/1.3/Sat Jan 4 22:21:48 2003// +/madvise.S/1.1/Mon Oct 22 20:20:53 2001// +/mkdir.S/1.1/Tue Jan 9 17:57:49 2001// +/mknod.S/1.1/Tue Jan 9 17:57:49 2001// +/mlock.S/1.1/Thu May 31 17:13:09 2001// +/mlockall.S/1.1/Wed May 2 21:06:24 2001// +/mmap.S/1.1/Thu May 15 15:17:10 2003// +/mmap2.S/1.1/Tue Nov 26 00:41:46 2002// +/mount.S/1.1/Tue Jan 9 17:57:49 2001// +/mprotect.S/1.1/Tue Jan 9 17:57:49 2001// +/mremap.S/1.1/Tue Jan 9 17:57:49 2001// +/msync.S/1.3/Wed Feb 12 15:56:06 2003// +/munlock.S/1.1/Wed Aug 14 13:52:20 2002// +/munlockall.S/1.1/Wed May 2 21:06:24 2001// +/munmap.S/1.1/Tue Jan 9 17:57:49 2001// +/n_sigaction.S/1.2/Sat Jan 4 22:21:48 2003// +/n_sigpending.S/1.2/Sat Jan 4 22:21:48 2003// +/n_sigprocmask.S/1.2/Sat Jan 4 22:21:48 2003// +/n_sigsuspend.S/1.2/Sat Jan 4 22:21:48 2003// +/nanosleep.S/1.2/Tue Jan 30 15:33:27 2001// +/nice.S/1.2/Sat Nov 9 18:23:19 2002// +/open.S/1.2/Tue Jan 30 15:33:27 2001// +/pause.S/1.3/Sat Jan 4 22:21:48 2003// +/personality.S/1.1/Sun Apr 22 14:30:13 2001// +/pipe.S/1.1/Tue Jan 9 17:57:49 2001// +/pivot_root.S/1.1/Thu Aug 23 18:33:44 2001// +/poll.S/1.1/Tue Jan 9 17:57:49 2001// +/prctl.S/1.1/Tue Nov 13 16:19:36 2001// +/ptrace.S/1.2/Sat Feb 23 15:57:31 2002// +/query_module.S/1.1/Sun May 6 00:34:27 2001// +/read.S/1.2/Tue Jan 30 14:46:53 2001// +/readlink.S/1.1/Tue Jan 9 17:57:49 2001// +/readv.S/1.1/Thu Jan 11 15:58:42 2001// +/rename.S/1.1/Tue Jan 9 17:57:49 2001// +/rmdir.S/1.1/Tue Jan 9 17:57:49 2001// +/rt_sigaction.S/1.1/Thu Jul 19 20:33:23 2001// +/rt_sigpending.S/1.1/Thu Jul 19 20:33:23 2001// +/rt_sigprocmask.S/1.1/Thu Jul 19 20:33:23 2001// +/rt_sigqueueinfo.S/1.1/Thu Jul 19 20:33:23 2001// +/rt_sigsuspend.S/1.1/Thu Jul 19 20:33:23 2001// +/rt_sigtimedwait.S/1.1/Thu Jul 19 20:33:23 2001// +/sched_get_priority_max.S/1.1/Thu Jan 25 18:13:44 2001// +/sched_get_priority_min.S/1.1/Thu Jan 25 18:13:44 2001// +/sched_getparam.S/1.1/Thu Jan 25 18:13:44 2001// +/sched_getscheduler.S/1.1/Thu Jan 25 18:13:44 2001// +/sched_rr_get_interval.S/1.1/Thu Jan 25 18:13:44 2001// +/sched_setparam.S/1.1/Thu Jan 25 18:13:44 2001// +/sched_setscheduler.S/1.1/Thu Jan 25 18:13:44 2001// +/sched_yield.S/1.1/Thu Jan 25 18:13:44 2001// +/select.S/1.2/Tue Jan 30 14:46:53 2001// +/sendfile.S/1.4/Mon Nov 25 23:37:19 2002// +/sendfile64.S/1.2/Mon May 19 11:35:46 2003// +/setdomainname.S/1.1/Tue Jan 9 17:57:49 2001// +/setfsgid.S/1.1/Fri May 18 14:19:22 2001// +/setfsgid32.S/1.1/Mon Sep 3 23:35:16 2001// +/setfsuid.S/1.1/Fri May 18 14:19:22 2001// +/setfsuid32.S/1.1/Mon Sep 3 23:35:16 2001// +/setgid.S/1.1/Tue Jan 9 17:57:49 2001// +/setgid32.S/1.1/Mon Sep 3 23:35:16 2001// +/setgroups.S/1.1/Tue Jan 9 17:57:49 2001// +/sethostname.S/1.1/Tue Jan 9 17:57:49 2001// +/setitimer.S/1.1/Tue Jan 9 17:57:49 2001// +/setpgid.S/1.1/Tue Jan 9 17:57:49 2001// +/setpriority.S/1.1/Thu Jan 25 12:48:03 2001// +/setregid.S/1.1/Tue Jan 9 17:57:49 2001// +/setregid32.S/1.1/Mon Sep 3 23:35:16 2001// +/setresgid.S/1.3/Thu May 31 19:32:50 2001// +/setresgid32.S/1.1/Mon Sep 3 23:35:16 2001// +/setresuid.S/1.3/Thu May 31 19:32:50 2001// +/setreuid.S/1.1/Tue Jan 9 17:57:49 2001// +/setreuid32.S/1.1/Mon Sep 3 23:35:16 2001// +/setrlimit.S/1.1/Tue Jan 9 17:57:49 2001// +/setsid.S/1.1/Tue Jan 9 17:57:49 2001// +/settimeofday.S/1.1/Wed Aug 1 21:34:34 2001// +/setuid.S/1.1/Tue Jan 9 17:57:49 2001// +/setuid32.S/1.1/Mon Sep 3 23:35:16 2001// +/sigaltstack.S/1.2/Tue Jan 30 14:46:53 2001// +/socketcall.S/1.2/Sat Jan 4 22:21:48 2003// +/stat.S/1.1/Sat Feb 3 00:37:00 2001// +/stat64.S/1.3/Sat Jan 4 22:21:48 2003// +/statfs.S/1.1/Tue Jan 9 17:57:49 2001// +/stime.S/1.2/Thu Aug 8 16:30:13 2002// +/swapoff.S/1.1/Tue Jan 9 17:57:49 2001// +/swapon.S/1.1/Tue Jan 9 17:57:49 2001// +/symlink.S/1.1/Tue Jan 9 17:57:49 2001// +/sync.S/1.1/Tue Jan 9 17:57:49 2001// +/sysctl.S/1.3/Tue Aug 19 15:28:11 2003// +/sysfs.S/1.1/Mon Sep 1 17:18:44 2003// +/sysinfo.S/1.1/Sun May 6 00:07:29 2001// +/syslog.S/1.2/Thu Aug 23 18:33:44 2001// +/time.S/1.2/Thu Mar 21 16:05:18 2002// +/timer_create.S/1.1/Wed Apr 14 13:13:29 2004// +/timer_delete.S/1.1/Wed Apr 14 13:13:29 2004// +/timer_getoverrun.S/1.1/Wed Apr 14 13:13:29 2004// +/timer_gettime.S/1.1/Wed Apr 14 13:13:29 2004// +/timer_settime.S/1.1/Wed Apr 14 13:13:29 2004// +/times.S/1.1/Sun Feb 11 21:54:32 2001// +/truncate.S/1.1/Tue Jan 9 17:57:49 2001// +/truncate64.S/1.2/Sun May 5 21:49:30 2002// +/umask.S/1.1/Tue Jan 9 17:57:49 2001// +/umount.S/1.1/Tue Jan 9 17:57:49 2001// +/umount2.S/1.2/Sat Jan 4 22:21:48 2003// +/uname.S/1.1/Tue Jan 9 17:57:49 2001// +/unlink.S/1.1/Tue Jan 9 17:57:49 2001// +/utime.S/1.1/Tue Jan 9 17:57:49 2001// +/vhangup.S/1.1/Tue Jan 9 17:57:49 2001// +/wait4.S/1.1/Tue Jan 9 17:57:49 2001// +/waitpid.S/1.3/Sat Nov 9 18:08:59 2002// +/write.S/1.2/Tue Jan 30 14:46:53 2001// +/writev.S/1.1/Thu Jan 11 15:58:42 2001// +D diff -uNr dietlibc-0.27/syscalls.s/CVS/Repository dietlibc-0.28/syscalls.s/CVS/Repository --- dietlibc-0.27/syscalls.s/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/syscalls.s/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/syscalls.s diff -uNr dietlibc-0.27/syscalls.s/CVS/Root dietlibc-0.28/syscalls.s/CVS/Root --- dietlibc-0.27/syscalls.s/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/syscalls.s/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/syscalls.s/environ.S dietlibc-0.28/syscalls.s/environ.S --- dietlibc-0.27/syscalls.s/environ.S Fri Nov 15 16:39:17 2002 +++ dietlibc-0.28/syscalls.s/environ.S Tue Sep 28 02:01:30 2004 @@ -1,5 +1,6 @@ .section ".bss" .align 8 +#include .type environ,object .weak environ diff -uNr dietlibc-0.27/t.c dietlibc-0.28/t.c --- dietlibc-0.27/t.c Tue Apr 2 18:04:05 2002 +++ dietlibc-0.28/t.c Sat Sep 11 14:37:57 2004 @@ -104,7 +104,9 @@ __asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx") int main(int argc,char *argv[]) { + char buf[100]; __write2("foo!\n"); + memset(buf,0,200); #if 0 printf("%+05d\n",500); #endif diff -uNr dietlibc-0.27/test/CVS/Entries dietlibc-0.28/test/CVS/Entries --- dietlibc-0.27/test/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,92 @@ +/Makefile/1.1/Mon Dec 15 13:07:42 2003// +/adjtime.c/1.2/Mon Aug 5 18:08:24 2002// +/argv.c/1.3/Mon Dec 15 13:07:42 2003// +/asprintf.c/1.2/Mon Dec 15 13:07:42 2003// +/atexit.c/1.2/Thu Feb 20 15:57:12 2003// +/bsearch.c/1.4/Mon Dec 15 13:07:42 2003// +/byteswap.c/1.2/Mon Dec 15 13:07:42 2003// +/calloc.c/1.2/Thu Feb 20 15:57:12 2003// +/confstr.c/1.1/Mon Aug 18 17:32:53 2003// +/crypt.c/1.1/Fri Dec 17 20:29:56 2004// +/cycles.c/1.5/Tue Aug 24 10:10:48 2004// +/dirname.c/1.1/Mon Jan 19 15:31:16 2004// +/empty.c/1.1/Tue Oct 23 01:44:40 2001// +/ffs.c/1.2/Mon Dec 15 13:07:42 2003// +/flush.c/1.2/Thu Feb 20 15:57:12 2003// +/fnmatch.c/1.3/Thu Feb 20 15:57:12 2003// +/fputc.c/1.1/Sun Sep 14 04:40:37 2003// +/fstab/1.2/Mon Dec 15 13:07:42 2003// +/ftw.c/1.2/Mon Dec 15 13:07:42 2003// +/fwrite.c/1.2/Thu Feb 20 15:57:12 2003// +/getaddrinfo.c/1.2/Thu Feb 20 15:57:12 2003// +/getdelim.c/1.1/Fri Mar 1 23:37:07 2002// +/getenv.c/1.2/Thu Feb 20 15:57:12 2003// +/getgrnam.c/1.2/Thu Feb 20 15:57:12 2003// +/gethostbyaddr.c/1.3/Fri Feb 21 02:33:21 2003// +/gethostbyname.c/1.4/Mon Dec 15 13:07:42 2003// +/gethostbyname_r.c/1.2/Mon Dec 15 13:07:42 2003// +/getmntent.c/1.4/Mon Dec 15 13:07:42 2003// +/getopt.c/1.1/Tue Jul 31 14:24:34 2001// +/getpass.c/1.1/Sun Nov 4 22:41:38 2001// +/getpwnam.c/1.3/Mon Dec 15 13:07:42 2003// +/getservbyname.c/1.5/Mon Dec 15 13:07:42 2003// +/getservbyport.c/1.3/Mon Dec 15 13:07:42 2003// +/getusershell.c/1.3/Mon Dec 15 13:07:42 2003// +/glob.c/1.2/Mon Dec 15 13:07:42 2003// +/grent.c/1.2/Thu Feb 20 15:57:12 2003// +/hasmntopt.c/1.2/Thu Feb 20 15:57:12 2003// +/hello.c/1.2/Mon Dec 15 13:07:42 2003// +/iconv.c/1.2/Mon Dec 15 13:07:42 2003// +/if_nameindex.c/1.2/Thu Feb 20 15:57:12 2003// +/ltostr.c/1.3/Mon Dec 15 13:07:42 2003// +/malloc-debugger.c/1.2/Thu Feb 20 15:57:13 2003// +/md5_testharness.c/1.6/Tue Aug 24 10:10:48 2004// +/memccpy.c/1.1/Tue Apr 2 14:57:42 2002// +/memchr.c/1.4/Fri Mar 26 23:28:13 2004// +/memcmp.c/1.2/Thu Feb 20 15:57:13 2003// +/memcpy.c/1.3/Thu Feb 20 15:57:13 2003// +/memrchr.c/1.1/Sat Jun 1 17:04:59 2002// +/memusage.c/1.2/Thu Feb 20 15:57:13 2003// +/mktime.c/1.3/Sat Mar 27 00:47:00 2004// +/mmap_test.c/1.1/Mon Feb 18 00:37:31 2002// +/pipe.c/1.1/Mon May 13 15:56:48 2002// +/printf.c/1.5/Wed Jan 7 15:06:48 2004// +/printftest.c/1.2/Mon Dec 15 13:07:42 2003// +/printftest.exp/1.1/Fri Oct 17 14:36:38 2003// +/protoent.c/1.3/Mon Dec 15 13:07:42 2003// +/prototypes.c/1.3/Sun Apr 6 02:39:29 2003// +/putenv.c/1.2/Thu Feb 20 15:57:13 2003// +/pwent.c/1.2/Thu Feb 20 15:57:13 2003// +/rand48.c/1.1/Wed May 29 13:20:40 2002// +/read1.c/1.2/Thu Feb 20 15:57:13 2003// +/readdir.c/1.3/Thu Feb 20 15:57:13 2003// +/realpath.c/1.1/Tue Jan 27 21:50:42 2004// +/regex.c/1.10/Tue Jun 3 12:05:40 2003// +/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// +/select.c/1.2/Thu Feb 20 15:57:13 2003// +/sendfile.c/1.2/Mon Dec 15 13:07:42 2003// +/servent.c/1.4/Mon Dec 15 13:07:42 2003// +/siglist.c/1.2/Mon Dec 15 13:07:42 2003// +/speed.c/1.2/Mon Dec 15 13:07:42 2003// +/spent.c/1.3/Mon Dec 15 13:07:42 2003// +/sprintf.c/1.7/Wed Dec 3 20:51:24 2003// +/sscanf.c/1.4/Thu Feb 20 15:57:13 2003// +/stdarg.c/1.1/Sun Jun 24 16:37:20 2001// +/stdio.c/1.3/Thu Feb 20 15:57:13 2003// +/strcasecmp.c/1.4/Mon Dec 15 13:07:42 2003// +/strcmp.c/1.4/Sun Dec 21 12:06:36 2003// +/strlen.c/1.2/Thu Feb 20 15:57:13 2003// +/strncat.c/1.3/Thu Feb 20 15:57:13 2003// +/strncpy.c/1.2/Thu Feb 20 15:57:13 2003// +/strptime.c/1.2/Mon Dec 15 13:07:42 2003// +/strrchr.c/1.2/Thu Feb 20 15:57:13 2003// +/strstr.c/1.2/Thu Feb 20 15:57:13 2003// +/strtol.c/1.4/Tue Aug 24 10:10:48 2004// +/syscall.c/1.2/Thu Feb 20 15:57:13 2003// +/sysenter.c/1.2/Mon Dec 15 13:07:42 2003// +/test-getlongopt.c/1.1/Mon Sep 24 14:58:33 2001// +/test-newfnmatch.c/1.1/Mon Jan 19 16:09:22 2004// +/testandset.c/1.2/Thu Feb 20 15:57:13 2003// +/ungetc.c/1.2/Mon Dec 15 13:07:42 2003// +/waitpid.c/1.2/Mon Dec 15 13:07:42 2003// +D diff -uNr dietlibc-0.27/test/CVS/Entries.Log dietlibc-0.28/test/CVS/Entries.Log --- dietlibc-0.27/test/CVS/Entries.Log Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/CVS/Entries.Log Mon Jan 31 18:53:10 2005 @@ -0,0 +1,6 @@ +A D/dirent//// +A D/inet//// +A D/stdio//// +A D/stdlib//// +A D/string//// +A D/time//// diff -uNr dietlibc-0.27/test/CVS/Repository dietlibc-0.28/test/CVS/Repository --- dietlibc-0.27/test/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/test diff -uNr dietlibc-0.27/test/CVS/Root dietlibc-0.28/test/CVS/Root --- dietlibc-0.27/test/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/test/crypt.c dietlibc-0.28/test/crypt.c --- dietlibc-0.27/test/crypt.c Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/crypt.c Fri Dec 17 21:29:56 2004 @@ -0,0 +1,21 @@ +#include +#include +#include + +int main(int argc,char* argv[]) { + char salt[2]; + char charset[100]; + unsigned int l,i; + int fd; + for (l=i=0; i<'z'-'a'; ++i) { charset[l]=i+'a'; ++l; } + for (i=0; i<'Z'-'A'; ++i) { charset[l]=i+'A'; ++l; } + for (i=0; i<'9'-'0'; ++i) { charset[l]=i+'0'; ++l; } + charset[l]='.'; charset[l+1]='/'; i=l+2; + fd=open("/dev/urandom",O_RDONLY); + read(fd,&l,sizeof(l)); + salt[0]=charset[l%i]; + salt[1]=charset[(l/i)%i]; + close(fd); + for (l=1; argv[l]; ++l) + printf("password %s with salt %c%c -> %s\n",argv[l],salt[0],salt[1],crypt(argv[l],salt)); +} diff -uNr dietlibc-0.27/test/cycles.c dietlibc-0.28/test/cycles.c --- dietlibc-0.27/test/cycles.c Mon Dec 15 14:07:42 2003 +++ dietlibc-0.28/test/cycles.c Tue Aug 24 12:10:48 2004 @@ -4,14 +4,26 @@ #include #include +#if defined (__i386__) +#define RDTSC(dst) asm volatile ("rdtsc" : "=A" (dst)) +#elif defined (__x86_64__) +#define RDTSC(dst) do { \ + uint32_t l, h; \ + asm volatile ("rdtsc" : "=a" (l), "=d" (h)); \ + dst = (((uint64_t)h) << 32) | l; \ +} while (0) +#else +#error "Unimplemented rdtsc" +#endif + extern char **environ; int main(int argc,char* argv[]) { uint64_t a,b; - asm volatile("rdtsc":"=A"(a)); + RDTSC(a); if (!fork()) { execve(argv[1],argv+1,environ); exit(1); } wait(0); - asm volatile("rdtsc":"=A"(b)); + RDTSC(b); printf("%llu cycles\n",b-a); return 0; diff -uNr dietlibc-0.27/test/dirent/CVS/Entries dietlibc-0.28/test/dirent/CVS/Entries --- dietlibc-0.27/test/dirent/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/dirent/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,5 @@ +/Makefile/1.1/Mon Dec 15 13:07:42 2003// +/opendir-tst1.c/1.1/Mon Dec 15 13:07:42 2003// +/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// +/tst-seekdir.c/1.1/Mon Dec 15 13:07:42 2003// +D diff -uNr dietlibc-0.27/test/dirent/CVS/Repository dietlibc-0.28/test/dirent/CVS/Repository --- dietlibc-0.27/test/dirent/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/dirent/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/test/dirent diff -uNr dietlibc-0.27/test/dirent/CVS/Root dietlibc-0.28/test/dirent/CVS/Root --- dietlibc-0.27/test/dirent/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/dirent/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/test/inet/CVS/Entries dietlibc-0.28/test/inet/CVS/Entries --- dietlibc-0.27/test/inet/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/inet/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,7 @@ +/Makefile/1.1/Mon Dec 15 13:07:42 2003// +/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// +/test_ifindex.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-gethnm.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-network.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-ntoa.c/1.1/Mon Dec 15 13:07:42 2003// +D diff -uNr dietlibc-0.27/test/inet/CVS/Repository dietlibc-0.28/test/inet/CVS/Repository --- dietlibc-0.27/test/inet/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/inet/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/test/inet diff -uNr dietlibc-0.27/test/inet/CVS/Root dietlibc-0.28/test/inet/CVS/Root --- dietlibc-0.27/test/inet/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/inet/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/test/md5_testharness.c dietlibc-0.28/test/md5_testharness.c --- dietlibc-0.27/test/md5_testharness.c Mon Dec 15 14:07:42 2003 +++ dietlibc-0.28/test/md5_testharness.c Tue Aug 24 12:10:48 2004 @@ -9,7 +9,7 @@ #include -#if defined (__i386__) +#if defined (__i386__) || defined (__x86_64__) #define RDTSC(dst) { asm volatile ("rdtsc" : "=a" (dst) : : "edx"); } #define ITERATIONS 10 #else diff -uNr dietlibc-0.27/test/stdio/CVS/Entries dietlibc-0.28/test/stdio/CVS/Entries --- dietlibc-0.27/test/stdio/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/stdio/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,18 @@ +/Makefile/1.1/Mon Dec 15 13:07:42 2003// +/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// +/tst-fdopen.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-ferror.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-fileno.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-fphex.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-fseek.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-printf.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-printfsz.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-sprintf.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-sscanf.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-tmpnam.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-unbputc.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-ungetc.c/1.1/Mon Dec 15 13:07:42 2003// +/tstdiomisc.c/1.1/Mon Dec 15 13:07:42 2003// +/tstgetln.c/1.1/Mon Dec 15 13:07:42 2003// +/tstscanf.c/1.1/Mon Dec 15 13:07:42 2003// +D diff -uNr dietlibc-0.27/test/stdio/CVS/Repository dietlibc-0.28/test/stdio/CVS/Repository --- dietlibc-0.27/test/stdio/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/stdio/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/test/stdio diff -uNr dietlibc-0.27/test/stdio/CVS/Root dietlibc-0.28/test/stdio/CVS/Root --- dietlibc-0.27/test/stdio/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/stdio/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/test/stdlib/CVS/Entries dietlibc-0.28/test/stdlib/CVS/Entries --- dietlibc-0.27/test/stdlib/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/stdlib/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,16 @@ +/Makefile/1.1/Mon Dec 15 13:07:42 2003// +/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// +/test-canon.c/1.1/Mon Dec 15 13:07:42 2003// +/testdiv.c/1.1/Mon Dec 15 13:07:42 2003// +/testrand.c/1.1/Mon Dec 15 13:07:42 2003// +/testsort.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-calloc.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-environ.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-limits.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-malloc.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-rand48.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-strtod.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-strtol.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-strtoll.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-system.c/1.1/Mon Dec 15 13:07:42 2003// +D diff -uNr dietlibc-0.27/test/stdlib/CVS/Repository dietlibc-0.28/test/stdlib/CVS/Repository --- dietlibc-0.27/test/stdlib/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/stdlib/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/test/stdlib diff -uNr dietlibc-0.27/test/stdlib/CVS/Root dietlibc-0.28/test/stdlib/CVS/Root --- dietlibc-0.27/test/stdlib/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/stdlib/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/test/string/CVS/Entries dietlibc-0.28/test/string/CVS/Entries --- dietlibc-0.27/test/string/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/string/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,15 @@ +/Makefile/1.1/Mon Dec 15 13:07:42 2003// +/memccpy.c/1.1/Mon Dec 15 13:07:42 2003// +/memchr.c/1.1/Mon Dec 15 13:07:42 2003// +/memcmp.c/1.1/Mon Dec 15 13:07:42 2003// +/memcpy.c/1.1/Mon Dec 15 13:07:42 2003// +/memrchr.c/1.1/Mon Dec 15 13:07:42 2003// +/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// +/strcasecmp.c/1.1/Mon Dec 15 13:07:42 2003// +/strcmp.c/1.1/Mon Dec 15 13:07:42 2003// +/strlen.c/1.1/Mon Dec 15 13:07:42 2003// +/strncat.c/1.1/Mon Dec 15 13:07:42 2003// +/strncpy.c/1.1/Mon Dec 15 13:07:42 2003// +/strrchr.c/1.1/Mon Dec 15 13:07:42 2003// +/strstr.c/1.1/Mon Dec 15 13:07:42 2003// +D diff -uNr dietlibc-0.27/test/string/CVS/Repository dietlibc-0.28/test/string/CVS/Repository --- dietlibc-0.27/test/string/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/string/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/test/string diff -uNr dietlibc-0.27/test/string/CVS/Root dietlibc-0.28/test/string/CVS/Root --- dietlibc-0.27/test/string/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/string/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/test/strtol.c dietlibc-0.28/test/strtol.c --- dietlibc-0.27/test/strtol.c Mon Dec 15 14:07:42 2003 +++ dietlibc-0.28/test/strtol.c Tue Aug 24 12:10:48 2004 @@ -54,7 +54,10 @@ assert(strtol(s="9223372036854775808",&c,0)==9223372036854775807 && c==s+19 && errno==ERANGE); assert(strtol(s="922337203685477580777",&c,0)==9223372036854775807 && c==s+21 && errno==ERANGE); assert(strtol(s="9223372036854775810",&c,0)==9223372036854775807 && c==s+19 && errno==ERANGE); - assert(strtol(s="-2147483648",&c,0)==-2147483648 && c==s+11 && errno==0); + /* dietlibc would also fail this because we don't set errno to 0 + * when returning 0x8000000 in non-failure cases on 64-bit platforms. + * POSIX says: The strtol() function shall not change the setting of errno if successful. */ + errno=0; assert(strtol(s="-2147483648",&c,0)==-2147483648 && c==s+11 && errno==0); assert(strtol(s="-9223372036854775808",&c,0)==0x8000000000000000 && c==s+20 && errno==0); assert(strtol(s="-9223372036854775809",&c,0)==0x8000000000000000 && c==s+20 && errno==ERANGE); assert(strtol(s="0x112233445566778899z",&c,0)==9223372036854775807 && c==s+20 && errno==ERANGE); diff -uNr dietlibc-0.27/test/time/CVS/Entries dietlibc-0.28/test/time/CVS/Entries --- dietlibc-0.27/test/time/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/time/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,7 @@ +/Makefile/1.1/Mon Dec 15 13:07:42 2003// +/runtests.sh/1.1/Mon Dec 15 13:07:42 2003// +/tst-mktime.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-posixtz.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-strftime.c/1.1/Mon Dec 15 13:07:42 2003// +/tst-strptime.c/1.1/Mon Dec 15 13:07:42 2003// +D diff -uNr dietlibc-0.27/test/time/CVS/Repository dietlibc-0.28/test/time/CVS/Repository --- dietlibc-0.27/test/time/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/time/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/test/time diff -uNr dietlibc-0.27/test/time/CVS/Root dietlibc-0.28/test/time/CVS/Root --- dietlibc-0.27/test/time/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/test/time/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/x86_64/CVS/Entries dietlibc-0.28/x86_64/CVS/Entries --- dietlibc-0.27/x86_64/CVS/Entries Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/x86_64/CVS/Entries Mon Jan 31 18:53:10 2005 @@ -0,0 +1,41 @@ +/Makefile.add/1.2/Wed Aug 7 01:21:51 2002// +/__longjmp.S/1.1/Fri Aug 30 16:40:22 2002// +/__testandset.S/1.2/Mon Sep 16 11:17:02 2002// +/accept.S/1.1/Mon Aug 5 18:08:41 2002// +/bind.S/1.1/Mon Aug 5 18:08:41 2002// +/clone.S/1.3/Fri Jan 28 16:04:54 2005// +/connect.S/1.1/Mon Aug 5 18:08:41 2002// +/dyn_syscalls.S/1.1/Fri Jan 28 16:04:54 2005// +/getpeername.S/1.1/Mon Aug 5 18:08:41 2002// +/getsockname.S/1.1/Mon Aug 5 18:08:41 2002// +/getsockopt.S/1.1/Mon Aug 5 18:08:41 2002// +/listen.S/1.1/Mon Aug 5 18:08:41 2002// +/msgctl.S/1.1/Sat Jan 4 22:21:48 2003// +/msgget.S/1.1/Sat Jan 4 22:21:48 2003// +/msgrcv.S/1.1/Sat Jan 4 22:21:48 2003// +/msgsnd.S/1.1/Sat Jan 4 22:21:48 2003// +/recv.c/1.2/Mon Nov 18 01:16:51 2002// +/recvfrom.S/1.1/Mon Aug 5 18:08:41 2002// +/recvmsg.S/1.1/Mon Aug 5 18:08:41 2002// +/semctl.S/1.1/Sat Jan 4 22:21:48 2003// +/semget.S/1.1/Sat Jan 4 22:21:48 2003// +/semop.S/1.1/Sat Jan 4 22:21:48 2003// +/send.c/1.2/Mon Nov 18 01:16:51 2002// +/sendmsg.S/1.1/Mon Aug 5 18:08:41 2002// +/sendto.S/1.1/Mon Aug 5 18:08:41 2002// +/setjmp.S/1.3/Fri Jan 28 16:04:54 2005// +/setsockopt.S/1.1/Mon Aug 5 18:08:41 2002// +/shmat.S/1.1/Sat Jan 4 22:21:48 2003// +/shmctl.S/1.1/Sat Jan 4 22:21:48 2003// +/shmdt.S/1.1/Sat Jan 4 22:21:48 2003// +/shmget.S/1.1/Sat Jan 4 22:21:48 2003// +/shutdown.S/1.1/Mon Aug 5 18:08:41 2002// +/sigaction.c/1.1/Fri Feb 21 02:34:59 2003// +/socket.S/1.1/Mon Aug 5 18:08:41 2002// +/socketpair.S/1.1/Mon Aug 5 18:08:41 2002// +/start.S/1.5/Sat Sep 11 12:37:57 2004// +/syscalls.h/1.6/Fri Jan 28 22:28:53 2005// +/umount.S/1.2/Mon Sep 2 15:49:28 2002// +/unified.S/1.11/Fri Jan 28 22:28:53 2005// +/waitpid.S/1.4/Fri Jan 28 16:04:54 2005// +D diff -uNr dietlibc-0.27/x86_64/CVS/Repository dietlibc-0.28/x86_64/CVS/Repository --- dietlibc-0.27/x86_64/CVS/Repository Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/x86_64/CVS/Repository Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +dietlibc/x86_64 diff -uNr dietlibc-0.27/x86_64/CVS/Root dietlibc-0.28/x86_64/CVS/Root --- dietlibc-0.27/x86_64/CVS/Root Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/x86_64/CVS/Root Mon Jan 31 18:53:10 2005 @@ -0,0 +1 @@ +:pserver:cvs@cvs.fefe.de:/cvs diff -uNr dietlibc-0.27/x86_64/clone.S dietlibc-0.28/x86_64/clone.S --- dietlibc-0.27/x86_64/clone.S Fri Aug 30 18:40:22 2002 +++ dietlibc-0.28/x86_64/clone.S Fri Jan 28 17:04:54 2005 @@ -35,7 +35,7 @@ call *%rax /* exit a thread */ movq %rax,%rdi -#ifdef PIC +#ifdef __PIC__ jmp _exit@PLT #else jmp _exit @@ -45,7 +45,7 @@ /* set errno */ negl %eax pushq %rax -#ifdef PIC +#ifdef __PIC__ call __errno_location@PLT #else call __errno_location diff -uNr dietlibc-0.27/x86_64/dyn_syscalls.S dietlibc-0.28/x86_64/dyn_syscalls.S --- dietlibc-0.27/x86_64/dyn_syscalls.S Thu Jan 1 01:00:00 1970 +++ dietlibc-0.28/x86_64/dyn_syscalls.S Fri Jan 28 17:04:54 2005 @@ -0,0 +1,238 @@ +/* + * dynamic unified-syscalls + * Olaf Dreesen + */ + +#include +#include "syscalls.h" + +//#include "unified.S" +.text +.weak exit +exit: +.global _exit +_exit: +__exit: + movb $__NR_exit,%al + +.global __unified_syscall +__unified_syscall: +_unified_syscall: + movzbl %al, %eax + mov %rcx, %r10 + syscall + cmpq $-128, %rax + jbe .Lnoerror + negl %eax + pushq %rax + call __errno_location@PLT + popq %rcx + movl %ecx,(%rax) + orq $-1, %rax +.Lnoerror: + +/* here we go and "reuse" the return for weak-void functions */ +#include "dietuglyweaks.h" + + ret + +#define __unified_syscall _unified_syscall + +#include "waitpid.S" + +#include "../syscalls.s/__getpagesize.S" +#include "../syscalls.s/__pread.S" +#include "../syscalls.s/__pwrite.S" +#include "../syscalls.s/__reboot.S" +#include "../syscalls.s/_llseek.S" +#include "../syscalls.s/access.S" +#include "../syscalls.s/adjtimex.S" +#include "../syscalls.s/alarm.S" +#include "../syscalls.s/bdflush.S" +#include "../syscalls.s/brk.S" +#include "../syscalls.s/capget.S" +#include "../syscalls.s/capset.S" +#include "../syscalls.s/chdir.S" +#include "../syscalls.s/chmod.S" +#include "../syscalls.s/chown.S" +#include "../syscalls.s/chown32.S" +#include "../syscalls.s/chroot.S" +#include "../syscalls.s/clock_getres.S" +#include "../syscalls.s/clock_gettime.S" +#include "../syscalls.s/clock_settime.S" +#include "../syscalls.s/close.S" +#include "../syscalls.s/create_module.S" +#include "../syscalls.s/delete_module.S" +#include "../syscalls.s/dup.S" +#include "../syscalls.s/dup2.S" +#include "../syscalls.s/environ.S" +#include "../syscalls.s/epoll_create.S" +#include "../syscalls.s/epoll_ctl.S" +#include "../syscalls.s/epoll_wait.S" +#include "../syscalls.s/errno.S" +#include "../syscalls.s/execve.S" +#include "../syscalls.s/fchdir.S" +#include "../syscalls.s/fchmod.S" +#include "../syscalls.s/fchown.S" +#include "../syscalls.s/fchown32.S" +#include "../syscalls.s/fcntl.S" +#include "../syscalls.s/fdatasync.S" +#include "../syscalls.s/flock.S" +#include "../syscalls.s/fork.S" +#include "../syscalls.s/fstat.S" +#include "../syscalls.s/fstat64.S" +#include "../syscalls.s/fstatfs.S" +#include "../syscalls.s/fsync.S" +#include "../syscalls.s/ftruncate.S" +#include "../syscalls.s/ftruncate64.S" +#include "../syscalls.s/getcwd.S" +#include "../syscalls.s/getdents.S" +#include "../syscalls.s/getdents64.S" +#include "../syscalls.s/getegid.S" +#include "../syscalls.s/getegid32.S" +#include "../syscalls.s/geteuid.S" +#include "../syscalls.s/geteuid32.S" +#include "../syscalls.s/getgid.S" +#include "../syscalls.s/getgid32.S" +#include "../syscalls.s/getgroups.S" +#include "../syscalls.s/getgroups32.S" +#include "../syscalls.s/getitimer.S" +#include "../syscalls.s/getpgid.S" +#include "../syscalls.s/getpid.S" +#include "../syscalls.s/getppid.S" +#include "../syscalls.s/getpriority.S" +#include "../syscalls.s/getresgid.S" +#include "../syscalls.s/getresgid32.S" +#include "../syscalls.s/getresuid.S" +#include "../syscalls.s/getrlimit.S" +#include "../syscalls.s/getrusage.S" +#include "../syscalls.s/getsid.S" +#include "../syscalls.s/gettimeofday.S" +#include "../syscalls.s/getuid.S" +#include "../syscalls.s/getuid32.S" +#include "../syscalls.s/init_module.S" +#include "../syscalls.s/ioctl.S" +#include "../syscalls.s/ioperm.S" +#include "../syscalls.s/iopl.S" +#include "../syscalls.s/ipc.S" +#include "../syscalls.s/kill.S" +#include "../syscalls.s/lchown.S" +#include "../syscalls.s/lchown32.S" +#include "../syscalls.s/link.S" +#include "../syscalls.s/lseek.S" +#include "../syscalls.s/lstat.S" +#include "../syscalls.s/lstat64.S" +#include "../syscalls.s/madvise.S" +#include "../syscalls.s/mkdir.S" +#include "../syscalls.s/mknod.S" +#include "../syscalls.s/mlock.S" +#include "../syscalls.s/mlockall.S" +#include "../syscalls.s/mmap.S" +#include "../syscalls.s/mmap2.S" +#include "../syscalls.s/mount.S" +#include "../syscalls.s/mprotect.S" +#include "../syscalls.s/mremap.S" +#include "../syscalls.s/msync.S" +#include "../syscalls.s/munlock.S" +#include "../syscalls.s/munlockall.S" +#include "../syscalls.s/munmap.S" +#include "../syscalls.s/n_sigaction.S" +#include "../syscalls.s/n_sigpending.S" +#include "../syscalls.s/n_sigprocmask.S" +#include "../syscalls.s/n_sigsuspend.S" +#include "../syscalls.s/nanosleep.S" +#include "../syscalls.s/nice.S" +#include "../syscalls.s/open.S" +#include "../syscalls.s/pause.S" +#include "../syscalls.s/personality.S" +#include "../syscalls.s/pipe.S" +#include "../syscalls.s/pivot_root.S" +#include "../syscalls.s/poll.S" +#include "../syscalls.s/prctl.S" +#include "../syscalls.s/ptrace.S" +#include "../syscalls.s/query_module.S" +#include "../syscalls.s/read.S" +#include "../syscalls.s/readlink.S" +#include "../syscalls.s/readv.S" +#include "../syscalls.s/rename.S" +#include "../syscalls.s/rmdir.S" +#include "../syscalls.s/rt_sigaction.S" +#include "../syscalls.s/rt_sigpending.S" +#include "../syscalls.s/rt_sigprocmask.S" +#include "../syscalls.s/rt_sigqueueinfo.S" +#include "../syscalls.s/rt_sigsuspend.S" +#include "../syscalls.s/rt_sigtimedwait.S" +#include "../syscalls.s/sched_get_priority_max.S" +#include "../syscalls.s/sched_get_priority_min.S" +#include "../syscalls.s/sched_getparam.S" +#include "../syscalls.s/sched_getscheduler.S" +#include "../syscalls.s/sched_rr_get_interval.S" +#include "../syscalls.s/sched_setparam.S" +#include "../syscalls.s/sched_setscheduler.S" +#include "../syscalls.s/sched_yield.S" +#include "../syscalls.s/select.S" +#include "../syscalls.s/sendfile.S" +#include "../syscalls.s/sendfile64.S" +#include "../syscalls.s/setdomainname.S" +#include "../syscalls.s/setfsgid.S" +#include "../syscalls.s/setfsgid32.S" +#include "../syscalls.s/setfsuid.S" +#include "../syscalls.s/setfsuid32.S" +#include "../syscalls.s/setgid.S" +#include "../syscalls.s/setgid32.S" +#include "../syscalls.s/setgroups.S" +#include "../syscalls.s/sethostname.S" +#include "../syscalls.s/setitimer.S" +#include "../syscalls.s/setpgid.S" +#include "../syscalls.s/setpriority.S" +#include "../syscalls.s/setregid.S" +#include "../syscalls.s/setregid32.S" +#include "../syscalls.s/setresgid.S" +#include "../syscalls.s/setresgid32.S" +#include "../syscalls.s/setresuid.S" +#include "../syscalls.s/setreuid.S" +#include "../syscalls.s/setreuid32.S" +#include "../syscalls.s/setrlimit.S" +#include "../syscalls.s/setsid.S" +#include "../syscalls.s/settimeofday.S" +#include "../syscalls.s/setuid.S" +#include "../syscalls.s/setuid32.S" +#include "../syscalls.s/sigaltstack.S" +#include "../syscalls.s/socketcall.S" +#include "../syscalls.s/stat.S" +#include "../syscalls.s/stat64.S" +#include "../syscalls.s/statfs.S" +#include "../syscalls.s/stime.S" +#include "../syscalls.s/swapoff.S" +#include "../syscalls.s/swapon.S" +#include "../syscalls.s/symlink.S" +#include "../syscalls.s/sync.S" +#include "../syscalls.s/sysctl.S" +#include "../syscalls.s/sysfs.S" +#include "../syscalls.s/sysinfo.S" +#include "../syscalls.s/syslog.S" +#include "../syscalls.s/time.S" +#include "../syscalls.s/timer_create.S" +#include "../syscalls.s/timer_delete.S" +#include "../syscalls.s/timer_getoverrun.S" +#include "../syscalls.s/timer_gettime.S" +#include "../syscalls.s/timer_settime.S" +#include "../syscalls.s/times.S" +#include "../syscalls.s/truncate.S" +#include "../syscalls.s/truncate64.S" +#include "../syscalls.s/umask.S" +#include "../syscalls.s/uname.S" +#include "../syscalls.s/unlink.S" +#include "../syscalls.s/utime.S" +#include "../syscalls.s/vhangup.S" +#include "../syscalls.s/wait4.S" +#include "../syscalls.s/waitpid.S" +#include "../syscalls.s/write.S" +#include "../syscalls.s/writev.S" + +#define _exit __exit +#include "clone.S" +#undef _exit + +#include "__longjmp.S" +#include "setjmp.S" diff -uNr dietlibc-0.27/x86_64/setjmp.S dietlibc-0.28/x86_64/setjmp.S --- dietlibc-0.27/x86_64/setjmp.S Fri Aug 30 18:40:22 2002 +++ dietlibc-0.28/x86_64/setjmp.S Fri Jan 28 17:04:54 2005 @@ -23,7 +23,7 @@ movq %rdx,(JB_RSP*8)(%rdi) movq (%rsp),%rdx movq %rdx,(JB_PC*8)(%rdi) -#ifdef PIC +#ifdef __PIC__ jmp __sigjmp_save@PLT #else jmp __sigjmp_save diff -uNr dietlibc-0.27/x86_64/start.S dietlibc-0.28/x86_64/start.S --- dietlibc-0.27/x86_64/start.S Wed Feb 5 15:29:19 2003 +++ dietlibc-0.28/x86_64/start.S Sat Sep 11 14:37:57 2004 @@ -38,8 +38,12 @@ #ifdef WANT_DYNAMIC call _dyn_start #else +#ifdef WANT_STACKGAP + call stackgap +#else call main #endif +#endif #ifdef PROFILING pushq %rax diff -uNr dietlibc-0.27/x86_64/syscalls.h dietlibc-0.28/x86_64/syscalls.h --- dietlibc-0.27/x86_64/syscalls.h Sat Apr 12 17:19:01 2003 +++ dietlibc-0.28/x86_64/syscalls.h Fri Jan 28 23:28:53 2005 @@ -259,8 +259,8 @@ #define __NR_get_thread_area 211 #define __NR_lookup_dcookie 212 #define __NR_epoll_create 213 -#define __NR_epoll_ctl 214 -#define __NR_epoll_wait 215 +#define __NR_epoll_ctl 233 +#define __NR_epoll_wait 232 #define __NR_remap_file_pages 216 #define __NR_getdents64 217 #define __NR_set_tid_address 218 @@ -280,6 +280,7 @@ #define __NR_syscall_max __NR_exit_group +#ifdef __PIC__ #define syscall_weak(name,wsym,sym) \ .text; \ .type wsym,@function; \ @@ -289,7 +290,7 @@ .global sym; \ sym: \ mov $__NR_##name,%al; \ - jmp __unified_syscall + jmp __unified_syscall@PLT #define syscall(name,sym) \ .text; \ @@ -297,5 +298,26 @@ .global sym; \ sym: \ mov $__NR_##name,%al; \ + jmp __unified_syscall@PLT + +#else + +#define syscall_weak(name,wsym,sym) \ +.text; \ +.type wsym,@function; \ +.weak wsym; \ +wsym: ; \ +.type sym,@function; \ +.global sym; \ +sym: \ + mov $__NR_##name,%al; \ jmp __unified_syscall +#define syscall(name,sym) \ +.text; \ +.type sym,@function; \ +.global sym; \ +sym: \ + mov $__NR_##name,%al; \ + jmp __unified_syscall +#endif diff -uNr dietlibc-0.27/x86_64/unified.S dietlibc-0.28/x86_64/unified.S --- dietlibc-0.27/x86_64/unified.S Thu Feb 20 03:42:58 2003 +++ dietlibc-0.28/x86_64/unified.S Fri Jan 28 23:28:53 2005 @@ -9,9 +9,7 @@ _exit: mov $SYS_exit,%al -#ifndef __DYN_LIB .global __unified_syscall -#endif __unified_syscall: movzbl %al, %eax mov %rcx, %r10 diff -uNr dietlibc-0.27/x86_64/waitpid.S dietlibc-0.28/x86_64/waitpid.S --- dietlibc-0.27/x86_64/waitpid.S Sun Nov 10 01:20:07 2002 +++ dietlibc-0.28/x86_64/waitpid.S Fri Jan 28 17:04:54 2005 @@ -7,6 +7,6 @@ .type __libc_waitpid,@function .global __libc_waitpid __libc_waitpid: - mov $0,%rcx + xor %rcx,%rcx mov $__NR_wait4,%al jmp __unified_syscall