svn commit: r341775 - stable/11/libexec/rtld-elf
Konstantin Belousov
kib at FreeBSD.org
Mon Dec 10 00:59:11 UTC 2018
Author: kib
Date: Mon Dec 10 00:59:10 2018
New Revision: 341775
URL: https://svnweb.freebsd.org/changeset/base/341775
Log:
MFC r341439:
Provide naive but self-contained implementations of memset(3) and
bzero(3) for rtld.
Modified:
stable/11/libexec/rtld-elf/rtld.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/libexec/rtld-elf/rtld.c
==============================================================================
--- stable/11/libexec/rtld-elf/rtld.c Mon Dec 10 00:57:56 2018 (r341774)
+++ stable/11/libexec/rtld-elf/rtld.c Mon Dec 10 00:59:10 2018 (r341775)
@@ -5578,3 +5578,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-all
mailing list