diff options
author | marcus <marcus> | 2003-09-13 00:25:50 +0000 |
---|---|---|
committer | marcus <marcus> | 2003-09-13 00:25:50 +0000 |
commit | db3bd625f20de535bcab489d39acfe635f7bd595 (patch) | |
tree | 5790e5b05982a69e2b1e62880ddf856b56e9b14b /laden | |
parent | 1c19688db671548ef174497f7c6507773ba48221 (diff) |
Add libc-parts, which takes functions out of libc.a bit by bit.
Diffstat (limited to 'laden')
-rw-r--r-- | laden/Makefile.am | 4 | ||||
-rw-r--r-- | laden/laden.h | 8 | ||||
-rw-r--r-- | laden/string.c | 62 | ||||
-rw-r--r-- | laden/string.h | 30 |
4 files changed, 9 insertions, 95 deletions
diff --git a/laden/Makefile.am b/laden/Makefile.am index 4e9e8b4..4c9e9a1 100644 --- a/laden/Makefile.am +++ b/laden/Makefile.am @@ -27,7 +27,7 @@ noinst_PROGRAMS = laden laden_CFLAGS = -I$(srcdir) -I$(top_srcdir)/include $(AM_CFLAGS) -laden_SOURCES = $(ARCH_SOURCES) string.h string.c \ +laden_SOURCES = $(ARCH_SOURCES) \ output.h output.c output-none.c \ shutdown.h shutdown.c \ elf.h loader.h loader.c \ @@ -36,4 +36,4 @@ laden_SOURCES = $(ARCH_SOURCES) string.h string.c \ /* FIXME: Make linkbase configurable. */ laden_LDFLAGS = -u_start -e_start -N -nostdlib -Ttext=0x180000 -laden_LDADD = -lgcc +laden_LDADD = -lgcc ../libc-parts/libc-parts.a diff --git a/laden/laden.h b/laden/laden.h index 7d54f2d..08fda5a 100644 --- a/laden/laden.h +++ b/laden/laden.h @@ -18,8 +18,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ +#if HAVE_CONFIG_H +#include <config.h> +#endif + +#include <string.h> + #include <l4.h> -#include "string.h" + #include "output.h" #include "shutdown.h" #include "loader.h" diff --git a/laden/string.c b/laden/string.c deleted file mode 100644 index 4dcf0f3..0000000 --- a/laden/string.c +++ /dev/null @@ -1,62 +0,0 @@ -/* string.c - Some minimal string routines. - Copyright (C) 2003 Free Software Foundation, Inc. - Written by Marcus Brinkmann. - - This file is part of the GNU Hurd. - - The GNU Hurd is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2, or (at - your option) any later version. - - The GNU Hurd 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 - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ - -#if HAVE_CONFIG_H -#include <config.h> -#endif - -#include "string.h" - - -int -strcmp (const char *s1, const char *s2) -{ - while (*s1 && *s2 && *s1 == *s2) - { - s1++; - s2++; - } - return (*s1) - (*s2); -} - - -void * -memcpy (void *dest, const void *src, int nr) -{ - char *from = (char *) src; - char *to = (char *) dest; - - while (nr--) - *(to++) = *(from++); - - return dest; -} - - -void * -memset (void *str, int chr, int nr) -{ - char *addr = (char *) str; - - while (nr--) - *(addr++) = (char) (chr & 0xff); - - return str; -} diff --git a/laden/string.h b/laden/string.h deleted file mode 100644 index e9eb8c9..0000000 --- a/laden/string.h +++ /dev/null @@ -1,30 +0,0 @@ -/* string.h - String operations. - Copyright (C) 2003 Free Software Foundation, Inc. - Written by Marcus Brinkmann. - - This file is part of the GNU Hurd. - - The GNU Hurd is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2, or (at - your option) any later version. - - The GNU Hurd 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 - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ - -#ifndef _STRING_H -#define _STRING_H 1 - -int strcmp (const char *s1, const char *s2); - -void *memcpy (void *dest, const void *src, int n); - -void *memset (void *s, int c, int n); - -#endif /* _STRING_H */ |