summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/powerpc/sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add retguard to macppc kernel locore.S, ofwreal.S, setjmp.Sgkoehler2020-11-284-12/+12
| | | | | | | | | This 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 to pick registers other than r11 and r12 in some kernel functions. ok mortimer@ deraadt@
* Retguard asm macros for powerpc libc, ld.sogkoehler2020-10-266-16/+38
| | | | | | | | | | Add retguard to some, but not all, asm functions in libc. Edit SYS.h in libc to remove the PREFIX macros and add SYSENTRY (more like aarch64 and powerpc64), so we can insert RETGUARD_SETUP after SYSENTRY. Some .S files in this commit don't get retguard, but do stop using the old prefix macros. Tested by deraadt@, who put this diff in a macppc snap.
* SYS___threxit cannot fail, but this integration looks like a gadget.deraadt2020-10-181-1/+3
| | | | | Put a hard-trap instruction after the syscall instruction. ok kettenis mortimer
* Consistently reference '_end' instead of 'end' in the brk/sbrk implementationguenther2016-05-302-7/+7
| | | | ok deraadt@
* Oh right, actually delete this now that __cerror is unusedguenther2016-05-221-61/+0
|
* TIB conversion is complete, so set errno in the syscall stub and eliminateguenther2016-05-154-16/+17
| | | | | | __cerror ok ketternis@
* Remove sigreturn declaration and the now-unused libc syscall stubguenther2016-05-091-29/+0
|
* Use a Thread Information Block in both single and multi-threaded programs.guenther2016-05-078-53/+19
| | | | | | | | | | | | | | | | | 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@
* Merge the sigaction() and sigprocmask() overloads/wrappers from libpthreadguenther2015-10-231-3/+3
| | | | | | | | | 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@
* Backtrack a little bit and don't try to use the per-thread errno location ifkettenis2015-09-091-23/+21
| | | | | | | | | | r2 is zero. Some upcoming changes will probably change the offset at which the errno pointer is stored, or might even store errno directly. Instead, call __errno to get the location of errno. Make sure we go through the PLT such that we call the version in libpthread if it is linked in. Set up r30 for this purpose. The ___cerrno function itself remains protected. ok guenther@
* Fix previous: restore a PSEUDO_SUFFIX macro to actually handle errno and returnguenther2015-09-051-1/+2
| | | | | cone of shame guenther@ ok deraadt@
* Adds hidden _libc_FOO aliases for the system call stubs.guenther2015-09-057-12/+20
| | | | | | | | Stop generating _brk and _sbrk symbols: they've already been hidden. Set the ELF symbol size on the syscall stubs. Give the __{min,cur}brk symbols a size and type, and hide more jump labels. ok deraadt@
* fix commentguenther2015-08-271-2/+2
|
* Hide many (194!) symbols that nothing should be using.guenther2015-08-263-46/+17
| | | | | | | Delete exect(2); it wasn't portable across archs and nothing used it. ports test build by naddy@ ok deraadt@ kettenis@
* Make __cerror() use the per-thread errno location if r2 isn't zero. This waykettenis2015-08-233-14/+22
| | | | | | | | | | | | 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@
* Fetch the _GLOBAL_OFFSET_TABLE_ pointer in a way that's compatible with thekettenis2015-08-232-8/+12
| | | | Secure-PLT ABI.
* Make pthread_atfork() track the DSO that called it like atexit() does,guenther2015-04-071-2/+3
| | | | | | | | | | 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@
* Simplify fork/vfork logic: the kernel has handled returning zero in the childguenther2015-03-311-2/+1
| | | | | | | 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@
* these are no longer used; ok guentherderaadt2012-09-041-43/+0
|
* Fix missing PIC -> __PIC__ conversions; ok pascalderaadt2012-08-224-10/+10
|
* make this actually workkettenis2012-07-011-23/+21
| | | | ok miod@
* __tfork() needs to set the stack address of the new thread in the kernel,guenther2012-06-211-6/+2
| | | | | | | | | so that it can't get a signal while still running on the parent thread's stack. Also, pass in sizeof(struct __tfork) to provide forward compat when more members are added. This is an ABI change, so switch syscall numbers and bump lib majors this time. ok deraadt@ matthew@
* remove rfork(); ok guenther miodderaadt2012-04-121-32/+0
|
* Move __tfork_thread() from rthreads (libpthread) to libc so thatguenther2012-03-221-0/+53
| | | | | | it can be used for not-strictly-threading purposes ok matthew@ kurt@
* Move __cerror to ___cerror with a weak alias so that rthreads can override it.guenther2011-04-041-2/+4
| | | | | | On mips64, also correct the name called from plain cerror to __cerror. "looks correct" miod@
* zap rcsid.espie2005-08-073-18/+3
| | | | okay deraadt@ (tested them all)
* These files are not necessary anymore.miod2003-09-011-29/+0
|
* Use a logical comparison (unsigned) for pointers. ok drahn@tdeval2003-07-101-2/+2
|
* kick, kick. Fix these files which did not come from NetBSD, but thedrahn2002-10-0714-6/+375
| | | | powerpc port by Dale Rahn.
* clean up ifdefs for PIC, resulting code unchanged.drahn2002-10-071-6/+3
|
* s/curbrk/__curbrk/ as suggested by art, a few _ASM_LABEL added as appropriate.drahn2002-10-072-14/+14
|
* Simpler, smaller, more efficient and equivalent.drahn2002-10-071-13/+2
|
* cerror -> __cerror as suggested by art, with a couple of missing _ASM_LABEL()drahn2002-10-075-6/+6
| | | | added as appropriate.
* rfork() needs a fork.S-like stub as well; ok artderaadt2002-02-171-0/+5
|
* sigprocmask should return 0 on success, fixes powerpc ntpdate problem.drahn2002-01-101-0/+1
|
* Properly implement errno handling for the threaded libc (libc_r)drahn2000-11-261-17/+3
| | | | | | | | | The powerpc specific code was previously handling system call errors as if kernel threads existed (currently only userlang threads are modeled). Thus if multiple threads existed in a process, the process would not get the correct errno from a system call. This would cause _many_ tests to fail. Fixing this causes a number of the tests in libc_r/TEST to now work, that did not before, however a few still fail.
* replacement pipe() system call; copies data into place inside kernel, soderaadt1999-06-071-16/+0
| | | | that EFAULT return value is possible
* Fix the _THREAD_SAFE path through the cerror code for powerpc.rahnds1999-04-211-10/+6
| | | | libc_r was never completed for the powerpc arch.
* Fixes to the currently unused PIC support in the powerpc asm files.rahnds1999-03-122-2/+2
| | | | contact rahnds@openbsd.org before attempting to use this funcationality.
* mi ptraced1999-02-011-13/+0
|
* Preliminary version for PIC support. Builds and runs standard and profiledrahnds1999-01-288-63/+120
| | | | | just fine. pic version has been compiled, but without a ld.so has not been tested. Needs binutils 2.9.1 or later to build pic version.
* Add correct handling of more systemcalls. either not implemented beforerahnds1998-08-076-6/+47
| | | | or poorly implemented.
* Change some of the local symbols into "temporary", removed symbols.rahnds1998-07-051-6/+4
| | | | | makes it easier to debug code to see the function entry not the local branch targets.
* Amazing how much confusion and how much tracing a simple 4 instead of a 3pefo1997-09-271-1/+5
| | | | | can cause!! Returned sigmask value was taken from wrong register... So no more zombies!!!
* tabifykstailey1997-07-231-2/+2
|
* Check-in of powerpc library support.rahnds1996-12-2115-0/+178
NOTE: This will not work until the other pieces are checked in. This is primarily the NetBSD powerpc port, with modifications to support ELF.