// SPDX-License-Identifier: GPL-2.0-only /* * Kernel module loader for Hexagon * * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
*/
/* * module_frob_arch_sections - tweak got/plt sections. * @hdr - pointer to elf header * @sechdrs - pointer to elf load section headers * @secstrings - symbol names * @mod - pointer to module
*/ int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, char *secstrings, struct module *mod)
{ unsignedint i; int found = 0;
/* Look for .plt and/or .got.plt and/or .init.plt sections */ for (i = 0; i < hdr->e_shnum; i++) {
DEBUGP("Section %d is %s\n", i,
secstrings + sechdrs[i].sh_name); if (strcmp(secstrings + sechdrs[i].sh_name, ".plt") == 0)
found = i+1; if (strcmp(secstrings + sechdrs[i].sh_name, ".got.plt") == 0)
found = i+1; if (strcmp(secstrings + sechdrs[i].sh_name, ".rela.plt") == 0)
found = i+1;
}
/* At this time, we don't support modules comiled with -shared */ if (found) {
printk(KERN_WARNING "Module '%s' contains unexpected .plt/.got sections.\n",
mod->name); /* return -ENOEXEC; */
}
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.