diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-19 20:56:48 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-19 20:56:48 +0000 |
commit | 770304b5396c370623ba149135a86ee62fefdc3d (patch) | |
tree | 73992938b87e8f7e6df2f4b6f5c37d8af3103952 /libexec | |
parent | 579353319059792ab9013a12c79e222bfd25e159 (diff) |
kbind has eliminated the need for and use of the bind lock. Delete it, the
the callback, and the sigprocmask stub.
Keep around the DL_SETBINDLCK case until libpthread stops using it.
discussed with miod@ at l2k15
ok kettenis@
Diffstat (limited to 'libexec')
25 files changed, 26 insertions, 284 deletions
diff --git a/libexec/ld.so/alpha/ldasm.S b/libexec/ld.so/alpha/ldasm.S index 7a5da956502..4f81a2e5b84 100644 --- a/libexec/ld.so/alpha/ldasm.S +++ b/libexec/ld.so/alpha/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.30 2015/09/13 17:08:03 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.31 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2001 Niklas Hallqvist @@ -307,26 +307,6 @@ LEAF_NOPROFILE(_dl_mmap, 6) RET END(_dl_mmap) -LEAF_NOPROFILE(_dl_sigprocmask, 4) - /* _dl_sigprocmask does not support NULL new mask */ - mov a2, a5 -#if 0 - cmoveq a1, 1, a0 /* if set is NULL, set how to SIG_BLOCK */ - beq a1, 1f -#endif - ldl a1, 0(a1) /* load the set from *set */ -1: - CALLSYS_NOERROR(sigprocmask) - beq a3, 1f - jmp zero, _dl_cerror -1: - beq a5, 1f - stl v0, 0(a5) -1: - mov zero, v0 - RET -END(_dl_sigprocmask) - DL_SYSCALL(close) DL_SYSCALL_NOERR(exit) DL_SYSCALL(fstat) diff --git a/libexec/ld.so/alpha/syscall.h b/libexec/ld.so/alpha/syscall.h index a4624a47130..67b9314d0d5 100644 --- a/libexec/ld.so/alpha/syscall.h +++ b/libexec/ld.so/alpha/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.28 2014/09/01 05:09:52 doug Exp $ */ +/* $OpenBSD: syscall.h,v 1.29 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2001 Niklas Hallqvist @@ -30,7 +30,6 @@ #include <sys/stat.h> #include <sys/syscall.h> -#include <sys/signal.h> #ifndef _dl_MAX_ERRNO #define _dl_MAX_ERRNO 512L @@ -50,7 +49,6 @@ ssize_t _dl_read(int, const char *, size_t); int _dl_fstat(int, struct stat *); ssize_t _dl_getdents(int, char *, size_t); long _dl__syscall(quad_t, ...); -int _dl_sigprocmask(int, const sigset_t *, sigset_t *); int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t); int _dl_gettimeofday(struct timeval *, struct timezone *); ssize_t _dl_readlink(const char *, char *, size_t); diff --git a/libexec/ld.so/amd64/ldasm.S b/libexec/ld.so/amd64/ldasm.S index 11dc75af512..f67988c4cb0 100644 --- a/libexec/ld.so/amd64/ldasm.S +++ b/libexec/ld.so/amd64/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.19 2015/09/13 17:08:03 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.20 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2002,2004 Dale Rahn @@ -108,23 +108,6 @@ DL_SYSCALL(sysctl) ret - /* _dl_sigprocmask: does not handle NULL new set */ - - .align 4 - .global _dl_sigprocmask - .type _dl_sigprocmask,@function -_dl_sigprocmask: - movl (%rsi),%esi # fetch indirect... - movl $SYS_sigprocmask, %eax - movq %rcx, %r10 - syscall - jc 1b /* error: result = -errno */ - testq %rdx,%rdx # test if old mask requested - jz 2f - movl %eax,(%rdx) # store old mask - xorq %rax,%rax -2: ret - .align 4 .global _dl_bind_start .type _dl_bind_start,@function diff --git a/libexec/ld.so/amd64/syscall.h b/libexec/ld.so/amd64/syscall.h index 153013c6631..cb3a657d4ff 100644 --- a/libexec/ld.so/amd64/syscall.h +++ b/libexec/ld.so/amd64/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.16 2014/09/01 05:09:52 doug Exp $ */ +/* $OpenBSD: syscall.h,v 1.17 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2001 Niklas Hallqvist @@ -31,7 +31,6 @@ #include <sys/syscall.h> #include <sys/stat.h> -#include <sys/signal.h> #ifndef _dl_MAX_ERRNO #define _dl_MAX_ERRNO 512L @@ -50,7 +49,6 @@ int _dl_open(const char *, int); ssize_t _dl_read(int, const char *, size_t); int _dl_fstat(int, struct stat *); ssize_t _dl_getdents(int, char *, size_t); -int _dl_sigprocmask(int, const sigset_t *, sigset_t *); int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t); int _dl_gettimeofday(struct timeval *, struct timezone *); ssize_t _dl_readlink(const char *, char *, size_t); diff --git a/libexec/ld.so/arm/ldasm.S b/libexec/ld.so/arm/ldasm.S index 56dd07b811e..6d6847e37de 100644 --- a/libexec/ld.so/arm/ldasm.S +++ b/libexec/ld.so/arm/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.17 2015/09/13 17:08:03 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.18 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2004 Dale Rahn @@ -131,20 +131,6 @@ DL_SYSCALL(sysctl) DL_SYSCALL(getdents) - .global _dl_sigprocmask - .type _dl_sigprocmask%function -_dl_sigprocmask: - teq r1, #0 - moveq r0, #1 - moveq r1, #0 - ldrne r1, [r1] - SYSTRAP(sigprocmask) - bcs .L_cerr - teq r2, #0 - strne r0, [r2] - mov r0, #0 - mov pc, lr - .L_cerr: rsb r0, r0, #0 /* r0 = -errno */ mov pc, lr diff --git a/libexec/ld.so/arm/syscall.h b/libexec/ld.so/arm/syscall.h index 5784fc7d661..d3d83a5502d 100644 --- a/libexec/ld.so/arm/syscall.h +++ b/libexec/ld.so/arm/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.16 2014/09/01 05:09:53 doug Exp $ */ +/* $OpenBSD: syscall.h,v 1.17 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2001 Niklas Hallqvist @@ -31,7 +31,6 @@ #include <sys/syscall.h> #include <sys/stat.h> -#include <sys/signal.h> #ifndef _dl_MAX_ERRNO #define _dl_MAX_ERRNO 512L @@ -50,7 +49,6 @@ int _dl_open(const char *, int); ssize_t _dl_read(int, const char *, size_t); int _dl_fstat(int, struct stat *); ssize_t _dl_getdents(int, char *, size_t); -int _dl_sigprocmask(int, const sigset_t *, sigset_t *); int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t); int _dl_gettimeofday(struct timeval *, struct timezone *); ssize_t _dl_readlink(const char *, char *, size_t); diff --git a/libexec/ld.so/dlfcn.c b/libexec/ld.so/dlfcn.c index 4b75563d0a6..17b4fec4c25 100644 --- a/libexec/ld.so/dlfcn.c +++ b/libexec/ld.so/dlfcn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dlfcn.c,v 1.90 2015/01/22 05:48:17 deraadt Exp $ */ +/* $OpenBSD: dlfcn.c,v 1.91 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -44,7 +44,6 @@ int _dl_tracelib; int _dl_real_close(void *handle); void (*_dl_thread_fnc)(int) = NULL; -void (*_dl_bind_lock_f)(int) = NULL; static elf_object_t *obj_from_addr(const void *addr); void * @@ -216,8 +215,7 @@ dlctl(void *handle, int command, void *data) retval = 0; break; case DL_SETBINDLCK: - DL_DEB(("dlctl: _dl_bind_lock_f set to %p\n", data)); - _dl_bind_lock_f = data; + /* made superfluous by kbind */ retval = 0; break; case 0x20: @@ -517,21 +515,6 @@ _dl_show_objects(void) } void -_dl_thread_bind_lock(int what, sigset_t *omask) -{ - if (! what) { - sigset_t nmask; - - sigfillset(&nmask); - _dl_sigprocmask(SIG_BLOCK, &nmask, omask); - } - if (_dl_bind_lock_f != NULL) - (*_dl_bind_lock_f)(what); - if (what) - _dl_sigprocmask(SIG_SETMASK, omask, NULL); -} - -void _dl_thread_kern_stop(void) { if (_dl_thread_fnc != NULL) diff --git a/libexec/ld.so/hppa/ldasm.S b/libexec/ld.so/hppa/ldasm.S index 062eec956a8..f1d9bf2a453 100644 --- a/libexec/ld.so/hppa/ldasm.S +++ b/libexec/ld.so/hppa/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.16 2015/09/13 17:08:03 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.17 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2004 Michael Shalayeff @@ -278,26 +278,4 @@ ENTRY(_dl_sendsyslog,0) nop EXIT(_dl_sendsyslog) -ENTRY(_dl_sigprocmask,0) - stw arg2, HPPA_FRAME_ARG(2)(sp) - - comb,<>,n r0, arg1, _dl_sigprocmask$nblock - - b _dl_sigprocmask$call - ldi 1, arg0 - -_dl_sigprocmask$nblock - ldw 0(arg1), arg1 - stw arg1, HPPA_FRAME_ARG(1)(sp) - -_dl_sigprocmask$call - SYSCALL(sigprocmask) - - ldw HPPA_FRAME_ARG(2)(sp), arg2 - add,= r0, arg2, r0 - stw ret0, 0(arg2) - bv r0(rp) - copy r0, ret0 -EXIT(_dl_sigprocmask) - .end diff --git a/libexec/ld.so/hppa/syscall.h b/libexec/ld.so/hppa/syscall.h index 60e9934a91b..cb3a657d4ff 100644 --- a/libexec/ld.so/hppa/syscall.h +++ b/libexec/ld.so/hppa/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.16 2014/09/01 05:09:53 doug Exp $ */ +/* $OpenBSD: syscall.h,v 1.17 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2001 Niklas Hallqvist @@ -31,7 +31,6 @@ #include <sys/syscall.h> #include <sys/stat.h> -#include <sys/signal.h> #ifndef _dl_MAX_ERRNO #define _dl_MAX_ERRNO 512L @@ -50,7 +49,6 @@ int _dl_open(const char *, int); ssize_t _dl_read(int, const char *, size_t); int _dl_fstat(int, struct stat *); ssize_t _dl_getdents(int, char *, size_t); -int _dl_sigprocmask(int, const sigset_t *, sigset_t *); int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t); int _dl_gettimeofday(struct timeval *, struct timezone *); ssize_t _dl_readlink(const char *, char *, size_t); diff --git a/libexec/ld.so/i386/ldasm.S b/libexec/ld.so/i386/ldasm.S index acba98b397b..411ed0b0d6a 100644 --- a/libexec/ld.so/i386/ldasm.S +++ b/libexec/ld.so/i386/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.21 2015/09/13 17:08:03 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.22 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2002 Dale Rahn @@ -132,31 +132,6 @@ DL_SYSCALL(getdents) ret - /* _dl_sigprocmask: does not handle NULL new set */ - - .section ".text" - .align 4 - .global _dl_sigprocmask - .type _dl_sigprocmask,@function -_dl_sigprocmask: - movl 8(%esp), %ecx - movl (%ecx),%ecx - movl %ecx,8(%esp) # to new mask arg - mov $SYS_sigprocmask, %eax - int $0x80 - jb 1f /* error: result = -errno */ - movl 12(%esp),%ecx # fetch old mask requested - testl %ecx,%ecx # test if old mask requested - jz 2f - movl %eax,(%ecx) # store old mask - xorl %eax,%eax -2: ret - -1: /* error: result = -errno; - handled here. */ - neg %eax - ret - - .align 4 .global _dl_bind_start .type _dl_bind_start,@function diff --git a/libexec/ld.so/i386/syscall.h b/libexec/ld.so/i386/syscall.h index 4ceceded286..47c83d480e2 100644 --- a/libexec/ld.so/i386/syscall.h +++ b/libexec/ld.so/i386/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.20 2014/09/01 05:09:53 doug Exp $ */ +/* $OpenBSD: syscall.h,v 1.21 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2001 Niklas Hallqvist @@ -31,7 +31,6 @@ #include <sys/syscall.h> #include <sys/stat.h> -#include <sys/signal.h> #ifndef _dl_MAX_ERRNO #define _dl_MAX_ERRNO 512L @@ -50,7 +49,6 @@ int _dl_open(const char *, int); ssize_t _dl_read(int, const char *, size_t); int _dl_fstat(int, struct stat *); ssize_t _dl_getdents(int, char *, size_t); -int _dl_sigprocmask(int, const sigset_t *, sigset_t *); int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t); int _dl_gettimeofday(struct timeval *, struct timezone *); ssize_t _dl_readlink(const char *, char *, size_t); diff --git a/libexec/ld.so/m88k/ldasm.S b/libexec/ld.so/m88k/ldasm.S index 368aa7cb1fc..3aa0f2a21f9 100644 --- a/libexec/ld.so/m88k/ldasm.S +++ b/libexec/ld.so/m88k/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.14 2015/09/13 17:08:04 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.15 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2013 Miodrag Vallat. @@ -221,23 +221,6 @@ DL_SYSCALL(sysctl) DL_SYSCALL(getdents) jmp %r1 -ENTRY(_dl_sigprocmask) - bcnd ne0, %r3, 1f - or %r2, %r0, 1 /* SIG_BLOCK */ - br 2f -1: - ld %r3, %r3, 0 -2: - or %r13, %r0, SYS_sigprocmask - tb0 0, %r0, 450 - br _dl_cerror - bcnd eq0, %r4, 3f - st %r2, %r4, 0 -3: - jmp.n %r1 - or %r2, %r0, 0 -END(_dl_sigprocmask) - _dl_cerror: jmp.n %r1 subu %r2, %r0, %r2 diff --git a/libexec/ld.so/m88k/syscall.h b/libexec/ld.so/m88k/syscall.h index 3acc85938b4..f9db51602f1 100644 --- a/libexec/ld.so/m88k/syscall.h +++ b/libexec/ld.so/m88k/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.12 2014/09/01 05:09:53 doug Exp $ */ +/* $OpenBSD: syscall.h,v 1.13 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2001 Niklas Hallqvist @@ -31,7 +31,6 @@ #include <sys/syscall.h> #include <sys/stat.h> -#include <sys/signal.h> #ifndef _dl_MAX_ERRNO #define _dl_MAX_ERRNO 512L @@ -50,7 +49,6 @@ int _dl_open(const char *, int); ssize_t _dl_read(int, const char *, size_t); int _dl_fstat(int, struct stat *); ssize_t _dl_getdents(int, char *, size_t); -int _dl_sigprocmask(int, const sigset_t *, sigset_t *); int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t); int _dl_gettimeofday(struct timeval *, struct timezone *); ssize_t _dl_readlink(const char *, char *, size_t); diff --git a/libexec/ld.so/mips64/ldasm.S b/libexec/ld.so/mips64/ldasm.S index 519c1eaf530..5c8438e4848 100644 --- a/libexec/ld.so/mips64/ldasm.S +++ b/libexec/ld.so/mips64/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.14 2015/09/13 17:08:04 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.15 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 1998-2002 Opsycon AB, Sweden. @@ -145,25 +145,6 @@ _dl_cerror: subu v0, zero, v0 j ra -NLEAF(_dl_sigprocmask,0) - /* _dl_sigprocmask does not support NULL as the new mask */ -#if 0 - bnez a1, 1f - li a0, 1 /* SIG_BLOCK */ - b 2f -1: -#endif - lw a1, 0(a1) -2: - __DO_SYSCALL(sigprocmask) - bnez a3, _dl_cerror - beqz a2, 1f - sw v0, 0(a2) -1: - li v0, 0 - j ra -END(_dl_sigprocmask) - DL_SYSCALL(close) DL_SYSCALL_NOERR(exit) DL_SYSCALL(fstat) diff --git a/libexec/ld.so/mips64/syscall.h b/libexec/ld.so/mips64/syscall.h index 65c97232abc..873018586d8 100644 --- a/libexec/ld.so/mips64/syscall.h +++ b/libexec/ld.so/mips64/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.18 2014/09/01 05:09:53 doug Exp $ */ +/* $OpenBSD: syscall.h,v 1.19 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 1998-2002 Opsycon AB, Sweden. @@ -30,7 +30,6 @@ #include <sys/stat.h> #include <sys/syscall.h> -#include <sys/signal.h> #ifndef _dl_MAX_ERRNO #define _dl_MAX_ERRNO 512L @@ -52,7 +51,6 @@ int _dl_munmap(const void *, size_t); int _dl_open(const char *, int); ssize_t _dl_read(int, const char *, size_t); ssize_t _dl_readlink(const char *, char *, size_t); -int _dl_sigprocmask(int, const sigset_t *, sigset_t *); long _dl__syscall(quad_t, ...); int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t); int _dl_utrace(const char *, const void *, size_t); diff --git a/libexec/ld.so/powerpc/ldasm.S b/libexec/ld.so/powerpc/ldasm.S index 2c33103062a..ee9ff234946 100644 --- a/libexec/ld.so/powerpc/ldasm.S +++ b/libexec/ld.so/powerpc/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.24 2015/09/19 20:09:08 kettenis Exp $ */ +/* $OpenBSD: ldasm.S,v 1.25 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -141,28 +141,6 @@ _dl_cerror: neg 3, 3 blr -ENTRY(_dl_sigprocmask) - /* _dl_sigprocmask does not support NULL as the new mask */ -#if 0 - cmpwi 4, 0 - bne+ 1f - li 3, 1 /* SIG_BLOCK */ - b 2f -1: -#endif - lwz 4, 0(4) -2: - li 0, SYS_sigprocmask - sc - cmpwi 0, 0 - bne- _dl_cerror - cmpwi 5, 0 - beq- 1f - stw 3, 0(5) -1: - li 3, 0 - blr - DL_SYSCALL(close) DL_SYSCALL_NOERR(exit) DL_SYSCALL(fstat) diff --git a/libexec/ld.so/powerpc/syscall.h b/libexec/ld.so/powerpc/syscall.h index 17e9054a907..6c7f5adce6f 100644 --- a/libexec/ld.so/powerpc/syscall.h +++ b/libexec/ld.so/powerpc/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.36 2014/09/01 05:09:53 doug Exp $ */ +/* $OpenBSD: syscall.h,v 1.37 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -29,10 +29,7 @@ #define __DL_SYSCALL_H__ #include <sys/stat.h> - #include <sys/syscall.h> -#include <sys/signal.h> -#include <sys/time.h> #ifndef _dl_MAX_ERRNO #define _dl_MAX_ERRNO 512L @@ -55,7 +52,6 @@ int _dl_munmap(const void *, size_t); int _dl_open(const char *, int); ssize_t _dl_read(int, const char *, size_t); ssize_t _dl_readlink(const char *, char *, size_t); -int _dl_sigprocmask(int, const sigset_t *, sigset_t *); long _dl__syscall(quad_t, ...); int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t); int _dl_utrace(const char *, const void *, size_t); diff --git a/libexec/ld.so/resolve.h b/libexec/ld.so/resolve.h index 344b142cbd3..8eb51813fd0 100644 --- a/libexec/ld.so/resolve.h +++ b/libexec/ld.so/resolve.h @@ -1,4 +1,4 @@ -/* $OpenBSD: resolve.h,v 1.72 2015/08/17 20:04:56 guenther Exp $ */ +/* $OpenBSD: resolve.h,v 1.73 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -32,7 +32,6 @@ #include <sys/queue.h> #include <link.h> #include <dlfcn.h> -#include <signal.h> struct load_list { struct load_list *next; @@ -238,8 +237,6 @@ void _dl_debug_state(void); void _dl_thread_kern_go(void); void _dl_thread_kern_stop(void); -void _dl_thread_bind_lock(int, sigset_t *); - char *_dl_getenv(const char *, char **); void _dl_unsetenv(const char *, char **); diff --git a/libexec/ld.so/sh/ldasm.S b/libexec/ld.so/sh/ldasm.S index f76489628aa..9fb9cc11a66 100644 --- a/libexec/ld.so/sh/ldasm.S +++ b/libexec/ld.so/sh/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.19 2015/09/13 17:08:04 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.20 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2006 Dale Rahn @@ -196,29 +196,3 @@ DL_SYSCALL(sysctl) DL_SYSCALL(getdents) - .global _dl_sigprocmask - .type _dl_sigprocmask%function -_dl_sigprocmask: - mov r5, r2 /* fetch new sigset pointer */ - tst r2, r2 /* check new sigset pointer */ - bf 1f /* if not null, indirect */ - mov #1, r4 /* SIG_BLOCK */ - bra 2f - nop -1: mov.l @r2, r2 /* fetch indirect ... */ - mov r2, r5 /* to new mask arg */ -2: mov.l LSYS_sigprocmask, r0 - trapa #0x80 - bf .L_cerr - mov r6, r2 /* fetch old mask requested */ - tst r2, r2 /* test if old mask requested */ - bt out - mov.l r0, @r2 /* store old mask */ -out: - xor r0, r0 - rts - nop - - .align 2 -LSYS_sigprocmask: - .long SYS_sigprocmask diff --git a/libexec/ld.so/sh/syscall.h b/libexec/ld.so/sh/syscall.h index dd3a7f3b558..b94ae84dce0 100644 --- a/libexec/ld.so/sh/syscall.h +++ b/libexec/ld.so/sh/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.14 2014/09/01 05:09:53 doug Exp $ */ +/* $OpenBSD: syscall.h,v 1.15 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2001 Niklas Hallqvist @@ -31,7 +31,6 @@ #include <sys/syscall.h> #include <sys/stat.h> -#include <sys/signal.h> #ifndef _dl_MAX_ERRNO #define _dl_MAX_ERRNO 512L @@ -50,7 +49,6 @@ int _dl_open(const char *, int); ssize_t _dl_read(int, const char *, size_t); int _dl_fstat(int, struct stat *); ssize_t _dl_getdents(int, char *, size_t); -int _dl_sigprocmask(int, const sigset_t *, sigset_t *); int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t); int _dl_gettimeofday(struct timeval *, struct timezone *); ssize_t _dl_readlink(const char *, char *, size_t); diff --git a/libexec/ld.so/sparc/ldasm.S b/libexec/ld.so/sparc/ldasm.S index 808930b8c74..e2e6a1d65fe 100644 --- a/libexec/ld.so/sparc/ldasm.S +++ b/libexec/ld.so/sparc/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.26 2015/09/13 17:08:04 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.27 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -282,24 +282,6 @@ _dl_sysctl: sub %g0, %o0, %o0 ! error: result = -errno - /* _dl_sigprocmask does not support NULL new mask */ - .section ".text" - .align 4 - .globl _dl_sigprocmask - .type _dl_sigprocmask,@function -_dl_sigprocmask: - ld [%o1], %o1 - mov SYS_sigprocmask, %g1 ! call sys___sigprocmask - t ST_SYSCALL ! off to wonderland - - cmp %o2, 0 - bne,a 1f - st %o0, [%o2] -1: - retl - clr %o0 - - .section ".text" .align 4 .global _dl_gettimeofday diff --git a/libexec/ld.so/sparc/syscall.h b/libexec/ld.so/sparc/syscall.h index 6b59b396c4c..8bfff483670 100644 --- a/libexec/ld.so/sparc/syscall.h +++ b/libexec/ld.so/sparc/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.21 2014/09/01 05:09:53 doug Exp $ */ +/* $OpenBSD: syscall.h,v 1.22 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2001 Niklas Hallqvist @@ -31,7 +31,6 @@ #include <sys/syscall.h> #include <sys/stat.h> -#include <sys/signal.h> #ifndef _dl_MAX_ERRNO #define _dl_MAX_ERRNO 512L @@ -50,7 +49,6 @@ int _dl_open(const char *, int); ssize_t _dl_read(int, const char *, size_t); int _dl_fstat(int, struct stat *); ssize_t _dl_getdents(int, char *, size_t); -int _dl_sigprocmask(int, const sigset_t *, sigset_t *); int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t); int _dl_gettimeofday(struct timeval *, struct timezone *); ssize_t _dl_readlink(const char *, char *, size_t); diff --git a/libexec/ld.so/sparc64/ldasm.S b/libexec/ld.so/sparc64/ldasm.S index de3790e543b..b5a90f7d202 100644 --- a/libexec/ld.so/sparc64/ldasm.S +++ b/libexec/ld.so/sparc64/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.38 2015/09/13 17:08:04 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.39 2015/09/19 20:56:47 guenther Exp $ */ /* $NetBSD: rtld_start.S,v 1.5 2001/08/14 22:17:48 eeh Exp $ */ /* @@ -286,19 +286,6 @@ _ENTRY(_dl_getdents) retl sub %g0, %o0, %o0 ! error: result = -errno - /* _dl_sigprocmask does not support NULL new mask */ -_ENTRY(_dl_sigprocmask) - ld [%o1], %o1 ! indirect for new mask - mov SYS_sigprocmask, %g1 ! call sys_sigprocmask - t ST_SYSCALL ! off to wonderland - ! what about errors? - cmp %o2, 0 - bne,a 1f ! if oset != NULL - st %o0, [%o2] ! *oset = oldmask -1: - retl - clr %o0 - _ENTRY(_dl_sysctl) mov SYS_sysctl | SYSCALL_G2RFLAG, %g1 ! call sys_sysctl add %o7, 8, %g2 ! just return on success diff --git a/libexec/ld.so/sparc64/rtld_machine.c b/libexec/ld.so/sparc64/rtld_machine.c index 7aa8d8b2bd0..28ab9edbc1b 100644 --- a/libexec/ld.so/sparc64/rtld_machine.c +++ b/libexec/ld.so/sparc64/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.54 2015/08/23 20:45:14 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.55 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -73,7 +73,6 @@ #include <nlist.h> #include <link.h> -#include <signal.h> #include "syscall.h" #include "archdep.h" diff --git a/libexec/ld.so/sparc64/syscall.h b/libexec/ld.so/sparc64/syscall.h index 6a441075001..e81ffe4b613 100644 --- a/libexec/ld.so/sparc64/syscall.h +++ b/libexec/ld.so/sparc64/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.28 2014/09/01 05:09:53 doug Exp $ */ +/* $OpenBSD: syscall.h,v 1.29 2015/09/19 20:56:47 guenther Exp $ */ /* * Copyright (c) 2001 Niklas Hallqvist @@ -31,7 +31,6 @@ #include <sys/syscall.h> #include <sys/stat.h> -#include <sys/signal.h> #ifndef _dl_MAX_ERRNO #define _dl_MAX_ERRNO 512L @@ -50,7 +49,6 @@ int _dl_open(const char *, int); ssize_t _dl_read(int, const char *, size_t); int _dl_fstat(int, struct stat *); ssize_t _dl_getdents(int, char *, size_t); -int _dl_sigprocmask(int, const sigset_t *, sigset_t *); int _dl_sysctl(const int *, u_int, void *, size_t *, void *, size_t); int _dl_gettimeofday(struct timeval *, struct timezone *); ssize_t _dl_readlink(const char *, char *, size_t); |