• Home
  • Raw
  • Download

Lines Matching full:module

2  * syslinux/module.h
18 #include <i386/module.h>
20 #include <x86_64/module.h>
26 * The maximum length of the module file name (including path), stored
27 * in the struct module descriptor.
54 * A module may have multiple routines that need to be executed before
61 * struct elf_module - structure encapsulating a module loaded in memory.
63 * Each SYSLINUX ELF module must have an associated struct elf_module descriptor
65 * resources needed by the module itself or by other modules that depend on it.
74 * symbol information from the root COM32 module loaded by the SYSLINUX core.
79 * Module descriptors are related to each other through dependency information. A module
88 char name[MODULE_NAME_SIZE]; // The module name
90 bool shallow; // Whether the module contains any code
93 struct list_head dependants; // Head of module dependants list
94 struct list_head list; // The list entry in the module list
96 module_ctor_t *ctors; // module constructors
97 module_ctor_t *dtors; // module destructors
100 void *module_addr; // The module location in the memory
101 Elf_Addr base_addr; // The base address of the module
102 Elf_Word module_size; // The module size in memory
117 // Transient - Data available while the module is loading
130 // ELF DT_NEEDED entries for this module
136 * struct module_dep - structure encapsulating a module dependency need
139 * successors. The item contents is a pointer to the corresponding module descriptor.
144 struct elf_module *module; // The target module descriptor member
184 * module_current - return the module at the head of the module list.
195 * modules_init - initialize the module subsystem.
197 * This function must be called before any module operation is to be performed.
203 * modules_term - releases all resources pertaining to the module subsystem.
205 * This function should be called after all module operations.
211 * module_alloc - reserves space for a new module descriptor.
212 * @name: the file name of the module to be loaded.
214 * The function simply allocates a new module descriptor and initializes its fields
221 * module_load - loads a regular ELF module into memory.
222 * @module: the module descriptor returned by module_alloc.
224 * The function reads the module file, checks whether the file has a
226 * any symbol relocations. A module dependency is created automatically when the
227 * relocated symbol is defined in a different module.
230 * a non-zero value if an error occurs. Possible errors include invalid module
234 extern int module_load(struct elf_module *module);
238 * module_unload - unloads the module from the system.
239 * @module: the module descriptor structure.
241 * The function checks to see whether the module can be safely
246 * A module can be safely removed from the system when no other modules reference
249 extern int module_unload(struct elf_module *module);
252 * _module_unload - unloads the module without running destructors
253 * @module: the module descriptor structure.
256 * module's destructors are not executed.
258 extern int _module_unload(struct elf_module *module);
261 * get_module_type - get type of the module
262 * @module: the module descriptor structure.
264 * This function returns the type of module we're dealing with
265 * either a library module ( LIB_MODULE ), executable module ( EXEC_MODULE ),
267 * if the module has its main_func set ( in which case it's an executable ). In case
269 * library module. If this isn't the case either we don't know what it is so bail out
271 extern int get_module_type(struct elf_module *module);
274 * module_unloadable - checks whether the given module can be unloaded.
275 * @module: the module descriptor structure
277 * A module can be unloaded from the system when no other modules depend on it,
280 extern int module_unloadable(struct elf_module *module);
283 * module_find - searches for a module by its name.
284 * @name: the name of the module, as it was specified in module_alloc.
286 * The function returns a pointer to the module descriptor, if found, or
292 * module_find_symbol - searches for a symbol definition in a given module.
294 * @module: the module descriptor structure.
296 * The function searches the module symbol table for a symbol matching exactly
299 * - If a GNU hash table is present in the module, it is used to find the symbol.
310 extern Elf_Sym *module_find_symbol(const char *name, struct elf_module *module);
313 * global_find_symbol - searches for a symbol definition in the entire module namespace.
315 * @module: an optional (may be NULL) pointer to a module descriptor variable that
316 * will hold the module where the symbol was found.
319 * loaded in the system, in the reverse module loading order. That is, the most
320 * recently loaded module is searched first, followed by the previous one, until
321 * the first loaded module is reached.
323 * If no module contains the symbol, NULL is returned, otherwise the return value is
324 * a pointer to the symbol descriptor structure. If the module parameter is not NULL,
325 * it is filled with the address of the module descriptor where the symbol is defined.
327 extern Elf_Sym *global_find_symbol(const char *name, struct elf_module **module);
330 * module_get_absolute - converts an memory address relative to a module base address
333 * @module: the module whose base address is used for the conversion.
337 static inline void *module_get_absolute(Elf_Addr addr, struct elf_module *module) { in module_get_absolute() argument
338 return (void*)(module->base_addr + addr); in module_get_absolute()
342 * syslinux_current - get the current module process