[3/3] libc: arc: Remove an optimized strlen implementation

Message ID 20260312225330.2903392-4-ykolerov@synopsys.com
State New
Headers
Series A series of fixes for ARC Classic |

Commit Message

Yuriy Kolerov March 12, 2026, 10:53 p.m. UTC
  This is a port of e3a4f13 commit from Picolibc. Here is an
original explanation for this patch:

    This code accesses memory up to 7 bytes before the argument
    which causes access faults on targets with stack bounds
    checking enabled. Instead of attempting to fix it, just use
    the C version on all targets which is nearly as fast for this
    operation.

Indeed, this implementation is not safe.

Co-authored-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
---
 newlib/Makefile.in                       |  80 -----------
 newlib/libc/machine/arc/Makefile.inc     |   4 -
 newlib/libc/machine/arc/strlen-bs-norm.S | 117 ----------------
 newlib/libc/machine/arc/strlen-bs.S      | 123 -----------------
 newlib/libc/machine/arc/strlen-stub.c    |  37 -----
 newlib/libc/machine/arc/strlen.S         | 166 -----------------------
 6 files changed, 527 deletions(-)
 delete mode 100644 newlib/libc/machine/arc/strlen-bs-norm.S
 delete mode 100644 newlib/libc/machine/arc/strlen-bs.S
 delete mode 100644 newlib/libc/machine/arc/strlen-stub.c
 delete mode 100644 newlib/libc/machine/arc/strlen.S
  

Patch

diff --git a/newlib/Makefile.in b/newlib/Makefile.in
index 4186ae553..ad57a5458 100644
--- a/newlib/Makefile.in
+++ b/newlib/Makefile.in
@@ -693,10 +693,6 @@  check_PROGRAMS =
 @HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/strcpy-bs.S \
 @HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/strcpy-bs-arc600.S \
 @HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/strcpy-stub.c \
-@HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/strlen.S \
-@HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/strlen-bs.S \
-@HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/strlen-bs-norm.S \
-@HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/strlen-stub.c \
 @HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/strncpy.S \
 @HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/strncpy-stub.c \
 @HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/strncpy-bs.S
@@ -1967,10 +1963,6 @@  am__objects_51 = libc/ssp/libc_a-chk_fail.$(OBJEXT) \
 @HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/libc_a-strcpy-bs.$(OBJEXT) \
 @HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/libc_a-strcpy-bs-arc600.$(OBJEXT) \
 @HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/libc_a-strcpy-stub.$(OBJEXT) \
-@HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/libc_a-strlen.$(OBJEXT) \
-@HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/libc_a-strlen-bs.$(OBJEXT) \
-@HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/libc_a-strlen-bs-norm.$(OBJEXT) \
-@HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/libc_a-strlen-stub.$(OBJEXT) \
 @HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/libc_a-strncpy.$(OBJEXT) \
 @HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/libc_a-strncpy-stub.$(OBJEXT) \
 @HAVE_LIBC_MACHINE_ARC_TRUE@	libc/machine/arc/libc_a-strncpy-bs.$(OBJEXT)
@@ -8294,18 +8286,6 @@  libc/machine/arc/libc_a-strcpy-bs-arc600.$(OBJEXT):  \
 libc/machine/arc/libc_a-strcpy-stub.$(OBJEXT):  \
 	libc/machine/arc/$(am__dirstamp) \
 	libc/machine/arc/$(DEPDIR)/$(am__dirstamp)
-libc/machine/arc/libc_a-strlen.$(OBJEXT):  \
-	libc/machine/arc/$(am__dirstamp) \
-	libc/machine/arc/$(DEPDIR)/$(am__dirstamp)
-libc/machine/arc/libc_a-strlen-bs.$(OBJEXT):  \
-	libc/machine/arc/$(am__dirstamp) \
-	libc/machine/arc/$(DEPDIR)/$(am__dirstamp)
-libc/machine/arc/libc_a-strlen-bs-norm.$(OBJEXT):  \
-	libc/machine/arc/$(am__dirstamp) \
-	libc/machine/arc/$(DEPDIR)/$(am__dirstamp)
-libc/machine/arc/libc_a-strlen-stub.$(OBJEXT):  \
-	libc/machine/arc/$(am__dirstamp) \
-	libc/machine/arc/$(DEPDIR)/$(am__dirstamp)
 libc/machine/arc/libc_a-strncpy.$(OBJEXT):  \
 	libc/machine/arc/$(am__dirstamp) \
 	libc/machine/arc/$(DEPDIR)/$(am__dirstamp)
