patch-2.3.13 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: 47
- Date:
Tue Aug 3 10:18:39 1999
- Orig file:
v2.3.12/linux/fs/binfmt_elf.c
- Orig date:
Wed Jul 28 14:47:42 1999
diff -u --recursive --new-file v2.3.12/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
@@ -64,13 +64,7 @@
#define ELF_PAGEALIGN(_v) (((_v) + ELF_EXEC_PAGESIZE - 1) & ~(ELF_EXEC_PAGESIZE - 1))
static struct linux_binfmt elf_format = {
- NULL,
-#ifndef MODULE
- NULL,
-#else
- &__this_module,
-#endif
- load_elf_binary, load_elf_library, elf_core_dump, ELF_EXEC_PAGESIZE
+ NULL, THIS_MODULE, load_elf_binary, load_elf_library, elf_core_dump, ELF_EXEC_PAGESIZE
};
static void set_brk(unsigned long start, unsigned long end)
@@ -1296,26 +1290,16 @@
}
#endif /* USE_ELF_CORE_DUMP */
-int __init init_elf_binfmt(void)
+static int __init init_elf_binfmt(void)
{
return register_binfmt(&elf_format);
}
-#ifdef MODULE
-
-int init_module(void)
-{
- /* Install the COFF, ELF and XOUT loaders.
- * N.B. We *rely* on the table being the right size with the
- * right number of free slots...
- */
- return init_elf_binfmt();
-}
-
-
-void cleanup_module( void)
+static void __exit exit_elf_binfmt(void)
{
/* Remove the COFF and ELF loaders. */
unregister_binfmt(&elf_format);
}
-#endif
+
+module_init(init_elf_binfmt)
+module_exit(exit_elf_binfmt)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)