aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2022-04-26 08:19:02 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-27 14:46:50 +0100
commit5f642843cb7ee4cbdc75a9087f11192cc177f383 (patch)
treef81d61c606c444f87106586ebde1d8fd134d43be
parent59e35c206692418373d908caa1b1ffc9105fcd7b (diff)
downloadglibc-5f642843cb7ee4cbdc75a9087f11192cc177f383.tar
glibc-5f642843cb7ee4cbdc75a9087f11192cc177f383.tar.gz
glibc-5f642843cb7ee4cbdc75a9087f11192cc177f383.tar.bz2
glibc-5f642843cb7ee4cbdc75a9087f11192cc177f383.zip
aarch64: morello: string: dummy c strlen
-rw-r--r--sysdeps/aarch64/morello/strlen.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/sysdeps/aarch64/morello/strlen.c b/sysdeps/aarch64/morello/strlen.c
new file mode 100644
index 0000000000..a84e6b9cf0
--- /dev/null
+++ b/sysdeps/aarch64/morello/strlen.c
@@ -0,0 +1,30 @@
+/* Simple strlen.
+
+ Copyright (C) 2022 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+#include <string.h>
+
+size_t __strlen (const char *s)
+{
+ size_t n;
+ for (n = 0; s[n] != 0; n++);
+ return n;
+}
+
+weak_alias (__strlen, strlen)
+libc_hidden_builtin_def (strlen)