patch-2.3.99-pre1 linux/fs/binfmt_elf.c
Next file: linux/fs/binfmt_em86.c
Previous file: linux/fs/binfmt_aout.c
Back to the patch index
Back to the overall index
- Lines: 97
- Date:
Mon Mar 13 22:18:11 2000
- Orig file:
v2.3.51/linux/fs/binfmt_elf.c
- Orig date:
Tue Mar 7 14:32:26 2000
diff -u --recursive --new-file v2.3.51/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
@@ -35,8 +35,6 @@
#include <asm/uaccess.h>
#include <asm/pgalloc.h>
-#include <linux/config.h>
-
#define DLINFO_ITEMS 13
#include <linux/elf.h>
@@ -383,8 +381,7 @@
#define INTERPRETER_ELF 2
-static inline int
-do_load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
+static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
{
struct file * file;
struct dentry *interpreter_dentry = NULL; /* to shut gcc up */
@@ -695,14 +692,11 @@
if (interpreter_type != INTERPRETER_AOUT)
sys_close(elf_exec_fileno);
- if (current->exec_domain && current->exec_domain->module)
- __MOD_DEC_USE_COUNT(current->exec_domain->module);
+ put_exec_domain(current->exec_domain);
if (current->binfmt && current->binfmt->module)
__MOD_DEC_USE_COUNT(current->binfmt->module);
current->exec_domain = lookup_exec_domain(current->personality);
current->binfmt = &elf_format;
- if (current->exec_domain && current->exec_domain->module)
- __MOD_INC_USE_COUNT(current->exec_domain->module);
if (current->binfmt && current->binfmt->module)
__MOD_INC_USE_COUNT(current->binfmt->module);
@@ -792,22 +786,10 @@
goto out;
}
-static int
-load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
-{
- int retval;
-
- MOD_INC_USE_COUNT;
- retval = do_load_elf_binary(bprm, regs);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
/* This is really simpleminded and specialized - we are loading an
a.out library that is given an ELF header. */
-static inline int
-do_load_elf_library(int fd)
+static int load_elf_library(int fd)
{
struct file * file;
struct dentry * dentry;
@@ -899,16 +881,6 @@
return error;
}
-static int load_elf_library(int fd)
-{
- int retval;
-
- MOD_INC_USE_COUNT;
- retval = do_load_elf_library(fd);
- MOD_DEC_USE_COUNT;
- return retval;
-}
-
/*
* Note that some platforms still use traditional core dumps and not
* the ELF core dump. Each platform can select it as appropriate.
@@ -1061,10 +1033,6 @@
elf_fpregset_t fpu; /* NT_PRFPREG */
struct elf_prpsinfo psinfo; /* NT_PRPSINFO */
-#ifndef CONFIG_BINFMT_ELF
- MOD_INC_USE_COUNT;
-#endif
-
/* Count what's needed to dump, up to the limit of coredump size */
segs = 0;
size = 0;
@@ -1294,9 +1262,6 @@
end_coredump:
set_fs(fs);
-#ifndef CONFIG_BINFMT_ELF
- MOD_DEC_USE_COUNT;
-#endif
return has_dumped;
}
#endif /* USE_ELF_CORE_DUMP */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)