@@ -12951,10 +12931,6 @@  distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/arc/$(DEPDIR)/libc_a-strcpy-bs.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/arc/$(DEPDIR)/libc_a-strcpy-stub.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/arc/$(DEPDIR)/libc_a-strcpy.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs-norm.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libc/machine/arc/$(DEPDIR)/libc_a-strlen-stub.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libc/machine/arc/$(DEPDIR)/libc_a-strlen.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/arc/$(DEPDIR)/libc_a-strncpy-bs.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/arc/$(DEPDIR)/libc_a-strncpy-stub.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/arc/$(DEPDIR)/libc_a-strncpy.Po@am__quote@
@@ -17315,48 +17291,6 @@  libc/machine/arc/libc_a-strcpy-bs-arc600.obj: libc/machine/arc/strcpy-bs-arc600.
 @AMDEP_TRUE@@am__fastdepCCAS_FALSE@	DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCCAS_FALSE@	$(AM_V_CPPAS@am__nodep@)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -c -o libc/machine/arc/libc_a-strcpy-bs-arc600.obj `if test -f 'libc/machine/arc/strcpy-bs-arc600.S'; then $(CYGPATH_W) 'libc/machine/arc/strcpy-bs-arc600.S'; else $(CYGPATH_W) '$(srcdir)/libc/machine/arc/strcpy-bs-arc600.S'; fi`
 
