Add _?ENTRY_NB() macro for doing an ASM function entry withoutsetting the binding to global (NB == "no binding"), as clang 13 isnow warning about changing the binding from global to weak. Usethem
Add _?ENTRY_NB() macro for doing an ASM function entry withoutsetting the binding to global (NB == "no binding"), as clang 13 isnow warning about changing the binding from global to weak. Usethem for bcopy, brk, and sbrk.Add the '.L' prefix to internal labels in the bcopy implementationto remove them from the symbol tableStart using the MI DEFS.h: delete the #defines from powerpc/SYS.hthat the MI DEFS.h provides and switch from SYS.h to DEFS.h in filesthat don't do syscalls. Use END_BUILTIN from the MI DEFS.h for ffs.ok gkoehler@
show more ...
Add retguard to macppc kernel locore.S, ofwreal.S, setjmp.SThis changes RETGUARD_SETUP(ffs) to RETGUARD_SETUP(ffs, %r11, %r12)and RETGUARD_CHECK(ffs) to RETGUARD_CHECK(ffs, %r11, %r12)to show tha
Add retguard to macppc kernel locore.S, ofwreal.S, setjmp.SThis changes RETGUARD_SETUP(ffs) to RETGUARD_SETUP(ffs, %r11, %r12)and RETGUARD_CHECK(ffs) to RETGUARD_CHECK(ffs, %r11, %r12)to show that r11 and r12 are in use between setup and check, and topick registers other than r11 and r12 in some kernel functions.ok mortimer@ deraadt@
Retguard asm macros for powerpc libc, ld.soAdd retguard to some, but not all, asm functions in libc. Edit SYS.hin libc to remove the PREFIX macros and add SYSENTRY (more likeaarch64 and powerpc6
Retguard asm macros for powerpc libc, ld.soAdd retguard to some, but not all, asm functions in libc. Edit SYS.hin libc to remove the PREFIX macros and add SYSENTRY (more likeaarch64 and powerpc64), so we can insert RETGUARD_SETUP afterSYSENTRY. Some .S files in this commit don't get retguard, but dostop using the old prefix macros.Tested by deraadt@, who put this diff in a macppc snap.
Provide an optimized implementation of ffs(3) in libc onaarch64/powerpc/powerpc64, making use of the count leadingzeros instruction. Also add a brief regression test.ok deraadt@ kettenis@
Add framework for resolving (pun intended) libc namespace issues, usingwrapper .h files and asm labels to let internal calls resolve directly andnot be overridable or use the PLT. Then, apply that
Add framework for resolving (pun intended) libc namespace issues, usingwrapper .h files and asm labels to let internal calls resolve directly andnot be overridable or use the PLT. Then, apply that framework to most ofthe functions in stdio.h, string.h, err.h, and wchar.h. Delete theshould-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here.tests clean on i386, amd64, sparc64, powerpc, and mips64naming feedback from kettenis@ and millert@ok kettenis@
Make index/rindex weak aliases of strchr/strrchr since they are notpart of the ISO C standard and have also been dropped from POSIX.OK guenther@ kettenis@
asm version from libkern, but mempcy() remains tied to theMI syslog_r/abort version for the time being.ok miod
restructure libc/string + libc/arch/*/string coperation regarding(potentially) MD versions (function dependent, not filename dependent)split out memcpy/memmove/bcopy and strchr/index/strrchr/rindex
restructure libc/string + libc/arch/*/string coperation regarding(potentially) MD versions (function dependent, not filename dependent)split out memcpy/memmove/bcopy and strchr/index/strrchr/rindexBring back amd64 .S versionsAnd the final touch: switch all architectures temporarily to MImemcpy.c, which contains syslog + abort for overlapping copies. A niceharsh undefined behaviour. We will clean the entire userland of theremaining issues in this catagory, then switch to the optimised memcpywhich skips the memmove check.I tried to cut this change into pieces, but testing each sub-step onevery architecture is too time consuming and mindnumbing.ok miod
junk space
missing parts from last commit
Check-in of powerpc library support.NOTE: This will not work until the other pieces are checked in. This is primarily the NetBSD powerpc port, with modifications to support ELF.