Date: Mon, 10 Dec 2018 00:56:07 +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-12@freebsd.org Subject: svn commit: r341773 - stable/12/libexec/rtld-elf Message-ID: <201812100056.wBA0u76I032387@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; +}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812100056.wBA0u76I032387>