]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - tools/objtool/include/objtool/objtool.h
UBUNTU: Ubuntu-5.15.0-39.42
[mirror_ubuntu-jammy-kernel.git] / tools / objtool / include / objtool / objtool.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Copyright (C) 2020 Matt Helsley <mhelsley@vmware.com>
4 */
5
6 #ifndef _OBJTOOL_H
7 #define _OBJTOOL_H
8
9 #include <stdbool.h>
10 #include <linux/list.h>
11 #include <linux/hashtable.h>
12
13 #include <objtool/elf.h>
14
15 #define __weak __attribute__((weak))
16
17 struct objtool_file {
18 struct elf *elf;
19 struct list_head insn_list;
20 DECLARE_HASHTABLE(insn_hash, 20);
21 struct list_head retpoline_call_list;
22 struct list_head static_call_list;
23 struct list_head mcount_loc_list;
24 bool ignore_unreachables, c_file, hints, rodata;
25
26 unsigned long jl_short, jl_long;
27 unsigned long jl_nop_short, jl_nop_long;
28 };
29
30 struct objtool_file *objtool_open_read(const char *_objname);
31
32 int check(struct objtool_file *file);
33 int orc_dump(const char *objname);
34 int orc_create(struct objtool_file *file);
35
36 #endif /* _OBJTOOL_H */