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
This commit is contained in:
Marius Strobl 2015-02-16 22:13:03 +00:00
parent 5f674c4cbd
commit aed116911d
4 changed files with 21 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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/}

View File

@ -102,6 +102,16 @@ CNAME(x):
#define ENTRY(x) _ENTRY(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
*/