summaryrefslogtreecommitdiff
path: root/lib/libc/arch
AgeCommit message (Collapse)Author
2015-08-27fix commentPhilip Guenther
2015-08-26Sync with other per-arch Symbols.list filesPhilip Guenther
2015-08-26Hide many (194!) symbols that nothing should be using.Philip Guenther
Delete exect(2); it wasn't portable across archs and nothing used it. ports test build by naddy@ ok deraadt@ kettenis@
2006-10-10Preliminary userland bits for OpenBSD/landisk, many things coming fromMiod Vallat
NetBSD.
2015-08-25catch upMiod Vallat
2015-08-23Make __cerror() use the per-thread errno location if r2 isn't zero. This wayMark Kettenis
libpthread no longer has to override it which means that we can use a local call and can avoid setting up r30 as a _GLOBAL_OFFSET_TABLE_ pointer, which is hard the way the powerpc ABI works. For now we continue to provide __cerror as a weak symbol, but ___cerror is now protected and internal calls within libc now use ___cerror instead of __cerror. discussed with guenther@
2015-08-23Fetch the _GLOBAL_OFFSET_TABLE_ pointer in a way that's compatible with theMark Kettenis
Secure-PLT ABI.
2015-08-23Set up r30 with the _GLOBAL_OFFSET_TABLE_ pointer as required by theMark Kettenis
Secure-PLT ABI.
2015-08-22Explicitly list the symbols permitted to be exported by libc.Philip Guenther
This is primed with the current list of exported symbols so it doesn't change the ABI yet, but will prevent unintentional additions in the future and sets the stage for reductions. ok deraadt@ kettenis@
2015-06-17Set FUNC symbol sizes of auto-generated and hand-written syscall wrappers.Masao Uebayashi
Original diff from guenther@, adjusted by me. OK guenther@
2015-06-12Reuse SYSENTRY_HIDDEN() in SYSENTRY(); no functional changes.Masao Uebayashi
2015-06-08At some point arm moved to a unified syntax for arm and thumb instructions.Jonathan Gray
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-06-01Since the __{div,rem}{l,q}{,u} special libc entry points use a specificMiod Vallat
calling convention which conflicts over t11 usage with the secureplt calling convention, force these symbols to be `notype' rather `function', so that the linker will not attempt to use plt relocations for them in the absence of explicit relocation information. Note that these symbols are still public and still callable with the old plt convention, so existing binaries will still work with an updated libc, and no libc version change is necessary.
2015-06-01Put END() matching _ENTRY() (== ENTRY() w/o prof).Masao Uebayashi
2015-06-01Put END() matching ENTRY().Masao Uebayashi
2015-05-29Put END() where appropriate.Masao Uebayashi
While here, kill redundant use of _C_LABEL() in ENTRY().
2015-05-29Put obvious END() macros that match ENTRY() entries.Masao Uebayashi
2015-05-29Sprinkle END() in some straightforward *.S files that have ENTRY(). TheMasao Uebayashi
resulting *.o have "FUNC" symbols with size set.
2015-05-26Bring back `1:' label removed by mistake in 1.7. Complained loudly about by gasMiod Vallat
2.17, while 2.15 didn't care, which just caused a cold shiver accross my spine.
2015-05-15Make index/rindex weak aliases of strchr/strrchr since they are notTodd C. Miller
part of the ISO C standard and have also been dropped from POSIX. OK guenther@ kettenis@
2015-05-14Use STRONG_ALIAS instead of ALTENTRY.Mark Kettenis
ok millert@
2015-05-12Put the right number of leading underscores in ___cerror and __cerror, forMiod Vallat
the sake of libpthread. Probably missed during the a.out->ELF switch, I can't believe this went unnoticed for so long.
2015-04-21Eliminate the last uses of *fork's second syscall return register; the pidPhilip Guenther
is zero in the child ok deraadt@ miod@
2015-04-07Make pthread_atfork() track the DSO that called it like atexit() does,Philip Guenther
unregistering callbacks if the DSO is unloaded. Move the callback handling from libpthread to libc, though libpthread still overrides the inner call to handle locking and thread-library reinitialization. Major version bump for both libc and libpthread. verification that this fixes various ports ajacoutot@ asm assistance miod@; ok millert@ deraadt@
2015-03-31Stop encoding the syscall number in the swi instruction - this has beenJoel Sing
unused for around 8 years, when the kernel ABI was changed to use the syscall number specified in r12. ok miod@ jsg@
2015-03-31Simplify fork/vfork logic: the kernel has handled returning zero in the childPhilip Guenther
for a long time, so there's no need to test the second return register here in the asm stub. ok and testing of many archs by krw@ miod@
2006-10-10Preliminary userland bits for OpenBSD/landisk, many things coming fromMiod Vallat
NetBSD.
2015-01-04remove code for ancient gcc.Daniel Dickman
ok millert@, kettenis@
2014-12-11we do not need the complexity of an assembly swab function here.Ted Unangst
ok deraadt
2014-12-09Import new amd64 assembly versions of strchr/index, strrchr/rindex,Reyk Floeter
and strlen that provide a significantly faster performance than our previous .c or .S implementations. Based on NetBSD's code. Tested with different amd64 CPUs. ok deraadt@ mikeb@
2014-12-05memmove/bcopy from libkern, almost certainly the unrolling here isTheo de Raadt
beneficial because the compiler tends to do small known-size blocks inline. Continue using the MI memcpy.c for now. ok miod
2014-12-04asm version from libkern, but mempcy() remains tied to theTheo de Raadt
MI syslog_r/abort version for the time being. ok miod
2014-12-02Noone cares what castle the princess is inTheo de Raadt
2014-12-02sync bcopy/memmove/memcpy implementation with the kernel. ok deraadtTed Unangst
2014-11-30restructure libc/string + libc/arch/*/string coperation regardingTheo de Raadt
(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
2006-10-10Preliminary userland bits for OpenBSD/landisk, many things coming fromMiod Vallat
NetBSD.
2014-11-22mop up a barely started project... getting in the way of grepping the tree!Theo de Raadt
2014-11-20One of these optimized stubs creates some incredibly subtle damage,Theo de Raadt
causing as(1) to create a wrong nop-sled for text segment aligns. Revert, until it is found and fixed.
2014-11-20Add amd64 assembler versions of some standard functions to libc. TheReyk Floeter
code is already used in the kernel and the files are unmodified copies from src/sys/lib/libkern/arch/amd64/. Depending on the function, this gives us some speedup in userland. ok deraadt@, no objections from miod@
2014-11-14let this compile with clang; no binary change with gcc.Daniel Dickman
ok deraadt@
2014-09-12Fix some bugs in the _Qp_sqrt implementation that would limit the accuracyMark Kettenis
of the result in many cases. From FreeBSD allbeit with some changes to keep the coding style consistent. This fixes the asinhl(4) issue reported by dickman@ on tech@.
2014-08-15XPG requires insque() and remque() to work with linear lists and not justPhilip Guenther
circular lists. Amazingly, they managed to extend the requirements to no longer match the behavior of the VAX instructions they were modeled after, so the trivial VAX ASM versions have to go. Nice job breaking it, X/Open! Based on a diff from enh (at) google.com ok miod@
2014-07-21Switch from <sys/endian.h> or <machine/endian.h> to the new,Philip Guenther
being-standardized <endian.h> ok deraadt@ millert@ beck@
2006-10-10Preliminary userland bits for OpenBSD/landisk, many things coming fromMiod Vallat
NetBSD.
2014-07-16zap trailing newlines; "go for it" deraadtOkan Demirmen
2014-06-09Nuke the machinery to sync libkern with libc, it's not been used in theMiod Vallat
last 15 years and there is no point to use it in the future. From Jean-Philippe Ouellet
2014-06-07Fix modf() on sparcTobias Ulmer
For large integral values, modf returned uninitialized data in iptr since 1992. Found while debugging python segfaults. ok miod
2014-06-04Apply "unifdef -D__STDC__" to libc/arch/*/SYS.hMatthew Dempsky
A while back, pascal@ converted our system call stubs from using "cpp | as" to "cc -x assembler-with-cpp", so there's no need to stay compatible with ancient preprocessor semantics. ok miod
2014-04-18It's been a quarter century: we can assume volatile is present with that name.Philip Guenther
2006-10-10Preliminary userland bits for OpenBSD/landisk, many things coming fromMiod Vallat
NetBSD.