-libc/machine/arc/libc_a-strlen.o: libc/machine/arc/strlen.S
-@am__fastdepCCAS_TRUE@	$(AM_V_CPPAS)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -MT libc/machine/arc/libc_a-strlen.o -MD -MP -MF libc/machine/arc/$(DEPDIR)/libc_a-strlen.Tpo -c -o libc/machine/arc/libc_a-strlen.o `test -f 'libc/machine/arc/strlen.S' || echo '$(srcdir)/'`libc/machine/arc/strlen.S
-@am__fastdepCCAS_TRUE@	$(AM_V_at)$(am__mv) libc/machine/arc/$(DEPDIR)/libc_a-strlen.Tpo libc/machine/arc/$(DEPDIR)/libc_a-strlen.Po
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@	$(AM_V_CPPAS)source='libc/machine/arc/strlen.S' object='libc/machine/arc/libc_a-strlen.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@	DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@	$(AM_V_CPPAS@am__nodep@)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -c -o libc/machine/arc/libc_a-strlen.o `test -f 'libc/machine/arc/strlen.S' || echo '$(srcdir)/'`libc/machine/arc/strlen.S
-
-libc/machine/arc/libc_a-strlen.obj: libc/machine/arc/strlen.S
-@am__fastdepCCAS_TRUE@	$(AM_V_CPPAS)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -MT libc/machine/arc/libc_a-strlen.obj -MD -MP -MF libc/machine/arc/$(DEPDIR)/libc_a-strlen.Tpo -c -o libc/machine/arc/libc_a-strlen.obj `if test -f 'libc/machine/arc/strlen.S'; then $(CYGPATH_W) 'libc/machine/arc/strlen.S'; else $(CYGPATH_W) '$(srcdir)/libc/machine/arc/strlen.S'; fi`
-@am__fastdepCCAS_TRUE@	$(AM_V_at)$(am__mv) libc/machine/arc/$(DEPDIR)/libc_a-strlen.Tpo libc/machine/arc/$(DEPDIR)/libc_a-strlen.Po
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@	$(AM_V_CPPAS)source='libc/machine/arc/strlen.S' object='libc/machine/arc/libc_a-strlen.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@	DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@	$(AM_V_CPPAS@am__nodep@)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -c -o libc/machine/arc/libc_a-strlen.obj `if test -f 'libc/machine/arc/strlen.S'; then $(CYGPATH_W) 'libc/machine/arc/strlen.S'; else $(CYGPATH_W) '$(srcdir)/libc/machine/arc/strlen.S'; fi`
-
-libc/machine/arc/libc_a-strlen-bs.o: libc/machine/arc/strlen-bs.S
-@am__fastdepCCAS_TRUE@	$(AM_V_CPPAS)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -MT libc/machine/arc/libc_a-strlen-bs.o -MD -MP -MF libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs.Tpo -c -o libc/machine/arc/libc_a-strlen-bs.o `test -f 'libc/machine/arc/strlen-bs.S' || echo '$(srcdir)/'`libc/machine/arc/strlen-bs.S
-@am__fastdepCCAS_TRUE@	$(AM_V_at)$(am__mv) libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs.Tpo libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs.Po
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@	$(AM_V_CPPAS)source='libc/machine/arc/strlen-bs.S' object='libc/machine/arc/libc_a-strlen-bs.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@	DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@	$(AM_V_CPPAS@am__nodep@)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -c -o libc/machine/arc/libc_a-strlen-bs.o `test -f 'libc/machine/arc/strlen-bs.S' || echo '$(srcdir)/'`libc/machine/arc/strlen-bs.S
-
-libc/machine/arc/libc_a-strlen-bs.obj: libc/machine/arc/strlen-bs.S
-@am__fastdepCCAS_TRUE@	$(AM_V_CPPAS)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -MT libc/machine/arc/libc_a-strlen-bs.obj -MD -MP -MF libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs.Tpo -c -o libc/machine/arc/libc_a-strlen-bs.obj `if test -f 'libc/machine/arc/strlen-bs.S'; then $(CYGPATH_W) 'libc/machine/arc/strlen-bs.S'; else $(CYGPATH_W) '$(srcdir)/libc/machine/arc/strlen-bs.S'; fi`
-@am__fastdepCCAS_TRUE@	$(AM_V_at)$(am__mv) libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs.Tpo libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs.Po
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@	$(AM_V_CPPAS)source='libc/machine/arc/strlen-bs.S' object='libc/machine/arc/libc_a-strlen-bs.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@	DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@	$(AM_V_CPPAS@am__nodep@)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -c -o libc/machine/arc/libc_a-strlen-bs.obj `if test -f 'libc/machine/arc/strlen-bs.S'; then $(CYGPATH_W) 'libc/machine/arc/strlen-bs.S'; else $(CYGPATH_W) '$(srcdir)/libc/machine/arc/strlen-bs.S'; fi`
-
-libc/machine/arc/libc_a-strlen-bs-norm.o: libc/machine/arc/strlen-bs-norm.S
-@am__fastdepCCAS_TRUE@	$(AM_V_CPPAS)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -MT libc/machine/arc/libc_a-strlen-bs-norm.o -MD -MP -MF libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs-norm.Tpo -c -o libc/machine/arc/libc_a-strlen-bs-norm.o `test -f 'libc/machine/arc/strlen-bs-norm.S' || echo '$(srcdir)/'`libc/machine/arc/strlen-bs-norm.S
-@am__fastdepCCAS_TRUE@	$(AM_V_at)$(am__mv) libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs-norm.Tpo libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs-norm.Po
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@	$(AM_V_CPPAS)source='libc/machine/arc/strlen-bs-norm.S' object='libc/machine/arc/libc_a-strlen-bs-norm.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@	DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@	$(AM_V_CPPAS@am__nodep@)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -c -o libc/machine/arc/libc_a-strlen-bs-norm.o `test -f 'libc/machine/arc/strlen-bs-norm.S' || echo '$(srcdir)/'`libc/machine/arc/strlen-bs-norm.S
-
-libc/machine/arc/libc_a-strlen-bs-norm.obj: libc/machine/arc/strlen-bs-norm.S
-@am__fastdepCCAS_TRUE@	$(AM_V_CPPAS)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -MT libc/machine/arc/libc_a-strlen-bs-norm.obj -MD -MP -MF libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs-norm.Tpo -c -o libc/machine/arc/libc_a-strlen-bs-norm.obj `if test -f 'libc/machine/arc/strlen-bs-norm.S'; then $(CYGPATH_W) 'libc/machine/arc/strlen-bs-norm.S'; else $(CYGPATH_W) '$(srcdir)/libc/machine/arc/strlen-bs-norm.S'; fi`
-@am__fastdepCCAS_TRUE@	$(AM_V_at)$(am__mv) libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs-norm.Tpo libc/machine/arc/$(DEPDIR)/libc_a-strlen-bs-norm.Po
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@	$(AM_V_CPPAS)source='libc/machine/arc/strlen-bs-norm.S' object='libc/machine/arc/libc_a-strlen-bs-norm.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@	DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@	$(AM_V_CPPAS@am__nodep@)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -c -o libc/machine/arc/libc_a-strlen-bs-norm.obj `if test -f 'libc/machine/arc/strlen-bs-norm.S'; then $(CYGPATH_W) 'libc/machine/arc/strlen-bs-norm.S'; else $(CYGPATH_W) '$(srcdir)/libc/machine/arc/strlen-bs-norm.S'; fi`
-
 libc/machine/arc/libc_a-strncpy.o: libc/machine/arc/strncpy.S
 @am__fastdepCCAS_TRUE@	$(AM_V_CPPAS)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CCASFLAGS) $(CCASFLAGS) -MT libc/machine/arc/libc_a-strncpy.o -MD -MP -MF libc/machine/arc/$(DEPDIR)/libc_a-strncpy.Tpo -c -o libc/machine/arc/libc_a-strncpy.o `test -f 'libc/machine/arc/strncpy.S' || echo '$(srcdir)/'`libc/machine/arc/strncpy.S
 @am__fastdepCCAS_TRUE@	$(AM_V_at)$(am__mv) libc/machine/arc/$(DEPDIR)/libc_a-strncpy.Tpo libc/machine/arc/$(DEPDIR)/libc_a-strncpy.Po
