From 8f9e448b2ef6db7cd905540c21f3c5b190e7a1e7 Mon Sep 17 00:00:00 2001 From: Kacper Date: Sun, 7 Dec 2025 22:22:16 +0100 Subject: Add bin/true and bin/false implementations - Added assembly implementations for `true` and `false` commands. - Updated Kbuild files to include new binaries. - Removed unused libraries and headers. - Cleaned up makefile and unused code. --- lib/libc/string/Kbuild | 32 ++++++++++++++++++++++++++++++++ lib/libc/string/memcpy.c | 2 +- lib/libc/string/strcoll.c | 2 +- lib/libc/string/strerror.c | 2 +- lib/libc/string/strxfrm.c | 4 ++-- 5 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 lib/libc/string/Kbuild (limited to 'lib/libc/string') diff --git a/lib/libc/string/Kbuild b/lib/libc/string/Kbuild new file mode 100644 index 00000000..6fec9c43 --- /dev/null +++ b/lib/libc/string/Kbuild @@ -0,0 +1,32 @@ +obj-y += memccpy.o +obj-y += memchr.o +obj-y += memcmp.o +obj-y += memcpy.o +obj-y += memmem.o +obj-y += memmove.o +obj-y += memset.o +obj-y += stpcpy.o +obj-y += stpncpy.o +obj-y += strcat.o +obj-y += strchr.o +obj-y += strcmp.o +obj-y += strcoll.o +obj-y += strcpy.o +obj-y += strcspn.o +obj-y += strdup.o +obj-y += strerror.o +obj-y += strlcat.o +obj-y += strlcpy.o +obj-y += strlen.o +obj-y += strncat.o +obj-y += strncmp.o +obj-y += strncpy.o +obj-y += strndup.o +obj-y += strnlen.o +obj-y += strpbrk.o +obj-y += strrchr.o +obj-y += strspn.o +obj-y += strstr.o +obj-y += strtok_r.o +obj-y += strtok.o +obj-y += strxfrm.o diff --git a/lib/libc/string/memcpy.c b/lib/libc/string/memcpy.c index 505cc622..ecdbd602 100644 --- a/lib/libc/string/memcpy.c +++ b/lib/libc/string/memcpy.c @@ -1,7 +1,7 @@ #include #include -weak void *memcpy(void *restrict s1, const void *restrict s2, size_t n); +__weak void *memcpy(void *restrict s1, const void *restrict s2, size_t n); void *memcpy(void *restrict s1, const void *restrict s2, size_t n) { diff --git a/lib/libc/string/strcoll.c b/lib/libc/string/strcoll.c index 6b2e532a..6efaa3d3 100644 --- a/lib/libc/string/strcoll.c +++ b/lib/libc/string/strcoll.c @@ -7,7 +7,7 @@ int strcoll(const char *s1, const char *s2) return strcmp(s1, s2); } -weak int strcoll_l(const char *s1, const char *s2, locale_t unused locale) +__weak int strcoll_l(const char *s1, const char *s2, locale_t __unused locale) { return strcoll(s1, s2); } diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c index 1d5903cb..c091ac79 100644 --- a/lib/libc/string/strerror.c +++ b/lib/libc/string/strerror.c @@ -119,7 +119,7 @@ int strerror_r(int errnum, char *buf, size_t buflen) return 0; } -weak char *strerror_l(int errnum, locale_t unused locale) +__weak char *strerror_l(int errnum, locale_t __unused locale) { return strerror(errnum); } diff --git a/lib/libc/string/strxfrm.c b/lib/libc/string/strxfrm.c index d62d0a96..123ebfe8 100644 --- a/lib/libc/string/strxfrm.c +++ b/lib/libc/string/strxfrm.c @@ -11,8 +11,8 @@ size_t strxfrm(char *restrict s1, const char *restrict s2, size_t n) return len; } -weak size_t strxfrm_l(char *restrict s1, const char *restrict s2, size_t n, - locale_t unused locale) +__weak size_t strxfrm_l(char *restrict s1, const char *restrict s2, size_t n, + locale_t __unused locale) { return strxfrm(s1, s2, n); } -- cgit v1.2.3