diff options
author | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-10-11 21:56:03 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-10-11 21:56:03 +0200 |
commit | afaaf9a5d9f86c7d5910ae4bd801ad22df186de6 (patch) | |
tree | 10fcd11875c5500e733ebe84056fa78064b3aaeb /include/module.h | |
parent | 90f72b1520c89c7a52129a9fa91a3c349c269041 (diff) | |
download | barebox-afaaf9a5d9f86c7d5910ae4bd801ad22df186de6.tar.gz barebox-afaaf9a5d9f86c7d5910ae4bd801ad22df186de6.tar.xz |
Add big #ifdef CONFIG_MODULE around module.h to build architectures
which do not have modules.
Diffstat (limited to 'include/module.h')
-rw-r--r-- | include/module.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/module.h b/include/module.h index f24b983836..8d3bbf2160 100644 --- a/include/module.h +++ b/include/module.h @@ -2,14 +2,18 @@ #define __MODULE_H #include <elf.h> -#include <asm/module.h> #include <compiler.h> +#include <list.h> #ifndef MODULE_SYMBOL_PREFIX #define MODULE_SYMBOL_PREFIX #endif +#define MODULE_NAME_LEN (64 - sizeof(unsigned long)) + #ifdef CONFIG_MODULES +#include <asm/module.h> + struct kernel_symbol { unsigned long value; @@ -29,12 +33,10 @@ struct kernel_symbol #define EXPORT_SYMBOL(sym) \ __EXPORT_SYMBOL(sym, "") -#else -#define EXPORT_SYMBOL(sym) -#endif struct module { - char *name; + /* Unique handle for this module */ + char name[MODULE_NAME_LEN]; /* Startup function. */ int (*init)(void); @@ -46,6 +48,8 @@ struct module { struct mod_arch_specific arch; unsigned long core_size; + + struct list_head list; }; /* Apply the given relocation to the (simplified) ELF. Return -error @@ -63,6 +67,9 @@ int apply_relocate_add(Elf_Shdr *sechdrs, unsigned int symindex, unsigned int relsec, struct module *mod); +#else +#define EXPORT_SYMBOL(sym) +#endif /* CONFIG_MODULE */ #endif /* __MODULE_H */ |