From 3f102f5881c85d6db20daedb8645fa980c66ba19 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Thu, 11 Oct 2018 23:28:04 +0000 Subject: Provide string functions for use before ifuncs get resolved. The change is a no-op for architectures which don't ifunc memset, memcpy nor memmove. Convert places which need them. Xen bits by royger. Reviewed by: kib Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17487 --- sys/kern/link_elf.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'sys/kern/link_elf.c') diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index 9338b06bb268..9c82b7178a69 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -1682,14 +1682,10 @@ link_elf_ireloc(caddr_t kmdp) { struct elf_file eff; elf_file_t ef; - volatile char *c; - size_t i; ef = &eff; - /* Do not use bzero/memset before ireloc is done. */ - for (c = (char *)ef, i = 0; i < sizeof(*ef); i++) - c[i] = 0; + bzero_early(ef, sizeof(*ef)); ef->modptr = kmdp; ef->dynamic = (Elf_Dyn *)&_DYNAMIC; -- cgit v1.2.3