Commit 9bb5b204 authored by Alessandro Rubini's avatar Alessandro Rubini

arch-bare-i386: use lib/libc-functions.o

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 130909aa
......@@ -14,6 +14,7 @@ OBJ-libarch := $A/bare-startup.o \
$A/bare-timer.o \
$A/bare-io.o \
$A/syscalls.o \
lib/libc-functions.o \
lib/div64.o
$(LIBARCH): $(OBJ-libarch)
......
......@@ -12,25 +12,6 @@ void pp_puts(const char *s)
sys_write(0, s, pp_strnlen(s, 300));
}
int pp_strnlen(const char *s, int maxlen)
{
int len = 0;
while (*(s++))
len++;
return len;
}
void *pp_memcpy(void *dest, const void *src, int count)
{
/* from u-boot-1.1.2 */
char *tmp = (char *) dest, *s = (char *) src;
while (count--)
*tmp++ = *s++;
return dest;
}
void bare_get_tstamp(TimeInternal *t)
{
struct bare_timeval tv;
......@@ -65,45 +46,6 @@ int32_t bare_set_tstamp(TimeInternal *t)
return tv.tv_sec - tv_orig.tv_sec;
}
int pp_memcmp(const void *cs, const void *ct, int count)
{
/* from u-boot-1.1.2 */
const unsigned char *su1, *su2;
int res = 0;
for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--)
if ((res = *su1 - *su2) != 0)
break;
return res;
}
void *pp_memset(void *s, int c, int count)
{
/* from u-boot-1.1.2 */
char *xs = (char *) s;
while (count--)
*xs++ = c;
return s;
}
/* What follows has no prefix because it's only used by arch code */
char *strcpy(char *dest, const char *src)
{
/* from u-boot-1.1.2 */
char *tmp = dest;
while ((*dest++ = *src++) != '\0')
/* nothing */;
return tmp;
}
void *memset(void *s, int c, int count)
__attribute__((alias("pp_memset")));
void *memcpy(void *dest, const void *src, int count)
__attribute__((alias("pp_memcpy")));
int bare_adj_freq(Integer32 adj)
{
struct bare_timex t;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment