Author: marius
Date: Mon Feb 16 22:13:03 2015
New Revision: 278870
URL: https://svnweb.freebsd.org/changeset/base/278870

Log:
  Unbreak sparc64 after r276630 by calling __sparc_sigtramp_setup signal
  trampoline as part of the MD __sys_sigaction again.
  
  Submitted by: kib (initial versions)
  MFC after:    3 days

Added:
  head/lib/libc/sparc64/sys/sigaction1.S
     - copied, changed from r278826, head/lib/libc/sparc64/sys/sigaction.S
Deleted:
  head/lib/libc/sparc64/sys/sigaction.S
Modified:
  head/lib/libc/sparc64/sys/Makefile.inc
  head/lib/libc/sys/Makefile.inc
  head/sys/sparc64/include/asm.h

Modified: head/lib/libc/sparc64/sys/Makefile.inc
==============================================================================
--- head/lib/libc/sparc64/sys/Makefile.inc      Mon Feb 16 21:56:19 2015        
(r278869)
+++ head/lib/libc/sparc64/sys/Makefile.inc      Mon Feb 16 22:13:03 2015        
(r278870)
@@ -12,7 +12,7 @@ SRCS+=        __sparc_sigtramp_setup.c \
 
 CFLAGS+= -I${LIBC_SRCTOP}/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 and modified: head/lib/libc/sparc64/sys/sigaction1.S (from r278826, 
head/lib/libc/sparc64/sys/sigaction.S)
==============================================================================
--- head/lib/libc/sparc64/sys/sigaction.S       Sun Feb 15 22:38:00 2015        
(r278826, copy source)
+++ head/lib/libc/sparc64/sys/sigaction1.S      Mon Feb 16 22:13:03 2015        
(r278870)
@@ -29,7 +29,8 @@ __FBSDID("$FreeBSD$");
 
 #include "SYS.h"
 
-_SYSENTRY(sigaction)
+       WEAK_REFERENCE(__sys_sigaction, _sigaction)
+ENTRY(__sys_sigaction)
        PIC_PROLOGUE(%o3, %o4)
        SET(sigcode_installed, %o4, %o3)
        lduw    [%o3], %o4
@@ -44,6 +45,6 @@ _SYSENTRY(sigaction)
 1:     _SYSCALL(sigaction)
        retl
         nop
-_SYSEND(sigaction)
+END(__sys_sigaction)
 
        .comm   sigcode_installed, 4, 4

Modified: head/lib/libc/sys/Makefile.inc
==============================================================================
--- head/lib/libc/sys/Makefile.inc      Mon Feb 16 21:56:19 2015        
(r278869)
+++ head/lib/libc/sys/Makefile.inc      Mon Feb 16 22:13:03 2015        
(r278870)
@@ -65,7 +65,6 @@ INTERPOSED = \
        sendmsg \
        sendto \
        setcontext \
-       sigaction \
        sigprocmask \
        sigsuspend \
        sigtimedwait \
@@ -76,6 +75,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: head/sys/sparc64/include/asm.h
==============================================================================
--- head/sys/sparc64/include/asm.h      Mon Feb 16 21:56:19 2015        
(r278869)
+++ head/sys/sparc64/include/asm.h      Mon Feb 16 22:13:03 2015        
(r278870)
@@ -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
  */
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to