module-internal.h 959 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* Module internals
  2. *
  3. * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. #include <linux/elf.h>
  12. #include <asm/module.h>
  13. struct load_info {
  14. const char *name;
  15. /* pointer to module in temporary copy, freed at end of load_module() */
  16. struct module *mod;
  17. Elf_Ehdr *hdr;
  18. unsigned long len;
  19. Elf_Shdr *sechdrs;
  20. char *secstrings, *strtab;
  21. unsigned long symoffs, stroffs;
  22. struct _ddebug *debug;
  23. unsigned int num_debug;
  24. bool sig_ok;
  25. #ifdef CONFIG_KALLSYMS
  26. unsigned long mod_kallsyms_init_off;
  27. #endif
  28. struct {
  29. unsigned int sym, str, mod, vers, info, pcpu;
  30. } index;
  31. };
  32. extern int mod_verify_sig(const void *mod, struct load_info *info);