1 #ifndef MODINITTOOLS_MODULEOPS_H
2 #define MODINITTOOLS_MODULEOPS_H
7 /* All the icky stuff to do with manipulating 64 and 32-bit modules
9 struct kernel_symbol32
{
14 struct kernel_symbol64
{
22 char name
[64 - sizeof(uint32_t)];
28 char name
[64 - sizeof(uint64_t)];
36 struct module_ops
*ops
;
41 /* File contents and length. */
46 /* Tables extracted from module by ops->fetch_tables(). */
49 unsigned int pci_size
;
51 unsigned int usb_size
;
53 unsigned int ieee1394_size
;
55 unsigned int ccw_size
;
57 unsigned int pnp_size
;
59 unsigned int pnp_card_size
;
60 unsigned int pnp_card_offset
;
62 unsigned int input_size
;
64 unsigned int input_table_size
;
65 unsigned int serio_size
;
73 void *(*load_section
)(struct elf_file
*module
,
74 const char *secname
, unsigned long *secsize
);
75 struct string_table
*(*load_strings
)(struct elf_file
*module
,
76 const char *secname
, struct string_table
*tbl
, errfn_t error
);
77 struct string_table
*(*load_symbols
)(struct elf_file
*module
);
78 struct string_table
*(*load_dep_syms
)(const char *pathname
,
79 struct elf_file
*module
, struct string_table
**types
);
80 void (*fetch_tables
)(struct elf_file
*module
,
81 struct module_tables
*tables
);
82 char *(*get_aliases
)(struct elf_file
*module
, unsigned long *size
);
83 char *(*get_modinfo
)(struct elf_file
*module
, unsigned long *size
);
84 void (*strip_section
)(struct elf_file
*module
, const char *secname
);
85 int (*dump_modvers
)(struct elf_file
*module
);
88 extern struct module_ops mod_ops32
, mod_ops64
;
90 struct elf_file
*grab_elf_file(const char *pathname
);
91 struct elf_file
*grab_elf_file_fd(const char *pathname
, int fd
);
92 void release_elf_file(struct elf_file
*file
);
94 #endif /* MODINITTOOLS_MODULEOPS_H */