blob: 7efc43f221744797d7899c6309e5c47c1122e1f7 [file] [log] [blame]
Matt Helsleyd37c90d2020-05-19 13:55:32 -07001/* 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 "elf.h"
14
15struct objtool_file {
16 struct elf *elf;
17 struct list_head insn_list;
18 DECLARE_HASHTABLE(insn_hash, 20);
Josh Poimboeuf1e7e4782020-08-18 15:57:45 +020019 struct list_head static_call_list;
Matt Helsleyd37c90d2020-05-19 13:55:32 -070020 bool ignore_unreachables, c_file, hints, rodata;
21};
22
Julien Thierry6545eb02020-08-25 13:47:39 +010023struct objtool_file *objtool_open_read(const char *_objname);
24
25int check(struct objtool_file *file, bool orc);
Matt Helsley0decf1f2020-05-19 13:55:33 -070026int orc_dump(const char *objname);
27int create_orc(struct objtool_file *file);
28int create_orc_sections(struct objtool_file *file);
29
Matt Helsleyd37c90d2020-05-19 13:55:32 -070030#endif /* _OBJTOOL_H */