svn commit: r341773 - stable/12/libexec/rtld-elf
Konstantin Belousov
kib at FreeBSD.org
Mon Dec 10 00:56:08 UTC 2018
Author: kib
Date: Mon Dec 10 00:56:07 2018
New Revision: 341773
URL: https://svnweb.freebsd.org/changeset/base/341773
Log:
MFC r341439:
Provide naive but self-contained implementations of memset(3) and
bzero(3) for rtld.
Modified:
stable/12/libexec/rtld-elf/rtld.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/libexec/rtld-elf/rtld.c
==============================================================================
--- stable/12/libexec/rtld-elf/rtld.c Mon Dec 10 00:54:18 2018 (r341772)
+++ stable/12/libexec/rtld-elf/rtld.c Mon Dec 10 00:56:07 2018 (r341773)
@@ -5599,3 +5599,25 @@ rtld_strerror(int errnum)
return ("Unknown error");
return (sys_errlist[errnum]);
}
+
+/*
+ * No ifunc relocations.
+ */
+void *
+memset(void *dest, int c, size_t len)
+{
+ size_t i;
+
+ for (i = 0; i < len; i++)
+ ((char *)dest)[i] = c;
+ return (dest);
+}
+
+void
+bzero(void *dest, size_t len)
+{
+ size_t i;
+
+ for (i = 0; i < len; i++)
+ ((char *)dest)[i] = 0;
+}
More information about the svn-src-stable
mailing list