aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile4
-rw-r--r--lib/errno.c7
-rw-r--r--lib/execve.c23
3 files changed, 1 insertions, 33 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 4d752be0edc0..b0361756e22e 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -2,7 +2,7 @@
2# Makefile for some libs needed in the kernel. 2# Makefile for some libs needed in the kernel.
3# 3#
4 4
5lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \ 5lib-y := ctype.o string.o vsprintf.o cmdline.o \
6 bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \ 6 bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \
7 idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \ 7 idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \
8 sha1.o 8 sha1.o
@@ -35,8 +35,6 @@ ifneq ($(CONFIG_HAVE_DEC_LOCK),y)
35 lib-y += dec_and_lock.o 35 lib-y += dec_and_lock.o
36endif 36endif
37 37
38lib-y += execve.o
39
40obj-$(CONFIG_CRC_CCITT) += crc-ccitt.o 38obj-$(CONFIG_CRC_CCITT) += crc-ccitt.o
41obj-$(CONFIG_CRC16) += crc16.o 39obj-$(CONFIG_CRC16) += crc16.o
42obj-$(CONFIG_CRC32) += crc32.o 40obj-$(CONFIG_CRC32) += crc32.o
diff --git a/lib/errno.c b/lib/errno.c
deleted file mode 100644
index 41cb9d76c052..000000000000
--- a/lib/errno.c
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * linux/lib/errno.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */
6
7int errno;
diff --git a/lib/execve.c b/lib/execve.c
deleted file mode 100644
index 2667ebc15045..000000000000
--- a/lib/execve.c
+++ /dev/null
@@ -1,23 +0,0 @@
1#include <asm/bug.h>
2#include <asm/uaccess.h>
3
4#define __KERNEL_SYSCALLS__
5static int errno __attribute__((unused));
6#include <asm/unistd.h>
7
8#ifdef _syscall3
9int kernel_execve (const char *filename, char *const argv[], char *const envp[])
10 __attribute__((__weak__));
11int kernel_execve (const char *filename, char *const argv[], char *const envp[])
12{
13 mm_segment_t fs = get_fs();
14 int ret;
15
16 WARN_ON(segment_eq(fs, USER_DS));
17 ret = execve(filename, (char **)argv, (char **)envp);
18 if (ret)
19 ret = -errno;
20
21 return ret;
22}
23#endif