svn commit: r279258 - in stable/10: lib/libc/sparc64/sys lib/libc/sys sys/sparc64/include
Marius Strobl
marius at FreeBSD.org
Tue Feb 24 22:28:46 UTC 2015
Author: marius
Date: Tue Feb 24 22:28:44 2015
New Revision: 279258
URL: https://svnweb.freebsd.org/changeset/base/279258
Log:
MFC: r278870
Unbreak sparc64 after r276630 (MFCed to stable/10 in r277317) by calling
__sparc_sigtramp_setup signal trampoline as part of the MD __sys_sigaction
again.
Submitted by: kib (initial versions)
Added:
stable/10/lib/libc/sparc64/sys/sigaction1.S
- copied unchanged from r278870, head/lib/libc/sparc64/sys/sigaction1.S
Deleted:
stable/10/lib/libc/sparc64/sys/sigaction.S
Modified:
stable/10/lib/libc/sparc64/sys/Makefile.inc
stable/10/lib/libc/sys/Makefile.inc
stable/10/sys/sparc64/include/asm.h
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/lib/libc/sparc64/sys/Makefile.inc
==============================================================================
--- stable/10/lib/libc/sparc64/sys/Makefile.inc Tue Feb 24 22:27:02 2015 (r279257)
+++ stable/10/lib/libc/sparc64/sys/Makefile.inc Tue Feb 24 22:28:44 2015 (r279258)
@@ -12,7 +12,7 @@ SRCS+= __sparc_sigtramp_setup.c \
CFLAGS+= -I${.CURDIR}/sparc64/fpu
-MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S sigaction.S
+MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S sigaction1.S
# Don't generate default code for these syscalls:
NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o yield.o
Copied: stable/10/lib/libc/sparc64/sys/sigaction1.S (from r278870, head/lib/libc/sparc64/sys/sigaction1.S)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/10/lib/libc/sparc64/sys/sigaction1.S Tue Feb 24 22:28:44 2015 (r279258, copy of r278870, head/lib/libc/sparc64/sys/sigaction1.S)
@@ -0,0 +1,50 @@
+/*-
+ * Copyright (c) 2002 Jake Burkholder.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
+#include "SYS.h"
+
+ WEAK_REFERENCE(__sys_sigaction, _sigaction)
+ENTRY(__sys_sigaction)
+ PIC_PROLOGUE(%o3, %o4)
+ SET(sigcode_installed, %o4, %o3)
+ lduw [%o3], %o4
+ brnz,a,pt %o4, 1f
+ nop
+ save %sp, -CCFSZ, %sp
+ call __sparc_sigtramp_setup
+ nop
+ restore
+ mov 1, %o4
+ stw %o4, [%o3]
+1: _SYSCALL(sigaction)
+ retl
+ nop
+END(__sys_sigaction)
+
+ .comm sigcode_installed, 4, 4
Modified: stable/10/lib/libc/sys/Makefile.inc
==============================================================================
--- stable/10/lib/libc/sys/Makefile.inc Tue Feb 24 22:27:02 2015 (r279257)
+++ stable/10/lib/libc/sys/Makefile.inc Tue Feb 24 22:28:44 2015 (r279258)
@@ -61,7 +61,6 @@ INTERPOSED = \
sendmsg \
sendto \
setcontext \
- sigaction \
sigprocmask \
sigsuspend \
sigtimedwait \
@@ -72,6 +71,13 @@ INTERPOSED = \
write \
writev
+.if ${MACHINE_CPUARCH} == "sparc64"
+SRCS+= sigaction.c
+NOASM+= sigaction.o
+.else
+INTERPOSED+= sigaction
+.endif
+
SRCS+= ${INTERPOSED:S/$/.c/}
NOASM+= ${INTERPOSED:S/$/.o/}
PSEUDO+= ${INTERPOSED:C/^.*$/_&.o/}
Modified: stable/10/sys/sparc64/include/asm.h
==============================================================================
--- stable/10/sys/sparc64/include/asm.h Tue Feb 24 22:27:02 2015 (r279257)
+++ stable/10/sys/sparc64/include/asm.h Tue Feb 24 22:28:44 2015 (r279258)
@@ -103,6 +103,16 @@ CNAME(x):
#define END(x) .size x, . - x
/*
+ * WEAK_REFERENCE(): create a weak reference alias from sym.
+ * The macro is not a general asm macro that takes arbitrary names,
+ * but one that takes only C names. It does the non-null name
+ * translation inside the macro.
+ */
+#define WEAK_REFERENCE(sym, alias) \
+ .weak CNAME(alias); \
+ .equ CNAME(alias),CNAME(sym)
+
+/*
* Kernel RCS ID tag and copyright macros
*/
More information about the svn-src-stable-10
mailing list