diff options
author | 2015-09-10 13:29:09 +0000 | |
---|---|---|
committer | 2015-09-10 13:29:09 +0000 | |
commit | 3f373d4115327011c7af514e278a1fc5ced933e6 (patch) | |
tree | 947cf988ffff0c8d6ad01c4c60f1930a94839125 /lib/libc/arch/vax/sys | |
parent | Replace TLS_{READ,WRITE}_AGAIN with TLS_WANT_POLL{IN,OUT} and correctly (diff) | |
download | wireguard-openbsd-3f373d4115327011c7af514e278a1fc5ced933e6.tar.xz wireguard-openbsd-3f373d4115327011c7af514e278a1fc5ced933e6.zip |
Adds hidden _libc_FOO aliases for the system call stubs.
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.
alpha, arm, m88k, sh, sparc, and vax assistance miod@
hppa assistance kettenis@
ok deraadt@ miod@
Diffstat (limited to 'lib/libc/arch/vax/sys')
-rw-r--r-- | lib/libc/arch/vax/sys/Ovfork.S | 11 | ||||
-rw-r--r-- | lib/libc/arch/vax/sys/brk.S | 18 | ||||
-rw-r--r-- | lib/libc/arch/vax/sys/cerror.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/vax/sys/sbrk.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/vax/sys/sigpending.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/vax/sys/sigprocmask.S | 13 | ||||
-rw-r--r-- | lib/libc/arch/vax/sys/sigreturn.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/vax/sys/sigsuspend.S | 9 | ||||
-rw-r--r-- | lib/libc/arch/vax/sys/syscall.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/vax/sys/tfork_thread.S | 3 |
10 files changed, 48 insertions, 32 deletions
diff --git a/lib/libc/arch/vax/sys/Ovfork.S b/lib/libc/arch/vax/sys/Ovfork.S index 0a619255047..8e16bfe73b2 100644 --- a/lib/libc/arch/vax/sys/Ovfork.S +++ b/lib/libc/arch/vax/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $OpenBSD: Ovfork.S,v 1.9 2015/03/31 04:32:02 guenther Exp $ */ +/* $OpenBSD: Ovfork.S,v 1.10 2015/09/10 13:29:09 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -43,14 +43,15 @@ SYSENTRY(vfork) movl 16(%fp),%r2 # save return address before we smash it - movab here,16(%fp) + movab 1f,16(%fp) ret -here: +1: chmk $ SYS_vfork - bcs err # if failed, set errno and return -1 + bcs 2f # if failed, set errno and return -1 jmp (%r2) -err: +2: movl %r0,_C_LABEL(errno) mnegl $1,%r0 jmp (%r2) +SYSCALL_END(vfork) diff --git a/lib/libc/arch/vax/sys/brk.S b/lib/libc/arch/vax/sys/brk.S index 49023595209..7ce66b64c2b 100644 --- a/lib/libc/arch/vax/sys/brk.S +++ b/lib/libc/arch/vax/sys/brk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: brk.S,v 1.10 2015/08/26 01:54:09 guenther Exp $ */ +/* $OpenBSD: brk.S,v 1.11 2015/09/10 13:29:09 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -33,21 +33,25 @@ .data __minbrk: .long _end + END(__minbrk) + .type __minbrk,@object + .text .globl __curbrk -WEAK_ALIAS(brk,_brk) + .weak brk -ENTRY(_brk, 0) +ENTRY(brk, 0) cmpl __minbrk,4(%ap) - blequ ok + blequ 1f movl __minbrk,4(%ap) -ok: +1: chmk $ SYS_break - jcs err + jcs 2f movl 4(%ap),__curbrk clrl %r0 ret -err: +2: jmp _C_LABEL(__cerror) +END(brk) diff --git a/lib/libc/arch/vax/sys/cerror.S b/lib/libc/arch/vax/sys/cerror.S index d56f787afc1..e2c2ec867c4 100644 --- a/lib/libc/arch/vax/sys/cerror.S +++ b/lib/libc/arch/vax/sys/cerror.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cerror.S,v 1.11 2015/05/12 04:22:01 miod Exp $ */ +/* $OpenBSD: cerror.S,v 1.12 2015/09/10 13:29:09 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -39,3 +39,4 @@ _C_LABEL(___cerror): mnegl $1,%r0 mnegl $1,%r1 ret +END(___cerror) diff --git a/lib/libc/arch/vax/sys/sbrk.S b/lib/libc/arch/vax/sys/sbrk.S index d24feb74933..fea5c520903 100644 --- a/lib/libc/arch/vax/sys/sbrk.S +++ b/lib/libc/arch/vax/sys/sbrk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sbrk.S,v 1.10 2015/08/26 01:54:09 guenther Exp $ */ +/* $OpenBSD: sbrk.S,v 1.11 2015/09/10 13:29:09 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -37,19 +37,23 @@ .data __curbrk: .long _end + END(__curbrk) + .type __curbrk,@object + .text -WEAK_ALIAS(sbrk,_sbrk) + .weak sbrk -ENTRY(_sbrk, R3) +ENTRY(sbrk, R3) addl3 __curbrk,4(%ap),-(%sp) pushl $1 movl %ap,%r3 movl %sp,%ap chmk $ SYS_break - jcs err + jcs 1f movl __curbrk,%r0 addl2 4(%r3),__curbrk ret -err: +1: jmp _C_LABEL(__cerror) +END(sbrk) diff --git a/lib/libc/arch/vax/sys/sigpending.S b/lib/libc/arch/vax/sys/sigpending.S index b066d0918a7..174acbf519d 100644 --- a/lib/libc/arch/vax/sys/sigpending.S +++ b/lib/libc/arch/vax/sys/sigpending.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigpending.S,v 1.5 2013/07/05 21:10:50 miod Exp $ */ +/* $OpenBSD: sigpending.S,v 1.6 2015/09/10 13:29:09 guenther Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -34,3 +34,4 @@ SYSCALL(sigpending) movl %r0,*4(%ap) # store old mask clrl %r0 ret +SYSCALL_END(sigpending) diff --git a/lib/libc/arch/vax/sys/sigprocmask.S b/lib/libc/arch/vax/sys/sigprocmask.S index 40a6827cf6b..be39d69a021 100644 --- a/lib/libc/arch/vax/sys/sigprocmask.S +++ b/lib/libc/arch/vax/sys/sigprocmask.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigprocmask.S,v 1.9 2013/07/05 21:10:50 miod Exp $ */ +/* $OpenBSD: sigprocmask.S,v 1.10 2015/09/10 13:29:09 guenther Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -30,8 +30,6 @@ #include "SYS.h" -err: - jmp _C_LABEL(__cerror) SYSENTRY(sigprocmask) tstl 8(%ap) # check new sigset pointer @@ -41,10 +39,13 @@ SYSENTRY(sigprocmask) jbr 2f 1: movl *8(%ap),8(%ap) # indirect to new mask arg 2: chmk $ SYS_sigprocmask - jcs err + jcs 4f tstl 12(%ap) # test if old mask requested - beql out + beql 3f movl %r0,*12(%ap) # store old mask -out: +3: clrl %r0 ret +4: + jmp _C_LABEL(__cerror) +SYSCALL_END(sigprocmask) diff --git a/lib/libc/arch/vax/sys/sigreturn.S b/lib/libc/arch/vax/sys/sigreturn.S index 1402dec07c7..e554d55f9d4 100644 --- a/lib/libc/arch/vax/sys/sigreturn.S +++ b/lib/libc/arch/vax/sys/sigreturn.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigreturn.S,v 1.7 2008/05/21 20:38:10 miod Exp $ */ +/* $OpenBSD: sigreturn.S,v 1.8 2015/09/10 13:29:09 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -44,3 +44,4 @@ SYSCALL(sigreturn) ret +SYSCALL_END(sigreturn) diff --git a/lib/libc/arch/vax/sys/sigsuspend.S b/lib/libc/arch/vax/sys/sigsuspend.S index 9ebd1c76e54..5ef2bdf5ef3 100644 --- a/lib/libc/arch/vax/sys/sigsuspend.S +++ b/lib/libc/arch/vax/sys/sigsuspend.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigsuspend.S,v 1.9 2013/07/05 21:10:50 miod Exp $ */ +/* $OpenBSD: sigsuspend.S,v 1.10 2015/09/10 13:29:09 guenther Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -30,12 +30,13 @@ #include "SYS.h" -err: - jmp _C_LABEL(__cerror) SYSENTRY(sigsuspend) movl *4(%ap),4(%ap) # indirect to mask arg chmk $ SYS_sigsuspend - jcs err + jcs 1f clrl %r0 # shouldnt happen ret +1: + jmp _C_LABEL(__cerror) +SYSCALL_END(sigsuspend) diff --git a/lib/libc/arch/vax/sys/syscall.S b/lib/libc/arch/vax/sys/syscall.S index 94859f0e39c..7887aa38962 100644 --- a/lib/libc/arch/vax/sys/syscall.S +++ b/lib/libc/arch/vax/sys/syscall.S @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.S,v 1.9 2013/07/05 21:10:50 miod Exp $ */ +/* $OpenBSD: syscall.S,v 1.10 2015/09/10 13:29:09 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -43,3 +43,4 @@ SYSENTRY(syscall) ret 1: jmp _C_LABEL(__cerror) +SYSCALL_END(syscall) diff --git a/lib/libc/arch/vax/sys/tfork_thread.S b/lib/libc/arch/vax/sys/tfork_thread.S index d14fd84cfc6..eec4720e32b 100644 --- a/lib/libc/arch/vax/sys/tfork_thread.S +++ b/lib/libc/arch/vax/sys/tfork_thread.S @@ -1,4 +1,4 @@ -/* $OpenBSD: tfork_thread.S,v 1.3 2013/07/05 21:10:50 miod Exp $ */ +/* $OpenBSD: tfork_thread.S,v 1.4 2015/09/10 13:29:09 guenther Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -65,3 +65,4 @@ ENTRY(__tfork_thread, R2|R3) * system call failed. */ jmp _C_LABEL(__cerror) +END(__tfork_thread) |