/* * Persist ELF information about a module. Copy the ELF header, * section header table, section string table, and symtab section * index from info to mod->klp_info.
*/ int copy_module_elf(struct module *mod, struct load_info *info)
{ unsignedint size, symndx; int ret;
/* ELF section name string table */
size = info->sechdrs[info->hdr->e_shstrndx].sh_size;
mod->klp_info->secstrings = kmemdup(info->secstrings, size, GFP_KERNEL); if (!mod->klp_info->secstrings) {
ret = -ENOMEM; goto free_sechdrs;
}
/* ELF symbol section index */
symndx = info->index.sym;
mod->klp_info->symndx = symndx;
/* * For livepatch modules, core_kallsyms.symtab is a complete * copy of the original symbol table. Adjust sh_addr to point * to core_kallsyms.symtab since the copy of the symtab in module * init memory is freed at the end of do_init_module().
*/
mod->klp_info->sechdrs[symndx].sh_addr = (unsignedlong)mod->core_kallsyms.symtab;
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 ist noch experimentell.