diff options
author | Masao Uebayashi <uebayasi@cvs.openbsd.org> | 2015-06-17 03:04:51 +0000 |
---|---|---|
committer | Masao Uebayashi <uebayasi@cvs.openbsd.org> | 2015-06-17 03:04:51 +0000 |
commit | c4e296a70fb5388785fa46578aa965ed8a6dc89e (patch) | |
tree | f6346fdcbaa9b319447eb21ff5af01a2dde692c8 /lib/libc/arch/amd64 | |
parent | c4f1ba8a26298d97f341bb00eeefdff0cd751ad4 (diff) |
Set FUNC symbol sizes of auto-generated and hand-written syscall wrappers.
Original diff from guenther@, adjusted by me.
OK guenther@
Diffstat (limited to 'lib/libc/arch/amd64')
-rw-r--r-- | lib/libc/arch/amd64/SYS.h | 27 | ||||
-rw-r--r-- | lib/libc/arch/amd64/sys/Ovfork.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/amd64/sys/brk.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/amd64/sys/exect.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/amd64/sys/sbrk.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/amd64/sys/sigpending.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/amd64/sys/sigprocmask.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/amd64/sys/sigreturn.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/amd64/sys/sigsuspend.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/amd64/sys/syscall.S | 3 |
10 files changed, 40 insertions, 14 deletions
diff --git a/lib/libc/arch/amd64/SYS.h b/lib/libc/arch/amd64/SYS.h index 8b5f50f1838..efc12d5ecd9 100644 --- a/lib/libc/arch/amd64/SYS.h +++ b/lib/libc/arch/amd64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.11 2015/06/12 09:26:05 uebayasi Exp $ */ +/* $OpenBSD: SYS.h,v 1.12 2015/06/17 03:04:50 uebayasi Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -42,12 +42,15 @@ #define SYSTRAP(x) movl $(SYS_ ## x),%eax; movq %rcx, %r10; syscall #define SYSENTRY(x) \ - SYSENTRY_HIDDEN(x); \ + SYSENTRY_HIDDEN(x); \ .weak _C_LABEL(x); \ _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x) #define SYSENTRY_HIDDEN(x) \ ENTRY(_thread_sys_ ## x) \ +#define SYSEXIT_HIDDEN(x) END(_thread_sys_ ## x) +#define SYSEXIT(x) SYSEXIT_HIDDEN(x); END(x) + #define CERROR _C_LABEL(__cerror) #define _CERROR _C_LABEL(___cerror) #define CURBRK _C_LABEL(__curbrk) @@ -55,9 +58,13 @@ #define _SYSCALL_NOERROR(x,y) \ SYSENTRY(x); \ SYSTRAP(y) +#define _SYSCALL_NOERROR_END(x,y) \ + SYSEXIT(x) #define _SYSCALL_HIDDEN_NOERROR(x,y) \ SYSENTRY_HIDDEN(x); \ SYSTRAP(y) +#define _SYSCALL_HIDDEN_NOERROR_END(x,y) \ + SYSEXIT_HIDDEN(x) #ifdef __PIC__ #define _SYSCALL(x,y) \ @@ -85,22 +92,32 @@ jc 2b #endif +#define _SYSCALL_END(x,y) \ + _SYSCALL_NOERROR_END(x,y) +#define _SYSCALL_HIDDEN_END(x,y) \ + _SYSCALL_HIDDEN_NOERROR_END(x,y) + #define SYSCALL_NOERROR(x) \ _SYSCALL_NOERROR(x,x) #define SYSCALL(x) \ _SYSCALL(x,x) +#define SYSCALL_END(x) \ + _SYSCALL_END(x,x) #define PSEUDO_NOERROR(x,y) \ _SYSCALL_NOERROR(x,y); \ - ret + ret; \ + _SYSCALL_NOERROR_END(x,y) #define PSEUDO(x,y) \ _SYSCALL(x,y); \ - ret + ret; \ + _SYSCALL_END(x,y) #define PSEUDO_HIDDEN(x,y) \ _SYSCALL_HIDDEN(x,y); \ - ret + ret; \ + _SYSCALL_HIDDEN_END(x,y) #define RSYSCALL_NOERROR(x) \ PSEUDO_NOERROR(x,x) diff --git a/lib/libc/arch/amd64/sys/Ovfork.S b/lib/libc/arch/amd64/sys/Ovfork.S index 6494a8bdb53..882edb0f448 100644 --- a/lib/libc/arch/amd64/sys/Ovfork.S +++ b/lib/libc/arch/amd64/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $OpenBSD: Ovfork.S,v 1.4 2015/03/31 04:32:01 guenther Exp $ */ +/* $OpenBSD: Ovfork.S,v 1.5 2015/06/17 03:04:50 uebayasi Exp $ */ /* $NetBSD: Ovfork.S,v 1.2 2002/06/03 18:30:33 fvdl Exp $ */ /*- @@ -52,3 +52,4 @@ err: #else jmp CERROR #endif +SYSEXIT(vfork) diff --git a/lib/libc/arch/amd64/sys/brk.S b/lib/libc/arch/amd64/sys/brk.S index fe5a0b9acfd..ea6efeba107 100644 --- a/lib/libc/arch/amd64/sys/brk.S +++ b/lib/libc/arch/amd64/sys/brk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: brk.S,v 1.4 2012/08/22 17:19:34 pascal Exp $ */ +/* $OpenBSD: brk.S,v 1.5 2015/06/17 03:04:50 uebayasi Exp $ */ /* $NetBSD: brk.S,v 1.2 2002/06/03 18:30:33 fvdl Exp $ */ /*- @@ -83,3 +83,4 @@ err: err: jmp CERROR #endif +SYSEXIT(_brk) diff --git a/lib/libc/arch/amd64/sys/exect.S b/lib/libc/arch/amd64/sys/exect.S index 654134fd4f7..fa7fa6b1c70 100644 --- a/lib/libc/arch/amd64/sys/exect.S +++ b/lib/libc/arch/amd64/sys/exect.S @@ -1,4 +1,4 @@ -/* $OpenBSD: exect.S,v 1.3 2012/08/22 17:19:34 pascal Exp $ */ +/* $OpenBSD: exect.S,v 1.4 2015/06/17 03:04:50 uebayasi Exp $ */ /* $NetBSD: exect.S,v 1.1 2001/06/19 00:25:06 fvdl Exp $ */ /*- @@ -51,3 +51,4 @@ SYSENTRY(exect) #else jmp CERROR #endif +SYSEXIT(exect) diff --git a/lib/libc/arch/amd64/sys/sbrk.S b/lib/libc/arch/amd64/sys/sbrk.S index e6a3bbd7d87..2e04460cf4a 100644 --- a/lib/libc/arch/amd64/sys/sbrk.S +++ b/lib/libc/arch/amd64/sys/sbrk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sbrk.S,v 1.4 2012/08/22 17:19:34 pascal Exp $ */ +/* $OpenBSD: sbrk.S,v 1.5 2015/06/17 03:04:50 uebayasi Exp $ */ /* $NetBSD: sbrk.S,v 1.1 2001/06/19 00:25:06 fvdl Exp $ */ /*- @@ -82,3 +82,4 @@ err: err: jmp CERROR #endif +SYSEXIT(_sbrk) diff --git a/lib/libc/arch/amd64/sys/sigpending.S b/lib/libc/arch/amd64/sys/sigpending.S index 63bdc1fffe2..6d8a2201791 100644 --- a/lib/libc/arch/amd64/sys/sigpending.S +++ b/lib/libc/arch/amd64/sys/sigpending.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigpending.S,v 1.2 2005/12/13 00:10:48 jsg Exp $ */ +/* $OpenBSD: sigpending.S,v 1.3 2015/06/17 03:04:50 uebayasi Exp $ */ /* $NetBSD: sigpending.S,v 1.1 2001/06/19 00:25:06 fvdl Exp $ */ /*- @@ -43,3 +43,4 @@ SYSCALL(sigpending) movl %eax,(%rdi) # store old mask xorl %eax,%eax ret +SYSCALL_END(sigpending) diff --git a/lib/libc/arch/amd64/sys/sigprocmask.S b/lib/libc/arch/amd64/sys/sigprocmask.S index c23a9f87395..0b8eced0fdf 100644 --- a/lib/libc/arch/amd64/sys/sigprocmask.S +++ b/lib/libc/arch/amd64/sys/sigprocmask.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigprocmask.S,v 1.4 2012/08/22 17:19:34 pascal Exp $ */ +/* $OpenBSD: sigprocmask.S,v 1.5 2015/06/17 03:04:50 uebayasi Exp $ */ /* $NetBSD: sigprocmask.S,v 1.1 2001/06/19 00:25:06 fvdl Exp $ */ /*- @@ -60,3 +60,4 @@ err: #else jmp CERROR #endif +SYSEXIT(sigprocmask) diff --git a/lib/libc/arch/amd64/sys/sigreturn.S b/lib/libc/arch/amd64/sys/sigreturn.S index 81e22ef562f..0bab62e5d5b 100644 --- a/lib/libc/arch/amd64/sys/sigreturn.S +++ b/lib/libc/arch/amd64/sys/sigreturn.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigreturn.S,v 1.4 2011/09/05 02:56:44 guenther Exp $ */ +/* $OpenBSD: sigreturn.S,v 1.5 2015/06/17 03:04:50 uebayasi Exp $ */ /* $NetBSD: __sigreturn14.S,v 1.1 2001/06/19 00:25:06 fvdl Exp $ */ /*- @@ -54,3 +54,4 @@ SYSCALL(sigreturn) ret +SYSCALL_END(sigreturn) diff --git a/lib/libc/arch/amd64/sys/sigsuspend.S b/lib/libc/arch/amd64/sys/sigsuspend.S index b181fda0a63..c07567fc34d 100644 --- a/lib/libc/arch/amd64/sys/sigsuspend.S +++ b/lib/libc/arch/amd64/sys/sigsuspend.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigsuspend.S,v 1.3 2012/08/22 17:19:34 pascal Exp $ */ +/* $OpenBSD: sigsuspend.S,v 1.4 2015/06/17 03:04:50 uebayasi Exp $ */ /* $NetBSD: sigsuspend.S,v 1.1 2001/06/19 00:25:07 fvdl Exp $ */ /*- @@ -52,3 +52,4 @@ err: #else jmp CERROR #endif +SYSEXIT(sigsuspend) diff --git a/lib/libc/arch/amd64/sys/syscall.S b/lib/libc/arch/amd64/sys/syscall.S index 4fcc823c891..bdddd51205e 100644 --- a/lib/libc/arch/amd64/sys/syscall.S +++ b/lib/libc/arch/amd64/sys/syscall.S @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.S,v 1.4 2012/08/22 17:19:34 pascal Exp $ */ +/* $OpenBSD: syscall.S,v 1.5 2015/06/17 03:04:50 uebayasi Exp $ */ /* $NetBSD: syscall.S,v 1.2 2002/06/03 18:30:33 fvdl Exp $ */ /*- @@ -52,3 +52,4 @@ err: #else jmp CERROR #endif +SYSEXIT(syscall) |