module-internal.h 782 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /* Module internals
  3. *
  4. * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
  5. * Written by David Howells (dhowells@redhat.com)
  6. */
  7. #include <linux/elf.h>
  8. #include <asm/module.h>
  9. struct load_info {
  10. const char *name;
  11. /* pointer to module in temporary copy, freed at end of load_module() */
  12. struct module *mod;
  13. Elf_Ehdr *hdr;
  14. unsigned long len;
  15. Elf_Shdr *sechdrs;
  16. char *secstrings, *strtab;
  17. unsigned long symoffs, stroffs, init_typeoffs, core_typeoffs;
  18. struct _ddebug *debug;
  19. unsigned int num_debug;
  20. bool sig_ok;
  21. #ifdef CONFIG_KALLSYMS
  22. unsigned long mod_kallsyms_init_off;
  23. #endif
  24. struct {
  25. unsigned int sym, str, mod, vers, info, pcpu;
  26. } index;
  27. };
  28. extern int mod_verify_sig(const void *mod, struct load_info *info);