From 87385baff6b0cf994c68e78965325c910277aafa Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Thu, 12 Apr 2018 18:23:14 +0000 Subject: [PATCH] Replace MD assembly exect() with a portable version. Originally, on the VAX exect() enable tracing once the new executable image was loaded. This was possible because tracing was controllable through user space code by setting the PSL_T flag. The following instruction is a system call that activated tracing (as all instructions do) by copying PSL_T to PSL_TP (trace pending). The first instruction of the new executable image would trigger a trace fault. This is not portable to all platforms and the behavior was replaced with ptrace(PT_TRACE_ME, ...) since FreeBSD forked off of the CSRG repository. Platforms either incorrectly call execve(), trigger trace faults inside the original executable, or do contain an implementation of this function. The exect() interfaces is deprecated or removed on NetBSD and OpenBSD. Submitted by: Ali Mashtizadeh Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D14989 --- lib/libc/amd64/Symbol.map | 1 - lib/libc/amd64/sys/Makefile.inc | 3 +- lib/libc/amd64/sys/exect.S | 53 ----------------------------- lib/libc/gen/Makefile.inc | 1 + lib/libc/gen/Symbol.map | 1 + lib/libc/gen/exect.c | 45 ++++++++++++++++++++++++ lib/libc/i386/Symbol.map | 1 - lib/libc/i386/sys/Makefile.inc | 3 +- lib/libc/i386/sys/exect.S | 53 ----------------------------- lib/libc/mips/sys/Makefile.inc | 3 +- lib/libc/mips/sys/exect.S | 51 --------------------------- lib/libc/powerpc/Symbol.map | 1 - lib/libc/powerpc/sys/Makefile.inc | 2 +- lib/libc/powerpc/sys/exect.S | 42 ----------------------- lib/libc/powerpc64/Symbol.map | 1 - lib/libc/powerpc64/sys/Makefile.inc | 2 +- lib/libc/powerpc64/sys/exect.S | 50 --------------------------- lib/libc/sparc64/Symbol.map | 3 -- lib/libc/sparc64/sys/Makefile.inc | 2 +- lib/libc/sparc64/sys/exect.S | 51 --------------------------- 20 files changed, 53 insertions(+), 316 deletions(-) delete mode 100644 lib/libc/amd64/sys/exect.S create mode 100644 lib/libc/gen/exect.c delete mode 100644 lib/libc/i386/sys/exect.S delete mode 100644 lib/libc/mips/sys/exect.S delete mode 100644 lib/libc/powerpc/sys/exect.S delete mode 100644 lib/libc/powerpc64/sys/exect.S delete mode 100644 lib/libc/sparc64/sys/exect.S diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index 5354d66bcc38..7405e4c1dede 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -40,7 +40,6 @@ FBSD_1.0 { amd64_set_fsbase; amd64_set_gsbase; brk; - exect; sbrk; vfork; }; diff --git a/lib/libc/amd64/sys/Makefile.inc b/lib/libc/amd64/sys/Makefile.inc index 2ca89eaf093a..750d5a886be3 100644 --- a/lib/libc/amd64/sys/Makefile.inc +++ b/lib/libc/amd64/sys/Makefile.inc @@ -8,8 +8,7 @@ SRCS+= \ amd64_set_fsbase.c \ amd64_set_gsbase.c -MDASM= vfork.S brk.S cerror.S exect.S getcontext.S \ - sbrk.S +MDASM= vfork.S brk.S cerror.S getcontext.S sbrk.S # Don't generate default code for these syscalls: NOASM+= vfork.o diff --git a/lib/libc/amd64/sys/exect.S b/lib/libc/amd64/sys/exect.S deleted file mode 100644 index f860ddcd04c0..000000000000 --- a/lib/libc/amd64/sys/exect.S +++ /dev/null @@ -1,53 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -#if defined(SYSLIBC_SCCS) && !defined(lint) - .asciz "@(#)exect.s 5.1 (Berkeley) 4/23/90" -#endif /* SYSLIBC_SCCS and not lint */ -#include -__FBSDID("$FreeBSD$"); - -#include "SYS.h" -#include - -ENTRY(exect) - movq $SYS_execve,%rax - pushfq - popq %r8 - orq $PSL_T,%r8 - pushq %r8 - popfq - KERNCALL - jmp HIDENAME(cerror) -END(exect) - - .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index c19655ec8a16..a6235c33a765 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -41,6 +41,7 @@ SRCS+= __getosreldate.c \ errlst.c \ errno.c \ exec.c \ + exect.c \ fdevname.c \ feature_present.c \ fmtcheck.c \ diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 908206e18e94..aabec58b1c98 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -105,6 +105,7 @@ FBSD_1.0 { sys_errlist; sys_nerr; errno; + exect; execl; execle; execlp; diff --git a/lib/libc/gen/exect.c b/lib/libc/gen/exect.c new file mode 100644 index 000000000000..b878d8cac085 --- /dev/null +++ b/lib/libc/gen/exect.c @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2018 Ali Mashtizadeh + * 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 ``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 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 +__FBSDID("$FreeBSD$"); + +#include + +#include +#include + +int +exect(const char *path, char *const argv[], char *const envp[]) +{ + + if (ptrace(PT_TRACE_ME, 0, 0, 0) != 0) { + if (errno != EBUSY) + return (-1); + } + + return (execve(path, argv, envp)); +} diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index 20dbc3e9cfcd..ca0296b9bc26 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -31,7 +31,6 @@ FBSD_1.0 { ntohs; vfork; brk; - exect; i386_clr_watch; i386_get_fsbase; i386_get_gsbase; diff --git a/lib/libc/i386/sys/Makefile.inc b/lib/libc/i386/sys/Makefile.inc index a16097005dbb..6c6bebdbdfaa 100644 --- a/lib/libc/i386/sys/Makefile.inc +++ b/lib/libc/i386/sys/Makefile.inc @@ -7,8 +7,7 @@ SRCS+= i386_clr_watch.c i386_set_watch.c i386_vm86.c SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_get_ioperm.c i386_get_ldt.c \ i386_set_fsbase.c i386_set_gsbase.c i386_set_ioperm.c i386_set_ldt.c -MDASM= Ovfork.S brk.S cerror.S exect.S getcontext.S \ - sbrk.S syscall.S +MDASM= Ovfork.S brk.S cerror.S getcontext.S sbrk.S syscall.S NOASM+= vfork.o diff --git a/lib/libc/i386/sys/exect.S b/lib/libc/i386/sys/exect.S deleted file mode 100644 index 64307bb8078c..000000000000 --- a/lib/libc/i386/sys/exect.S +++ /dev/null @@ -1,53 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -#if defined(SYSLIBC_SCCS) && !defined(lint) - .asciz "@(#)exect.s 5.1 (Berkeley) 4/23/90" -#endif /* SYSLIBC_SCCS and not lint */ -#include -__FBSDID("$FreeBSD$"); - -#include "SYS.h" -#include - -ENTRY(exect) - mov $SYS_execve,%eax - pushf - popl %edx - orl $ PSL_T,%edx - pushl %edx - popf - KERNCALL - jmp HIDENAME(cerror) /* exect(file, argv, env); */ -END(exect) - - .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/mips/sys/Makefile.inc b/lib/libc/mips/sys/Makefile.inc index f8af45378b90..5e6eec1ee535 100644 --- a/lib/libc/mips/sys/Makefile.inc +++ b/lib/libc/mips/sys/Makefile.inc @@ -2,8 +2,7 @@ SRCS+= trivial-vdso_tc.c -MDASM= Ovfork.S brk.S cerror.S exect.S \ - sbrk.S syscall.S +MDASM= Ovfork.S brk.S cerror.S sbrk.S syscall.S # Don't generate default code for these syscalls: NOASM+= vfork.o diff --git a/lib/libc/mips/sys/exect.S b/lib/libc/mips/sys/exect.S deleted file mode 100644 index 613d47c5d6d5..000000000000 --- a/lib/libc/mips/sys/exect.S +++ /dev/null @@ -1,51 +0,0 @@ -/* $NetBSD: exect.S,v 1.9 2003/08/07 16:42:17 agc Exp $ */ -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Ralph Campbell. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 -__FBSDID("$FreeBSD$"); -#include "SYS.h" - -#if defined(LIBC_SCCS) && !defined(lint) - ASMSTR("from: @(#)exect.s 8.1 (Berkeley) 6/4/93") - ASMSTR("$NetBSD: exect.S,v 1.9 2003/08/07 16:42:17 agc Exp $") -#endif /* LIBC_SCCS and not lint */ - -LEAF(exect) - PIC_PROLOGUE(exect) - li v0, SYS_execve - syscall - bne a3, zero, 1f - PIC_RETURN() -1: - PIC_TAILCALL(__cerror) -END(exect) diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index f695c81bb27f..ae0da985463b 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -33,7 +33,6 @@ FBSD_1.0 { ntohl; ntohs; brk; - exect; sbrk; vfork; }; diff --git a/lib/libc/powerpc/sys/Makefile.inc b/lib/libc/powerpc/sys/Makefile.inc index 3436dccf8efc..f2b5e794120c 100644 --- a/lib/libc/powerpc/sys/Makefile.inc +++ b/lib/libc/powerpc/sys/Makefile.inc @@ -1,3 +1,3 @@ # $FreeBSD$ -MDASM+= brk.S cerror.S exect.S sbrk.S +MDASM+= brk.S cerror.S sbrk.S diff --git a/lib/libc/powerpc/sys/exect.S b/lib/libc/powerpc/sys/exect.S deleted file mode 100644 index 701f5b00f45c..000000000000 --- a/lib/libc/powerpc/sys/exect.S +++ /dev/null @@ -1,42 +0,0 @@ -/*- - * Copyright (c) 2002 Peter Grehan. - * 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. - */ -/* $NetBSD: exect.S,v 1.3 1998/05/25 15:28:03 ws Exp $ */ - -#include -__FBSDID("$FreeBSD$"); - -#include "SYS.h" - -ENTRY(exect) - li %r0,SYS_execve - sc - bso 1f - blr -1: - b PIC_PLT(HIDENAME(cerror)) -END(exect) - - .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index c429e84ab5fd..a45cd055157a 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -33,7 +33,6 @@ FBSD_1.0 { ntohl; ntohs; brk; - exect; sbrk; vfork; }; diff --git a/lib/libc/powerpc64/sys/Makefile.inc b/lib/libc/powerpc64/sys/Makefile.inc index 3436dccf8efc..f2b5e794120c 100644 --- a/lib/libc/powerpc64/sys/Makefile.inc +++ b/lib/libc/powerpc64/sys/Makefile.inc @@ -1,3 +1,3 @@ # $FreeBSD$ -MDASM+= brk.S cerror.S exect.S sbrk.S +MDASM+= brk.S cerror.S sbrk.S diff --git a/lib/libc/powerpc64/sys/exect.S b/lib/libc/powerpc64/sys/exect.S deleted file mode 100644 index b6cda9c90773..000000000000 --- a/lib/libc/powerpc64/sys/exect.S +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * Copyright (c) 2002 Peter Grehan. - * 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. - */ -/* $NetBSD: exect.S,v 1.3 1998/05/25 15:28:03 ws Exp $ */ - -#include -__FBSDID("$FreeBSD$"); - -#include "SYS.h" - -ENTRY(exect) - li %r0,SYS_execve - sc - bso 1f - blr -1: - mflr %r0 - std %r0,16(%r1) - stdu %r1,-48(%r1) - bl HIDENAME(cerror) - nop - ld %r1,0(%r1) - ld %r0,16(%r1) - mtlr %r0 - blr -END(exect) - - .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/sparc64/Symbol.map b/lib/libc/sparc64/Symbol.map index 1dc3d150ab3d..e81b07753cce 100644 --- a/lib/libc/sparc64/Symbol.map +++ b/lib/libc/sparc64/Symbol.map @@ -33,7 +33,6 @@ FBSD_1.0 { ntohl; ntohs; brk; - exect; sbrk; vfork; @@ -82,8 +81,6 @@ FBSDprivate_1.0 { __siglongjmp; __sys_brk; _brk; - __sys_exect; - _exect; _end; __sys_sbrk; _sbrk; diff --git a/lib/libc/sparc64/sys/Makefile.inc b/lib/libc/sparc64/sys/Makefile.inc index adbbeaca46d6..e0f8d24b2e7f 100644 --- a/lib/libc/sparc64/sys/Makefile.inc +++ b/lib/libc/sparc64/sys/Makefile.inc @@ -12,4 +12,4 @@ SRCS+= __sparc_sigtramp_setup.c \ CFLAGS+= -I${LIBC_SRCTOP}/sparc64/fpu -MDASM+= brk.S cerror.S exect.S sbrk.S sigaction1.S +MDASM+= brk.S cerror.S sbrk.S sigaction1.S diff --git a/lib/libc/sparc64/sys/exect.S b/lib/libc/sparc64/sys/exect.S deleted file mode 100644 index e884c8f9c847..000000000000 --- a/lib/libc/sparc64/sys/exect.S +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * from: Header: exect.s,v 1.1 91/07/06 13:05:57 torek Exp - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .asciz "@(#)exect.s 8.1 (Berkeley) 6/4/93" -#if 0 - RCSID("$NetBSD: exect.S,v 1.1 1998/09/11 04:56:34 eeh Exp $") -#endif -#endif /* LIBC_SCCS and not lint */ -#include -__FBSDID("$FreeBSD$"); - -#include "SYS.h" - -_SYSENTRY(exect) - mov SYS_execve, %g1 - ta %xcc, ST_SYSCALL - ERROR() -_SYSEND(exect)