struct module_attribute attr[0];
};
+/* Similar stuff for section attributes. */
+#define MODULE_SECT_NAME_LEN 32
+struct module_sect_attr
+{
+ struct attribute attr;
+ char name[MODULE_SECT_NAME_LEN];
+ unsigned long address;
+};
+
+struct module_sections
+{
+ struct kobject kobj;
+ struct module_sect_attr attrs[0];
+};
+
+
struct module
{
enum module_state state;
Elf_Sym *symtab;
unsigned long num_symtab;
char *strtab;
+
+ /* Section attributes */
+ struct module_sections *sect_attrs;
#endif
/* Per-cpu data. */
return mod->state != MODULE_STATE_GOING;
}
-/* Is this address in a module? */
+/* Is this address in a module? (second is with no locks, for oops) */
struct module *module_text_address(unsigned long addr);
+struct module *__module_text_address(unsigned long addr);
/* Returns module and fills in value, defined and namebuf, or NULL if
symnum out of range. */
return NULL;
}
+/* Is this address in a module? (don't take a lock, we're oopsing) */
+static inline struct module *__module_text_address(unsigned long addr)
+{
+ return NULL;
+}
+
/* Get/put a kernel symbol (calls should be symmetric) */
#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
#define symbol_put(x) do { } while(0)