about summary refs log tree commit diff
path: root/src/signal/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* apply hidden visibility to sigreturn code fragmentsRich Felker2018-09-121-0/+2
| | | | | | | these were overlooked in the declarations overhaul work because they are not properly declared, and the current framework even allows their declared types to vary by arch. at some point this should be cleaned up, but I'm not sure what the right way would be.
* remove possible-textrels from powerpc asmRich Felker2015-04-191-2/+3
| | | | | | | these are perfectly fine with ld-time symbol binding, but otherwise result in textrels. they cannot be replaced with @PLT jump targets because the PLT thunks require a GOT register to be setup, so use a hidden alias instead.
* redesign sigsetjmp so that signal mask is restored after longjmpRich Felker2015-04-171-29/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the conventional way to implement sigsetjmp is to save the signal mask then tail-call to setjmp; siglongjmp then restores the signal mask and calls longjmp. the problem with this approach is that a signal already pending, or arriving between unmasking of signals and restoration of the saved stack pointer, will have its signal handler run on the stack that was active before siglongjmp was called. this can lead to unbounded stack usage when siglongjmp is used to leave a signal handler. in the new design, sigsetjmp saves its own return address inside the extended part of the sigjmp_buf (outside the __jmp_buf part used by setjmp) then calls setjmp to save a jmp_buf inside its own execution. it then tail-calls to __sigsetjmp_tail, which uses the return value of setjmp to determine whether to save the current signal mask or restore a previously-saved mask. as an added bonus, this design makes it so that siglongjmp and longjmp are identical. this is useful because the __longjmp_chk function we need to add for ABI-compatibility assumes siglongjmp and longjmp are the same, but for different reasons -- it was designed assuming either can access a flag just past the __jmp_buf indicating whether the signal masked was saved, and act on that flag. however, early versions of musl did not have space past the __jmp_buf for the non-sigjmp_buf version of jmp_buf, so our setjmp cannot store such a flag without risking clobbering memory on (very) old binaries.
* add __sigsetjmp ABI-compat alias for sigsetjmpRich Felker2014-04-021-0/+3
|
* fix powerpc sigsetjmp asm to match the new jmp_buf size/offsetsRich Felker2012-11-231-2/+2
|
* powerpc: handle syscall error in clone.rofl0r2012-11-191-14/+15
| | | | sigsetjmp: store temporaries in jmp_buf rather than on stack.
* fix powerpc asm not to store data in volatile space below stack pointerRich Felker2012-11-181-8/+8
| | | | | | | | | | | it's essential to decrement the stack pointer before writing to new stack space, rather than afterwards. otherwise there is a race condition during which asynchronous code (signals) could clobber the data being stored. it may be possible to optimize the code further using stwu, but I wanted to avoid making any changes to the actual stack layout in this commit. further improvements can be made separately if desired.
* fix indention with spaces in powerpc asmRich Felker2012-11-142-10/+10
|
* PPC port cleaned up, static linking works well now.rofl0r2012-11-132-0/+45