blob: 33783abc377bfb5333a8da30601134f4265dbcea [file] [log] [blame]
Thomas Gleixnerb4d0d232019-05-20 19:08:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Rusty Russell106a4ee2012-09-26 10:09:40 +01002/* Module internals
3 *
4 * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
5 * Written by David Howells (dhowells@redhat.com)
Rusty Russell106a4ee2012-09-26 10:09:40 +01006 */
7
Jessica Yuf314dfe2018-06-29 16:37:08 +02008#include <linux/elf.h>
9#include <asm/module.h>
10
11struct load_info {
12 const char *name;
13 /* pointer to module in temporary copy, freed at end of load_module() */
14 struct module *mod;
15 Elf_Ehdr *hdr;
16 unsigned long len;
17 Elf_Shdr *sechdrs;
18 char *secstrings, *strtab;
Eugene Loh1c7651f2019-02-25 11:59:58 -080019 unsigned long symoffs, stroffs, init_typeoffs, core_typeoffs;
Jessica Yuf314dfe2018-06-29 16:37:08 +020020 struct _ddebug *debug;
21 unsigned int num_debug;
22 bool sig_ok;
23#ifdef CONFIG_KALLSYMS
24 unsigned long mod_kallsyms_init_off;
25#endif
26 struct {
27 unsigned int sym, str, mod, vers, info, pcpu;
28 } index;
29};
30
31extern int mod_verify_sig(const void *mod, struct load_info *info);