.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * 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/>. |
---|
16 | 4 | */ |
---|
17 | 5 | |
---|
18 | 6 | #ifndef _SPECIAL_H |
---|
19 | 7 | #define _SPECIAL_H |
---|
20 | 8 | |
---|
21 | 9 | #include <stdbool.h> |
---|
| 10 | +#include "check.h" |
---|
22 | 11 | #include "elf.h" |
---|
| 12 | + |
---|
| 13 | +#define C_JUMP_TABLE_SECTION ".rodata..c_jump_table" |
---|
23 | 14 | |
---|
24 | 15 | struct special_alt { |
---|
25 | 16 | struct list_head list; |
---|
26 | 17 | |
---|
27 | 18 | bool group; |
---|
28 | 19 | bool skip_orig; |
---|
| 20 | + bool skip_alt; |
---|
29 | 21 | bool jump_or_nop; |
---|
30 | 22 | |
---|
31 | 23 | struct section *orig_sec; |
---|
.. | .. |
---|
39 | 31 | |
---|
40 | 32 | int special_get_alts(struct elf *elf, struct list_head *alts); |
---|
41 | 33 | |
---|
| 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); |
---|
42 | 41 | #endif /* _SPECIAL_H */ |
---|