summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/arm/string
AgeCommit message (Collapse)AuthorFilesLines
2018-01-21Implement ffs(3) using the CLZ instructions which has been available everkettenis1-43/+6
since ARMv5. Should be much faster but more importantly it removes the data table from .text which could introduce unwanted ROP gadgets. Based on changes in Android/Bionic by Elliott Hughes. ok patrick@
2018-01-19Partial revert of rev. 1.7, fixes build with clangjca1-2/+1
The error was: --8<-- ffs.S:57:2: error: unsupported relocation on symbol adrne r2, .L_ffs_table ^ -->8-- Minimal workaround suggested by deraadt@, ok guenther@ kettenis@
2018-01-18Instead of trying to handle ffs() with the normal rename-mark-hidden-and-aliasguenther1-3/+5
dance, mark it protected. This works better for both gcc and clang: gcc blocks overriding of internal calls, while clang permits inlining again. ok otto@
2017-12-16Don't use _libc_ prefix when referencing "builtin" symbols with clang.kettenis1-2/+2
Slightly tweaked diff from guenther@
2017-11-29clang doesn't propagate attributes like "asm labels" and "visibility(hidden)"guenther3-6/+6
to builtins like mem{set,cpy,move} and __stack_smash_handler. So, when building with clang, instead mark those as protected visibility to get rid of the PLT relocations. We can't take the address of them then, but that's ok: it's a build-time error not a run-time error. ok kettenis@
2017-10-29Stop exporting _memcpy, an implementation detail of bcopy/memcpy/memmoveguenther4-8/+10
ok kettenis@ deraadt@
2016-09-18Use unified syntax such that this compiles with both gcc and clang.kettenis1-2/+4
ok jsg@
2016-08-06Use internal names for __errno, _memcpy, memset, and {,_}{set,long}jmpguenther10-25/+25
Eliminate pointless use of PIC_SYM() Split out DEFS.h from SYS.h like some other archs ok kettenis@ deraadt@
2016-04-28remove duplicate strrchr.c entry in SRCSjsg1-2/+2
ok deraadt@
2015-08-31Add framework for resolving (pun intended) libc namespace issues, usingguenther10-20/+30
wrapper .h files and asm labels to let internal calls resolve directly and not be overridable or use the PLT. Then, apply that framework to most of the functions in stdio.h, string.h, err.h, and wchar.h. Delete the should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here. tests clean on i386, amd64, sparc64, powerpc, and mips64 naming feedback from kettenis@ and millert@ ok kettenis@
2015-06-08At some point arm moved to a unified syntax for arm and thumb instructions.jsg2-37/+41
While binutils supports both "unified" and "divided" syntax (defaulting to divided) the integrated assembler in clang only supports unified names so switch some files to unified syntax. Similiar changes were made in bitrig and freebsd. No difference in objdump -d output. tested on zaurus by deraadt@, ok miod@
2015-05-15Make index/rindex weak aliases of strchr/strrchr since they are notmillert1-2/+2
part of the ISO C standard and have also been dropped from POSIX. OK guenther@ kettenis@
2014-11-30restructure libc/string + libc/arch/*/string coperation regardingderaadt2-9/+16
(potentially) MD versions (function dependent, not filename dependent) split out memcpy/memmove/bcopy and strchr/index/strrchr/rindex Bring back amd64 .S versions And the final touch: switch all architectures temporarily to MI memcpy.c, which contains syslog + abort for overlapping copies. A nice harsh undefined behaviour. We will clean the entire userland of the remaining issues in this catagory, then switch to the optimised memcpy which skips the memmove check. I tried to cut this change into pieces, but testing each sub-step on every architecture is too time consuming and mindnumbing. ok miod
2012-09-04remove lint leftovers; ok guenther@okan1-4/+1
2009-10-28more rcsid/sccs cleanupderaadt2-6/+2
2009-05-03Fix signed vs unsigned issue with memcmp/strncmp where the size parameterdrahn2-10/+16
was incorrectly being treated as signed. ok miod@
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.ray5-40/+5
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2007-05-17LSRCS should refer to the C source version of asm files 'put it in' deraadt@drahn1-2/+2
2007-05-17Unbreak libc on arm. -mojmaja1-2/+2
2007-05-15fix some lint 'xxx used, but not defined' warnings by properly addingotto1-1/+4
stuff to LSRCS
2005-08-07zap rcsid.espie2-6/+2
okay deraadt@ (tested them all)
2004-02-01ARGH, forgot tags.drahn11-0/+11
2004-02-01arm libc support. From NetBSD. currently supports softfloat.drahn11-0/+1002