diff -ru glibc-2.3.2/include/libc-symbols.h /opt/sb/glibc-2.3.2/include/libc-symbols.h
--- glibc-2.3.2/include/libc-symbols.h	2005-07-08 11:34:31.000000000 +0300
+++ /opt/sb/glibc-2.3.2/include/libc-symbols.h	2005-07-08 09:02:56.000000000 +0300
@@ -236,10 +236,15 @@
 
 /* Tacking on "\n\t#" to the section name makes gcc put it's bogus
    section attributes on what looks like a comment to the assembler.  */
+#  ifdef HAVE_GNU_AS
+#   define __as_app_line "#APP\n"
+#  else
+#   define __as_app_line ""
+#  endif
 #  ifdef HAVE_SECTION_QUOTES
-#   define __sec_comment "\"\n\t#\""
+#   define __sec_comment "\"\n" __as_app_line "\t#\""
 #  else
-#   define __sec_comment "\n\t#"
+#   define __sec_comment "\n" __as_app_line "\t#"
 #  endif
 #  define link_warning(symbol, msg) \
   __make_section_unallocated (".gnu.warning." #symbol) \
diff -ru glibc-2.3.2/sysdeps/unix/sysv/linux/cris/profil-counter.h /opt/sb/glibc-2.3.2/sysdeps/unix/sysv/linux/cris/profil-counter.h
--- glibc-2.3.2/sysdeps/unix/sysv/linux/cris/profil-counter.h	2001-07-07 22:21:34.000000000 +0300
+++ /opt/sb/glibc-2.3.2/sysdeps/unix/sysv/linux/cris/profil-counter.h	2005-07-08 11:32:19.000000000 +0300
@@ -18,9 +18,12 @@
    02111-1307 USA.  */
 
 #include <signal.h>
+#include <sigcontextinfo.h>
 
+/*profil_counter (int signo, struct sigcontext *scp)*/
 static void
-profil_counter (int signo, struct sigcontext *scp)
+profil_counter (int signo, const SIGCONTEXT scp)
 {
-  profil_count ((void *) scp->regs.irp);
+  profil_count ((void *) GET_PC (scp));
+  asm volatile ("");
 }
diff -ru glibc-2.3.2/sysdeps/unix/sysv/linux/cris/sysdep.h /opt/sb/glibc-2.3.2/sysdeps/unix/sysv/linux/cris/sysdep.h
--- glibc-2.3.2/sysdeps/unix/sysv/linux/cris/sysdep.h	2005-07-08 11:34:31.000000000 +0300
+++ /opt/sb/glibc-2.3.2/sysdeps/unix/sysv/linux/cris/sysdep.h	2005-07-08 08:46:12.000000000 +0300
@@ -22,12 +22,40 @@
 #include <sys/syscall.h>
 #include "config.h"
 
+#ifndef ASM_LINE_SEP
+#define ASM_LINE_SEP ;
+#endif
+
 #undef SYS_ify
 #define SYS_ify(syscall_name)	(__NR_##syscall_name)
 
+/* Included for older kernels whose headers 
+   are missing the define  */ 
+#ifndef __NR_semtimedop
+# define __NR_semtimedop 228
+#endif
+
+# ifdef PIC
+/* WARNING: CANNOT BE USED IN A NOP! */
+#  define STW_PIC stw %r19, -32(%sr0, %sp) ASM_LINE_SEP
+#  define LDW_PIC ldw -32(%sr0, %sp), %r19 ASM_LINE_SEP
+#  define STW_ASM_PIC	"       copy %%r19, %%r4\n"
+#  define LDW_ASM_PIC	"       copy %%r4, %%r19\n"
+#  define USING_GR4	"%r4",
+# else
+#  define STW_PIC ASM_LINE_SEP
+#  define LDW_PIC ASM_LINE_SEP
+#  define STW_ASM_PIC	" \n"
+#  define LDW_ASM_PIC	" \n"
+#  define USING_GR4
+# endif
 
 #ifdef __ASSEMBLER__
 
+/* Syntactic details of assembler.  */
+
+#define ALIGNARG(log2) log2
+
 /* For Linux we can use the system call table in the header file
 	/usr/include/asm/unistd.h
    of the kernel.  But these symbols do not follow the SYS_* syntax
@@ -118,6 +146,21 @@
 #define	PSEUDO_END_NOERRNO(name) \
   END (name)
 
+/* This has to return the error value */
+#undef  PSEUDO_ERRVAL
+#define PSEUDO_ERRVAL(name, syscall_name, args)			\
+  ENTRY	(name)						@ \
+  DOARGS_##args						@ \
+  movu.w SYS_ify (syscall_name),$r9			@ \
+  break	13						@ \
+  UNDOARGS_return_##args
+
+#define ret_ERRVAL ret
+	
+#undef	PSEUDO_END_ERRVAL
+#define PSEUDO_END_ERRVAL(name)					\
+	END(name)
+
 #define DOARGS_0
 #define DOARGS_1
 #define DOARGS_2
@@ -150,6 +193,7 @@
 
 #else  /* not __ASSEMBLER__ */
 
+
 #undef INLINE_SYSCALL
 #define INLINE_SYSCALL(name, nr, args...)	\
   ({						\
@@ -173,6 +202,48 @@
      (long int) __sys_res;			\
    })
 
+/* INTERNAL_SYSCALL_DECL - Allows us to setup some function static 
+   value to use within the context of the syscall 
+   INTERNAL_SYSCALL_ERROR_P - Returns 0 if it wasn't an error, 1 otherwise
+   You are allowed to use the syscall result (val) and the DECL error variable
+   to determine what went wrong.
+   INTERLAL_SYSCALL_ERRNO - Munges the val/err pair into the error number.
+   In our case we just flip the sign. */
+
+#undef INTERNAL_SYSCALL_DECL
+#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
+
+/* Equivalent to  (val < 0)&&(val > -4095) which is what we want */
+#undef INTERNAL_SYSCALL_ERROR_P
+#define INTERNAL_SYSCALL_ERROR_P(val, err) \
+	((unsigned long)val >= (unsigned long)-4095)
+
+
+
+#undef INTERNAL_SYSCALL_ERRNO
+#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
+
+
+/* Similar to INLINE_SYSCALL but we don't set errno */
+#undef INTERNAL_SYSCALL
+#define INTERNAL_SYSCALL(name, err, nr, args...) 		\
+({								\
+	 unsigned long __sys_res;	\
+     register unsigned long __res asm ("r10");	\
+     LOAD_ARGS_c_##nr (args)			\
+     register unsigned long __callno asm ("r9")	\
+       = SYS_ify (name);			\
+     asm volatile (LOAD_ARGS_asm_##nr (args)	\
+		   "break 13"			\
+		   : "=r" (__res)		\
+		   : ASM_ARGS_##nr (args)	\
+		   : ASM_CLOBBER_##nr);		\
+     __sys_res = __res;				\
+						\
+     (long int) __sys_res;			\
+   })
+
+
 #define LOAD_ARGS_c_0()
 #define LOAD_ARGS_asm_0()
 #define ASM_CLOBBER_0 "memory"

