1 #ifndef MODINITTOOLS_MODULEOPS_H
2 #define MODINITTOOLS_MODULEOPS_H
7 /* All the icky stuff to do with manipulating 64 and 32-bit modules
12 char name
[64 - sizeof(uint32_t)];
18 char name
[64 - sizeof(uint64_t)];
26 const struct module_ops
*ops
;
31 /* File contents and length. */
36 /* Tables extracted from module by ops->fetch_tables(). */
39 unsigned int pci_size
;
41 unsigned int usb_size
;
43 unsigned int ieee1394_size
;
45 unsigned int ccw_size
;
47 unsigned int pnp_size
;
49 unsigned int pnp_card_size
;
50 unsigned int pnp_card_offset
;
52 unsigned int input_size
;
54 unsigned int input_table_size
;
55 unsigned int serio_size
;
63 void *(*load_section
)(struct elf_file
*module
,
64 const char *secname
, unsigned long *secsize
);
65 struct string_table
*(*load_strings
)(struct elf_file
*module
,
66 const char *secname
, struct string_table
*tbl
);
67 struct string_table
*(*load_symbols
)(struct elf_file
*module
,
69 struct string_table
*(*load_dep_syms
)(struct elf_file
*module
,
70 struct string_table
**types
, uint64_t **versions
);
71 void (*fetch_tables
)(struct elf_file
*module
,
72 struct module_tables
*tables
);
73 char *(*get_aliases
)(struct elf_file
*module
, unsigned long *size
);
74 char *(*get_modinfo
)(struct elf_file
*module
, unsigned long *size
);
75 void (*strip_section
)(struct elf_file
*module
, const char *secname
);
76 int (*dump_modvers
)(struct elf_file
*module
);
79 extern const struct module_ops mod_ops32
, mod_ops64
;
81 struct elf_file
*grab_elf_file(const char *pathname
);
82 void release_elf_file(struct elf_file
*file
);
84 #endif /* MODINITTOOLS_MODULEOPS_H */