Move all data from .text section to .rodata, and update the code tofetch them correctly when building PIC.ok kettenis@
_C_LABEL() and _ASM_LABEL() are no longer useful in the "everythingis ELF" world. Eliminate use of them in amd64, arm64, armv7, i386,macppc, mips64, and sparc64 code.ok deraadt@ jca@ krw@
Wow, it cannot even be in .data...
Sorry, the PIC macros cannot reach to .rodata....
Instead of trying to handle ffs() with the normal rename-mark-hidden-and-aliasdance, mark it protected. This works better for both gcc and clang: gccblocks overriding of internal calls, while clan
Instead of trying to handle ffs() with the normal rename-mark-hidden-and-aliasdance, mark it protected. This works better for both gcc and clang: gccblocks overriding of internal calls, while clang permits inlining again.ok otto@
show more ...
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@
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
remove lint leftovers; ok guenther@
Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure ccinvocations. This allows us to use the compiler builtin define __PIC__ to checkfor PIC/PIEness rather than passing -DPI
Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure ccinvocations. This allows us to use the compiler builtin define __PIC__ to checkfor PIC/PIEness rather than passing -DPIC. Simplifies PIE work a lot.ok matthew@, conceptually ok kurt@
fix some lint 'xxx used, but not defined' warnings by properly addingstuff to LSRCS
add some missing $, ok djm@ 'That looks fine to me' millert@
Remove the advertising clause in the UCB license which Berkeleyrescinded 22 July 1999. Proofed by myself and Theo.
except ffs and strlen we use the generic functions (for now).
ffs from sparc and strlen from NetBSD.(Don't ask me why our makefiles wouldn't accept using strlen.c)