hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/tools/objtool/special.h
....@@ -1,31 +1,23 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Copyright (C) 2015 Josh Poimboeuf <jpoimboe@redhat.com>
3
- *
4
- * This program is free software; you can redistribute it and/or
5
- * modify it under the terms of the GNU General Public License
6
- * as published by the Free Software Foundation; either version 2
7
- * of the License, or (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License
15
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
164 */
175
186 #ifndef _SPECIAL_H
197 #define _SPECIAL_H
208
219 #include <stdbool.h>
10
+#include "check.h"
2211 #include "elf.h"
12
+
13
+#define C_JUMP_TABLE_SECTION ".rodata..c_jump_table"
2314
2415 struct special_alt {
2516 struct list_head list;
2617
2718 bool group;
2819 bool skip_orig;
20
+ bool skip_alt;
2921 bool jump_or_nop;
3022
3123 struct section *orig_sec;
....@@ -39,4 +31,11 @@
3931
4032 int special_get_alts(struct elf *elf, struct list_head *alts);
4133
34
+void arch_handle_alternative(unsigned short feature, struct special_alt *alt);
35
+
36
+bool arch_support_alt_relocation(struct special_alt *special_alt,
37
+ struct instruction *insn,
38
+ struct reloc *reloc);
39
+struct reloc *arch_find_switch_table(struct objtool_file *file,
40
+ struct instruction *insn);
4241 #endif /* _SPECIAL_H */