~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/objtool/arch.h

Version: ~ [ linux-6.6-rc1 ] ~ [ linux-6.5.2 ] ~ [ linux-6.4.15 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.52 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.131 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.194 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.256 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.294 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.325 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  * Copyright (C) 2015 Josh Poimboeuf <jpoimboe@redhat.com>
  4  */
  5 
  6 #ifndef _ARCH_H
  7 #define _ARCH_H
  8 
  9 #include <stdbool.h>
 10 #include <linux/list.h>
 11 #include "objtool.h"
 12 #include "cfi.h"
 13 
 14 #include <asm/orc_types.h>
 15 
 16 enum insn_type {
 17         INSN_JUMP_CONDITIONAL,
 18         INSN_JUMP_UNCONDITIONAL,
 19         INSN_JUMP_DYNAMIC,
 20         INSN_JUMP_DYNAMIC_CONDITIONAL,
 21         INSN_CALL,
 22         INSN_CALL_DYNAMIC,
 23         INSN_RETURN,
 24         INSN_CONTEXT_SWITCH,
 25         INSN_BUG,
 26         INSN_NOP,
 27         INSN_STAC,
 28         INSN_CLAC,
 29         INSN_STD,
 30         INSN_CLD,
 31         INSN_OTHER,
 32 };
 33 
 34 enum op_dest_type {
 35         OP_DEST_REG,
 36         OP_DEST_REG_INDIRECT,
 37         OP_DEST_MEM,
 38         OP_DEST_PUSH,
 39         OP_DEST_PUSHF,
 40         OP_DEST_LEAVE,
 41 };
 42 
 43 struct op_dest {
 44         enum op_dest_type type;
 45         unsigned char reg;
 46         int offset;
 47 };
 48 
 49 enum op_src_type {
 50         OP_SRC_REG,
 51         OP_SRC_REG_INDIRECT,
 52         OP_SRC_CONST,
 53         OP_SRC_POP,
 54         OP_SRC_POPF,
 55         OP_SRC_ADD,
 56         OP_SRC_AND,
 57 };
 58 
 59 struct op_src {
 60         enum op_src_type type;
 61         unsigned char reg;
 62         int offset;
 63 };
 64 
 65 struct stack_op {
 66         struct op_dest dest;
 67         struct op_src src;
 68         struct list_head list;
 69 };
 70 
 71 struct instruction;
 72 
 73 void arch_initial_func_cfi_state(struct cfi_init_state *state);
 74 
 75 int arch_decode_instruction(const struct elf *elf, const struct section *sec,
 76                             unsigned long offset, unsigned int maxlen,
 77                             unsigned int *len, enum insn_type *type,
 78                             unsigned long *immediate,
 79                             struct list_head *ops_list);
 80 
 81 bool arch_callee_saved_reg(unsigned char reg);
 82 
 83 unsigned long arch_jump_destination(struct instruction *insn);
 84 
 85 unsigned long arch_dest_reloc_offset(int addend);
 86 
 87 const char *arch_nop_insn(int len);
 88 
 89 #endif /* _ARCH_H */
 90 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp