objtool.h 768 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Copyright (C) 2020 Matt Helsley <mhelsley@vmware.com>
  4. */
  5. #ifndef _OBJTOOL_H
  6. #define _OBJTOOL_H
  7. #include <stdbool.h>
  8. #include <linux/list.h>
  9. #include <linux/hashtable.h>
  10. #include "elf.h"
  11. #define __weak __attribute__((weak))
  12. struct objtool_file {
  13. struct elf *elf;
  14. struct list_head insn_list;
  15. DECLARE_HASHTABLE(insn_hash, 20);
  16. struct list_head static_call_list;
  17. struct list_head mcount_loc_list;
  18. bool ignore_unreachables, c_file, hints, rodata;
  19. };
  20. struct objtool_file *objtool_open_read(const char *_objname);
  21. int check(struct objtool_file *file);
  22. int orc_dump(const char *objname);
  23. int create_orc(struct objtool_file *file);
  24. int create_orc_sections(struct objtool_file *file);
  25. #endif /* _OBJTOOL_H */