Set FUNC symbol sizes of auto-generated and hand-written syscall wrappers.
authoruebayasi <uebayasi@openbsd.org>
Wed, 17 Jun 2015 03:04:50 +0000 (03:04 +0000)
committeruebayasi <uebayasi@openbsd.org>
Wed, 17 Jun 2015 03:04:50 +0000 (03:04 +0000)
Original diff from guenther@, adjusted by me.

OK guenther@

lib/libc/arch/amd64/SYS.h
lib/libc/arch/amd64/sys/Ovfork.S
lib/libc/arch/amd64/sys/brk.S
lib/libc/arch/amd64/sys/exect.S
lib/libc/arch/amd64/sys/sbrk.S
lib/libc/arch/amd64/sys/sigpending.S
lib/libc/arch/amd64/sys/sigprocmask.S
lib/libc/arch/amd64/sys/sigreturn.S
lib/libc/arch/amd64/sys/sigsuspend.S
lib/libc/arch/amd64/sys/syscall.S

index 8b5f50f..efc12d5 100644 (file)
@@ -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.
 #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)
 #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)                                                  \
        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)
index 6494a8b..882edb0 100644 (file)
@@ -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)
index fe5a0b9..ea6efeb 100644 (file)
@@ -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)
index 654134f..fa7fa6b 100644 (file)
@@ -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)
index e6a3bbd..2e04460 100644 (file)
@@ -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)
index 63bdc1f..6d8a220 100644 (file)
@@ -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)
index c23a9f8..0b8eced 100644 (file)
@@ -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)
index 81e22ef..0bab62e 100644 (file)
@@ -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)
index b181fda..c07567f 100644 (file)
@@ -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)
index 4fcc823..bdddd51 100644 (file)
@@ -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)