From 5f642843cb7ee4cbdc75a9087f11192cc177f383 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Tue, 26 Apr 2022 08:19:02 +0100 Subject: [PATCH] aarch64: morello: string: dummy c strlen --- sysdeps/aarch64/morello/strlen.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sysdeps/aarch64/morello/strlen.c diff --git a/sysdeps/aarch64/morello/strlen.c b/sysdeps/aarch64/morello/strlen.c new file mode 100644 index 00000000000..a84e6b9cf09 --- /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 . */ + +#include + +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) -- 2.47.2