@@ -33739,20 +33673,6 @@  libc/machine/arc/libc_a-strcpy-stub.obj: libc/machine/arc/strcpy-stub.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/machine/arc/libc_a-strcpy-stub.obj `if test -f 'libc/machine/arc/strcpy-stub.c'; then $(CYGPATH_W) 'libc/machine/arc/strcpy-stub.c'; else $(CYGPATH_W) '$(srcdir)/libc/machine/arc/strcpy-stub.c'; fi`
 
-libc/machine/arc/libc_a-strlen-stub.o: libc/machine/arc/strlen-stub.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/machine/arc/libc_a-strlen-stub.o -MD -MP -MF libc/machine/arc/$(DEPDIR)/libc_a-strlen-stub.Tpo -c -o libc/machine/arc/libc_a-strlen-stub.o `test -f 'libc/machine/arc/strlen-stub.c' || echo '$(srcdir)/'`libc/machine/arc/strlen-stub.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libc/machine/arc/$(DEPDIR)/libc_a-strlen-stub.Tpo libc/machine/arc/$(DEPDIR)/libc_a-strlen-stub.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libc/machine/arc/strlen-stub.c' object='libc/machine/arc/libc_a-strlen-stub.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/machine/arc/libc_a-strlen-stub.o `test -f 'libc/machine/arc/strlen-stub.c' || echo '$(srcdir)/'`libc/machine/arc/strlen-stub.c
-
-libc/machine/arc/libc_a-strlen-stub.obj: libc/machine/arc/strlen-stub.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/machine/arc/libc_a-strlen-stub.obj -MD -MP -MF libc/machine/arc/$(DEPDIR)/libc_a-strlen-stub.Tpo -c -o libc/machine/arc/libc_a-strlen-stub.obj `if test -f 'libc/machine/arc/strlen-stub.c'; then $(CYGPATH_W) 'libc/machine/arc/strlen-stub.c'; else $(CYGPATH_W) '$(srcdir)/libc/machine/arc/strlen-stub.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libc/machine/arc/$(DEPDIR)/libc_a-strlen-stub.Tpo libc/machine/arc/$(DEPDIR)/libc_a-strlen-stub.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libc/machine/arc/strlen-stub.c' object='libc/machine/arc/libc_a-strlen-stub.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/machine/arc/libc_a-strlen-stub.obj `if test -f 'libc/machine/arc/strlen-stub.c'; then $(CYGPATH_W) 'libc/machine/arc/strlen-stub.c'; else $(CYGPATH_W) '$(srcdir)/libc/machine/arc/strlen-stub.c'; fi`
-
 libc/machine/arc/libc_a-strncpy-stub.o: libc/machine/arc/strncpy-stub.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/machine/arc/libc_a-strncpy-stub.o -MD -MP -MF libc/machine/arc/$(DEPDIR)/libc_a-strncpy-stub.Tpo -c -o libc/machine/arc/libc_a-strncpy-stub.o `test -f 'libc/machine/arc/strncpy-stub.c' || echo '$(srcdir)/'`libc/machine/arc/strncpy-stub.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libc/machine/arc/$(DEPDIR)/libc_a-strncpy-stub.Tpo libc/machine/arc/$(DEPDIR)/libc_a-strncpy-stub.Po
diff --git a/newlib/libc/machine/arc/Makefile.inc b/newlib/libc/machine/arc/Makefile.inc
index c0d6d7b39..f5fcb5ba7 100644
--- a/newlib/libc/machine/arc/Makefile.inc
+++ b/newlib/libc/machine/arc/Makefile.inc
@@ -22,10 +22,6 @@  libc_a_SOURCES += \
 	%D%/strcpy-bs.S \
 	%D%/strcpy-bs-arc600.S \
 	%D%/strcpy-stub.c \
-	%D%/strlen.S \
-	%D%/strlen-bs.S \
-	%D%/strlen-bs-norm.S \
-	%D%/strlen-stub.c \
 	%D%/strncpy.S \
 	%D%/strncpy-stub.c \
 	%D%/strncpy-bs.S
diff --git a/newlib/libc/machine/arc/strlen-bs-norm.S b/newlib/libc/machine/arc/strlen-bs-norm.S
deleted file mode 100644
index 89c6fcd68..000000000
--- a/newlib/libc/machine/arc/strlen-bs-norm.S
+++ /dev/null
@@ -1,117 +0,0 @@ 
-/*
-   Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-
-   1) Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-   2) Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
-
-   3) Neither the name of the Synopsys, Inc., nor the names of its contributors
-   may be used to endorse or promote products derived from this software
-   without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/* This implementation is optimized for performance.  For code size a generic
-   implementation of this function from newlib/libc/string/strlen.c will be
-   used.  */
-#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
-    && !defined (__ARC_RF16__)
-
-#include "asm.h"
-#if (defined (__ARC700__) || defined (__ARCEM__) || defined (__ARCHS__)) \
-    && defined (__ARC_NORM__) && defined (__ARC_BARREL_SHIFTER__)
-
-ENTRY (strlen)
-	or	r3,r0,7
-	ld	r2,[r3,-7]
-	ld.a	r6,[r3,-3]
-	mov	r4,0x01010101
-	; uses long immediate
-#ifdef __LITTLE_ENDIAN__
-	asl_s	r1,r0,3
-	btst_s	r0,2
-	asl	r7,r4,r1
-	ror	r5,r4
-	sub	r1,r2,r7
-	bic_s	r1,r1,r2
-	mov.eq	r7,r4
-	sub	r12,r6,r7
-	bic	r12,r12,r6
-	or.eq	r12,r12,r1
-	and	r12,r12,r5
-	brne	r12,0,.Learly_end
-#else /* BIG ENDIAN */
-	ror	r5,r4
-	btst_s	r0,2
-	mov_s	r1,31
-	sub3	r7,r1,r0
-	sub	r1,r2,r4
-	bic_s	r1,r1,r2
-	bmsk	r1,r1,r7
-	sub	r12,r6,r4
-	bic	r12,r12,r6
-	bmsk.ne	r12,r12,r7
-	or.eq	r12,r12,r1
-	and	r12,r12,r5
-	brne	r12,0,.Learly_end
-#endif /* ENDIAN */
-
-.Loop:
-	ld_s	r2,[r3,4]
-	ld.a	r6,[r3,8]
-	; stall for load result
-	sub	r1,r2,r4
-	bic_s	r1,r1,r2
-	sub	r12,r6,r4
-	bic	r12,r12,r6
-	or_l	r12,r12,r1
-	and	r12,r12,r5
-	breq_l	r12,0,.Loop
-.Lend:
-	and.f	r1,r1,r5
-	sub.ne	r3,r3,4
-	mov.eq	r1,r12
-#ifdef __LITTLE_ENDIAN__
-	sub_s	r2,r1,1
-	bic_s	r2,r2,r1
-	norm	r1,r2
-	sub_s	r0,r0,3
-	lsr_s	r1,r1,3
-	sub	r0,r3,r0
-	j_s.d	[blink]
-	sub_l	r0,r0,r1
-#else /* BIG ENDIAN */
-	lsr_s	r1,r1,7
-	mov.eq	r2,r6
-	bic_s	r1,r1,r2
-	norm	r1,r1
-	sub	r0,r3,r0
-	lsr_s	r1,r1,3
-	j_s.d	[blink]
-	add_l	r0,r0,r1
-#endif /* ENDIAN */
-.Learly_end:
-	b.d	.Lend
-	sub_s.ne r1,r1,r1
-ENDFUNC (strlen)
-#endif /* (__ARC700__ || __ARCEM__ || __ARCHS__) && __ARC_NORM__
-    && __ARC_BARREL_SHIFTER__ */
-
-#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strlen-bs.S b/newlib/libc/machine/arc/strlen-bs.S
deleted file mode 100644
index 15caa830c..000000000
--- a/newlib/libc/machine/arc/strlen-bs.S
+++ /dev/null
@@ -1,123 +0,0 @@ 
-/*
-   Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-
-   1) Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-   2) Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
-
-   3) Neither the name of the Synopsys, Inc., nor the names of its contributors
-   may be used to endorse or promote products derived from this software
-   without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/* This implementation is optimized for performance.  For code size a generic
-   implementation of this function from newlib/libc/string/strlen.c will be
-   used.  */
-#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
-    && !defined (__ARC_RF16__)
-
-#include "asm.h"
-
-#if (defined (__ARC600__) || !defined (__ARC_NORM__)) && !defined (__ARC601__) \
-    && defined (__ARC_BARREL_SHIFTER__)
-/* This code is optimized for the ARC600 pipeline.  */
-
-ENTRY (strlen)
-	or	r3,r0,7
-	ld	r2,[r3,-7]
-	ld.a	r6,[r3,-3]
-	mov	r4,0x01010101
-	; uses long immediate
-#ifdef __LITTLE_ENDIAN__
-	asl_s	r1,r0,3
-	btst_s	r0,2
-	asl	r7,r4,r1
-	ror	r5,r4
-	sub	r1,r2,r7
-	bic_l	r1,r1,r2
-	mov.eq	r7,r4
-	sub	r12,r6,r7
-	bic	r12,r12,r6
-	or.eq	r12,r12,r1
-	and	r12,r12,r5
-	brne	r12,0,.Learly_end
-#else /* BIG ENDIAN */
-	ror	r5,r4
-	btst_s	r0,2
-	mov_s	r1,31
-	sub3	r7,r1,r0
-	sub	r1,r2,r4
-	bic_l	r1,r1,r2
-	bmsk	r1,r1,r7
-	sub	r12,r6,r4
-	bic	r12,r12,r6
-	bmsk.ne	r12,r12,r7
-	or.eq	r12,r12,r1
-	and	r12,r12,r5
-	brne	r12,0,.Learly_end
-#endif /* ENDIAN */
-
-.Loop:
-	ld_s	r2,[r3,4]
-	ld.a	r6,[r3,8]
-	; stall for load result
-	sub	r1,r2,r4
-	bic_s	r1,r1,r2
-	sub	r12,r6,r4
-	bic	r12,r12,r6
-	or_s	r12,r12,r1
-	and	r12,r12,r5
-	breq_s	r12,0,.Loop
-.Lend:
-	and.f	r1,r1,r5
-	sub.ne	r3,r3,4
-#ifdef __LITTLE_ENDIAN__
-	mov.eq	r1,r12
-	asr.f	0,r1,8
-	bmsk.f	0,r1,15
-	sub	r0,r3,r0
-	add.cc	r0,r0,1
-	jne.d	[blink]
-	asl.f	0,r1,9
-	j_s.d	[blink]
-	sbc	r0,r0,-2
-#else /* BIG ENDIAN */
-	mov.eq	r2,r6
-	asl_s	r2,r2,7
-	mov.eq	r1,r12
-	bic_s	r1,r1,r2
-	asr.f	0,r1,16
-	sub	r0,r3,r0
-	add.pl	r0,r0,1
-	jne.d	[blink]
-	add.eq	r0,r0,1
-	j_s.d	[blink]
-	add.cc	r0,r0,1
-#endif /* ENDIAN */
-
-	.balign	4
-.Learly_end:
-	b.d	.Lend
-	sub_s.ne r1,r1,r1
-ENDFUNC (strlen)
-#endif /* (__ARC600__ || !__ARC_NORM__) && !__ARC601__ && __ARC_BARREL_SHIFTER__ */
-
-#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strlen-stub.c b/newlib/libc/machine/arc/strlen-stub.c
deleted file mode 100644
index c52eecaa6..000000000
--- a/newlib/libc/machine/arc/strlen-stub.c
+++ /dev/null
@@ -1,37 +0,0 @@ 
-/*
-   Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-
-   1) Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-   2) Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
-
-   3) Neither the name of the Synopsys, Inc., nor the names of its contributors
-   may be used to endorse or promote products derived from this software
-   without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)	\
-  || defined (__ARC_RF16__)
-# include "../../string/strlen.c"
-#else
-/* See strlen-*.S.  */
-#endif
diff --git a/newlib/libc/machine/arc/strlen.S b/newlib/libc/machine/arc/strlen.S
deleted file mode 100644
index 2072f3d15..000000000
--- a/newlib/libc/machine/arc/strlen.S
+++ /dev/null
@@ -1,166 +0,0 @@ 
-/*
-   Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-
-   1) Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-   2) Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
-
-   3) Neither the name of the Synopsys, Inc., nor the names of its contributors
-   may be used to endorse or promote products derived from this software
-   without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/* This implementation is optimized for performance.  For code size a generic
-   implementation of this function from newlib/libc/string/strlen.c will be
-   used.  */
-#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED) \
-    && !defined (__ARC_RF16__)
-
-#include "asm.h"
-
-#if defined(__ARC601__) || !defined (__ARC_BARREL_SHIFTER__)
-/* This code is optimized for the ARC601 pipeline without barrel shifter.  */
-
-ENTRY (strlen)
-	or	r3,r0,7
-	ld	r2,[r3,-7]
-	ld.a	r6,[r3,-3]
-	mov	r4,0x01010101
-	; uses long immediate
-#ifdef __LITTLE_ENDIAN__
-	bmsk.f	0,r0,1
-	mov_s	r1,31
-	add3_s	r1,r1,r0
-	bmsk	r7,r4,r1
-	xor.ne	r7,r7,r4
-	btst_s	r0,2
-	ror	r5,r4
-	sub	r1,r2,r7
-	bic_s	r1,r1,r2
-	mov.eq	r7,r4
-	sub	r12,r6,r7
-	bic	r12,r12,r6
-	or.eq	r12,r12,r1
-	and	r12,r12,r5
-	brne	r12,0,.Learly_end
-#else /* BIG ENDIAN */
-	add.f	r1,r4,30 ; r1 mod 31 := -1; clear carry
-	ror	r5,r4
-	sub3	r7,r1,r0
-	btst_s	r0,2
-	sub	r1,r2,r4
-	bic_s	r1,r1,r2
-	bmsk	r1,r1,r7
-	sub	r12,r6,r4
-	bic	r12,r12,r6
-	bmsk.ne	r12,r12,r7
-	or.eq	r12,r12,r1
-	and	r12,r12,r5
-	brne	r12,0,.Learly_end
-#endif /* ENDIAN */
-
-.Loop:
-	ld_s	r2,[r3,4]
-	ld.a	r6,[r3,8]
-	; stall for load result
-	sub	r1,r2,r4
-	bic_s	r1,r1,r2
-	sub	r12,r6,r4
-	bic	r12,r12,r6
-	or_s	r12,r12,r1
-	and	r12,r12,r5
-	breq_s	r12,0,.Loop
-.Lend:
-	and.f	r1,r1,r5
-	sub.ne	r3,r3,4
-#ifdef __LITTLE_ENDIAN__
-	mov.eq	r1,r12
-	btst_s	r1,7
-	sub	r0,r3,r0
-	add.eq	r0,r0,1
-	bmsk.f	0,r1,15
-	add.eq	r0,r0,1
-	bmsk.f	0,r1,23
-	j_s.d	[blink]
-	add.eq	r0,r0,1
-#else /* BIG ENDIAN */
-#ifdef __OPTIMIZE_SIZE__
-1:	ldb_s	r1,[r3]
-	breq_s	r1,0,0f
-	ldb.a	r1,[r3,1]
-	breq_s	r1,0,0f
-	ldb.a	r1,[r3,1]
-	breq_s	r1,0,0f
-	add_s	r3,r3,1
-0:	j_s.d	[blink]
-	sub	r0,r3,r0
-
-#define SPECIAL_EARLY_END
-.Learly_end:
-	mov_s	r3,r0
-	b_s	1b
-#elif 0 /* Need more information about pipeline to assess if this is faster.  */
-	mov.eq  r2,r6
-	and	r2,r2,r5
-	sub1	r2,r4,r2
-	mov.eq  r1,r12
-	bic.f   r1,r1,r2
-	sub     r0,r3,r0
-	add.pl  r0,r0,1
-	btst.pl	r1,23
-	add.eq	r0,r0,1
-	btst.eq	r1,15
-	j_s.d	[blink]
-	add.eq	r0,r0,1
-#else /* !__OPTIMIZE_SIZE__ */
-	/* Need carry clear here.  */
-	mov.eq	r2,r6
-1:	bmsk	r1,r2,23
-	breq	r1,r2,0f
-	bmsk	r2,r1,15
-	breq.d	r1,r2,0f
-	add_s	r3,r3,1
-	cmp	r2,0x100
-	add_s	r3,r3,2
-0:	j_s.d	[blink]
-	sbc	r0,r3,r0
-
-#define SPECIAL_EARLY_END
-.Learly_end:
-	sub_s.ne r1,r1,r1
-	mov_s	r12,0
-	bset	r12,r12,r7
-	sub1	r2,r2,r12
-	b.d	.Lend
-	sub1.ne	r6,r6,r12
-#endif /* !__OPTIMIZE_SIZE__ */
-#endif /* ENDIAN */
-
-#ifndef SPECIAL_EARLY_END
-	.balign	4
-.Learly_end:
-	b.d	.Lend
-	sub_s.ne r1,r1,r1
-#endif /* !SPECIAL_EARLY_END */
-ENDFUNC (strlen)
-#endif /* __ARC601__ || !__ARC_BARREL_SHIFTER__*/
-
-#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */