Tue Jul 9 09:37:55 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[glibc.git] / sysdeps / unix / sysv / linux / sys / module.h
blob5c4dbcea37686282d1e4d3e420e06b59c54059b7
1 #ifndef _SYS_MODULE_H
2 #define _SYS_MODULE_H
4 #include <features.h>
6 #include <linux/module.h>
8 /* Return number of kernel symbols if TABLE == NULL, otherwise, return
9 kernel symbols in TABLE. TABLE must be large enough to hold all
10 kernel symbols. */
11 extern int get_kernel_syms __P((struct kernel_sym * table));
13 /* Create a new module of name MODULE_NAME and of size SIZE bytes.
14 The return address is the starting address of the new module or -1L
15 if the module cannot be created (the return value needs to be cast
16 to (long) to detect the error condition). */
17 extern unsigned long create_module __P((const char * module_name,
18 size_t size));
20 /* Initialize the module called MODULE_NAME with the CONTENTSSIZE
21 bytes starting at address CONTENTS. CONTENTS normally contains the
22 text and data segment of the module (the bss is implicity zeroed).
23 After copying the contents, the function pointed to by
24 ROUTINES.init is executed. When the module is no longer needed,
25 ROUTINES.cleanup is executed. SYMTAB is NULL if the module does
26 not want to export symbols by itself, or a pointer to a symbol
27 table if the module wants to register its own symbols. */
28 extern int init_module __P((const char * module_name,
29 const void * contents, size_t contentssize,
30 struct mod_routines * routines,
31 struct symbol_table * symtab));
33 /* Delete the module named MODULE_NAME from the kernel. */
34 extern int delete_module __P((const char *module_name));
36 #endif /* _SYS_MODULE_H */