summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ldso/ldso/boot1.c16
-rw-r--r--ldso/ldso/ldso.c16
2 files changed, 32 insertions, 0 deletions
diff --git a/ldso/ldso/boot1.c b/ldso/ldso/boot1.c
index cbf6b1aae..4a3dbcea8 100644
--- a/ldso/ldso/boot1.c
+++ b/ldso/ldso/boot1.c
@@ -1223,6 +1223,22 @@ void * _dl_memcpy(void * dst, const void * src, size_t len)
return dst;
}
+#ifdef USE_CACHE
+int _dl_memcmp(const void * s1,const void * s2,size_t len)
+{
+ unsigned char *c1 = (unsigned char *)s1;
+ unsigned char *c2 = (unsigned char *)s2;
+
+ while (len--) {
+ if (*c1 != *c2)
+ return *c1 - *c2;
+ c1++;
+ c2++;
+ }
+ return 0;
+}
+#endif
+
void * _dl_memset(void * str,int c,size_t len)
{
register char *a = str;
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index cbf6b1aae..4a3dbcea8 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -1223,6 +1223,22 @@ void * _dl_memcpy(void * dst, const void * src, size_t len)
return dst;
}
+#ifdef USE_CACHE
+int _dl_memcmp(const void * s1,const void * s2,size_t len)
+{
+ unsigned char *c1 = (unsigned char *)s1;
+ unsigned char *c2 = (unsigned char *)s2;
+
+ while (len--) {
+ if (*c1 != *c2)
+ return *c1 - *c2;
+ c1++;
+ c2++;
+ }
+ return 0;
+}
+#endif
+
void * _dl_memset(void * str,int c,size_t len)
{
register char *a = str;