Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Dec 2018 00:59:10 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r341775 - stable/11/libexec/rtld-elf
Message-ID:  <201812100059.wBA0xAY1032634@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
+}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812100059.wBA0xAY1032634>