Author: kib Date: Tue Aug 7 20:43:50 2018 New Revision: 337436 URL: https://svnweb.freebsd.org/changeset/base/337436
Log: Followup to r337430: only call elf_reloc_ifunc on x86. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/link_elf_obj.c Modified: head/sys/kern/link_elf_obj.c ============================================================================== --- head/sys/kern/link_elf_obj.c Tue Aug 7 19:23:03 2018 (r337435) +++ head/sys/kern/link_elf_obj.c Tue Aug 7 20:43:50 2018 (r337436) @@ -485,10 +485,12 @@ link_elf_link_preload_finish(linker_file_t lf) if (error) return (error); +#if defined(__i386__) || defined(__amd64__) /* Now ifuncs. */ error = link_elf_reloc_local(lf, true); if (error != 0) return (error); +#endif /* Invoke .ctors */ link_elf_invoke_ctors(lf->ctors_addr, lf->ctors_size); @@ -994,10 +996,12 @@ link_elf_load_file(linker_class_t cls, const char *fil if (error) goto out; +#if defined(__i386__) || defined(__amd64__) /* Now ifuncs. */ error = link_elf_reloc_local(lf, true); if (error != 0) goto out; +#endif /* Invoke .ctors */ link_elf_invoke_ctors(lf->ctors_addr, lf->ctors_size); @@ -1521,9 +1525,11 @@ link_elf_reloc_local(linker_file_t lf, bool ifuncs) ifuncs) elf_reloc_local(lf, base, rel, ELF_RELOC_REL, elf_obj_lookup); +#if defined(__i386__) || defined(__amd64__) else if (ifuncs) elf_reloc_ifunc(lf, base, rel, ELF_RELOC_REL, elf_obj_lookup); +#endif } } @@ -1552,9 +1558,11 @@ link_elf_reloc_local(linker_file_t lf, bool ifuncs) ifuncs) elf_reloc_local(lf, base, rela, ELF_RELOC_RELA, elf_obj_lookup); +#if defined(__i386__) || defined(__amd64__) else if (ifuncs) elf_reloc_ifunc(lf, base, rela, ELF_RELOC_RELA, elf_obj_lookup); +#endif } } return (0); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"