/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _LINUX_MODULELOADER_H #define _LINUX_MODULELOADER_H /* The stuff needed for archs to support modules. */
#include <linux/module.h> #include <linux/elf.h>
/* These may be implemented by architectures that need to hook into the *moduleloadercode.Architecturesthatdon'tneedtodoanythingspecial *canjustrelyonthe'weak'defaulthooksdefinedinkernel/module.c. *Note,however,thatatleastoneofapply_relocateorapply_relocate_add *mustbeimplementedbyeacharchitecture.
*/
/* arch may override to do additional checking of ELF header architecture */ bool module_elf_check_arch(Elf_Ehdr *hdr);
/* Adjust arch-specific sections. Return 0 on success. */ int module_frob_arch_sections(Elf_Ehdr *hdr,
Elf_Shdr *sechdrs, char *secstrings, struct module *mod);
/* Additional bytes needed by arch in front of individual sections */ unsignedint arch_mod_section_prepend(struct module *mod, unsignedint section);
/* Determines if the section name is an init section (that is only used during *moduleloading).
*/ bool module_init_section(constchar *name);
/* Determines if the section name is an exit section (that is only used during *moduleunloading)
*/ bool module_exit_section(constchar *name);
/* Describes whether within_module_init() will consider this an init section *ornot.ThisbehaviourchangeswithCONFIG_MODULE_UNLOAD.
*/ bool module_init_layout_section(constchar *sname);
/* Any final processing of module before access. Return -error or 0. */ int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.