summaryrefslogtreecommitdiff
path: root/lib/libc/arch
AgeCommit message (Collapse)Author
2016-09-01retire the sparc library codeTed Unangst
2016-08-11Between relro and previous RWX work, the __{got,plt}_{start,end} symbolsPhilip Guenther
are no longer needed by ld.so. Move them to the m88k-specific list, as it hasn't made the jump. ok deraadt@
2016-08-07Add XOR cookies for lr and sp. Stop saving/restoring r12 to/from the jmpbuf.Philip Guenther
Switch from calling obsolete sig{block,setmask} to directly using the sigprocmask syscall. ok deraadt@ kettenis@
2016-08-06Use internal names for __errno, _memcpy, memset, and {,_}{set,long}jmpPhilip Guenther
Eliminate pointless use of PIC_SYM() Split out DEFS.h from SYS.h like some other archs ok kettenis@ deraadt@
2016-07-26Wrap fpgetround() so internal calls to it (seen on arm, powerpc, and sh)Philip Guenther
go direct instead of through the PLT. ok millert@ kettenis@
2016-06-16PSEUDO_NOERROR() is used for syscalls that return now, so need to putPhilip Guenther
a nop in the slot skipped by the kernel on success
2016-05-30Consistently reference '_end' instead of 'end' in the brk/sbrk implementationPhilip Guenther
ok deraadt@
2016-05-30Do setjmp cookies for eip, esp, and ebp. For bonus points, mix howPhilip Guenther
the cookies are used in setjmp/_setjmp/sigsetjmp so that mixing calls (e.g., longjmp on a _setjmp buffer) will scramble all three registers and jump you to a random location on a random stack! ok deraadt@
2016-05-30Do setjmp cookies for gp, sp, and raPhilip Guenther
endian testing and ok deraadt@ ok visa@
2016-05-29Switch from calling obsolete sig{block,setmask} to directly using thePhilip Guenther
sigprocmask syscall ok kettenis@
2016-05-29Only require 4 byte alignment on ILP32 archsPhilip Guenther
2016-05-29Use .balign instead of .align; only need 8 byte alignment not 2^8Philip Guenther
2016-05-23More fixes from miodPhilip Guenther
2016-05-23Include SYS.h instead of DEFS.h now that this does a direct syscallPhilip Guenther
2016-05-23Add XOR cookies for rp and sp. Switch from calling obsoletePhilip Guenther
sig{block,setmask} to directly using the sigprocmask syscall. Remove longjmperror()-if-passed-real-sigcontext checks and the filling in of sigcontext fields that longjmp ignores. in snaps; ok deraadt@
2016-05-23Stop supporting longjmperror(); it's not used, not portable, and the checksPhilip Guenther
longjmp performs can't really be relied upon, even after we got rid of the false positives... ok millert@ deraadt@
2016-05-22Add XOR cookies for r1 (stack) and lr. Switch from calling obsoletePhilip Guenther
sig{block,setmask} to directly using the sigprocmask syscall. Rewrite sig{set,long}jmp based on {set,long}jmp to avoid the deprecated store/load-multiple instructions. in snaps; ok deraadt@
2016-05-22Oh right, actually delete this now that __cerror is unusedPhilip Guenther
2016-05-18Save and restore 'gbr' register when enter/leaving the kernel, and usePhilip Guenther
it for the TCB pointer. Eliminate __cerror. "looks good" kettenis@, testing and ok deraadt@
2016-05-16...and delete the GP setup. Should have been in previous commitPhilip Guenther
2016-05-16Eliminate cerror: use PAL_rdunique to get the TCB address directlyPhilip Guenther
ok deraadt@ kettenis@
2016-05-15Add END() to match ENTRY() macrosPhilip Guenther
ok kettenis@
2016-05-15TIB conversion is complete, so set errno in the syscall stub and eliminatePhilip Guenther
__cerror ok ketternis@
2016-05-12Using a 3-word buffer in the openbsd.randomdata segment, XOR swizzleTheo de Raadt
the PC/FP/SP registers in the jmpbuf. An old idea (around 1999?) but the random segment sure makes it easy. Lots of help from kettenis ok kettenis
2016-05-11remove hppa64 port, which we never got going beyond broken single users.Theo de Raadt
hppa reverse-stack gives us a valuable test case, but most developers don't have a 2nd one to proceed further with this. ok kettenis
2016-05-09Remove sigreturn declaration and the now-unused libc syscall stubPhilip Guenther
2006-10-10Preliminary userland bits for OpenBSD/landisk, many things coming fromMiod Vallat
NetBSD.
2016-05-09Stop using sigreturn for longjmp, just set the signal mask and returnPhilip Guenther
registers ala _longjmp. In setjmp, stop saving the onstack from sigaltstack as it's been unused by longjmp for years. In sig{set,long}jmp, use the internal, hidden names for setjmp/_setjmp/etc to avoid creating PLT entries. build testing deraadt@
2016-05-09Don't use sigreturn(2) in longjmp(3). Instead use a similar approach as inMark Kettenis
_longjmp(3) but also restore the signal mask. ok deraadt@
2016-05-08Implement longjmp directly and not on top of sigreturn.Philip Guenther
Use the hidden symbols for internal calls to abort, longjmp, etc ok deraadt@
2016-05-08No, sigaltstack's onstack flag shouldn't be saved. Delete commentPhilip Guenther
wondering about that
2016-05-08Hide __fpu_* and make internal _Qp_* calls go direct.Philip Guenther
ok kettenis@
2016-05-08Simplify sig{set,long}jmp(): just Do The Job instead of calling othersPhilip Guenther
ok kettenis@
2016-05-07Use a Thread Information Block in both single and multi-threaded programs.Philip Guenther
This stores errno, the cancelation flags, and related bits for each thread and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable! Make libpthread dlopen'able by moving the cancelation wrappers into libc and doing locking and fork/errno handling via callbacks that libpthread registers when it first initializes. 'errno' *must* be declared via <errno.h> now! Clean up libpthread's symbol exports like libc. On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec. Testing by various, particularly sthen@ and patrick@ ok kettenis@
2016-04-28Don't add setjmp.S twice.Mark Kettenis
2016-04-28Don't use sigreturn(2) in longjmp(3). Instead use a similar approach as inMark Kettenis
_longjmp(3) but also restore the signal mask. ok deraadt@
2016-04-28remove duplicate strrchr.c entry in SRCSJonathan Gray
ok deraadt@
2016-03-27Don't need to define SYS_sycall herePhilip Guenther
noted by miod@
2016-03-27Switch to RSYSCALL: no special handling is needed here any more andPhilip Guenther
we do need the hidden _libc_syscall alias. from miod@
2016-03-21The asm in the MD_DISABLE_KBIND macro was too fragile and broke alpha and hppa.Philip Guenther
So instead, do the kbind disabling with syscall(). debugging and ok deraadt@, ok kettenis@
2016-03-20Rearrange C runtime bits: now that ld.so exports environ and __progname,Philip Guenther
move their definitions and initialization in static links to libc.a Make crt0 always invoke a new func _csu_finish() in libc to process the auxv and to either register the ld.so cleanup function (in dynamic links) or initialize environ and __progname and do MC_DISABLE_KBIND (in static links). In libc, get pagesize from auxv; cache that between getpagesize() and sysconf(_SC_PAGESIZE) ok mpi@ "good time" deraadt@
2016-03-09We are done providing support for the vax.Theo de Raadt
lots of agreement.
2015-12-11"the the" -> "the" in commentmmcc
2015-11-15Tweak previous: rename it to fpround() to match FreeBSDPhilip Guenther
requested by kettenis@
2015-11-15I got a round tuit to rename round() to roundit() to avoid gcc warning.Philip Guenther
ok deraadt@
2015-11-14Split the non-syscall ASM bits from SYS.h into DEFS.h and use that in thePhilip Guenther
non-syscall .S source ok millert@ miod@
2015-10-31Invoke the _HIDDEN() sigprocmask label rather than the public one.Miod Vallat
2015-10-31This is sigprocmask, not sigpending.Miod Vallat
2015-10-27Wrap the remaining math functions in libc: __fpclassify*(), __flt_rounds(),Philip Guenther
and ldexp(). ok millert@
2015-10-23Merge the sigaction() and sigprocmask() overloads/wrappers from libpthreadPhilip Guenther
into libc, and move pthread_sigmask() as well (just a trivial wrapper). This provides consistent handling of SIGTHR between single- and multi-threaded programs and is a step in the merge of all the libpthread overloads, providing some ASM and Makefile bits that the other wrappers will need. ok deraadt@ millert@