~ [ 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 "elf.h"
 12 #include "cfi.h"
 13 
 14 #define INSN_JUMP_CONDITIONAL   1
 15 #define INSN_JUMP_UNCONDITIONAL 2
 16 #define INSN_JUMP_DYNAMIC       3
 17 #define INSN_CALL               4
 18 #define INSN_CALL_DYNAMIC       5
 19 #define INSN_RETURN             6
 20 #define INSN_CONTEXT_SWITCH     7
 21 #define INSN_STACK              8
 22 #define INSN_BUG                9
 23 #define INSN_NOP                10
 24 #define INSN_STAC               11
 25 #define INSN_CLAC               12
 26 #define INSN_STD                13
 27 #define INSN_CLD                14
 28 #define INSN_OTHER              15
 29 #define INSN_LAST               INSN_OTHER
 30 
 31 enum op_dest_type {
 32         OP_DEST_REG,
 33         OP_DEST_REG_INDIRECT,
 34         OP_DEST_MEM,
 35         OP_DEST_PUSH,
 36         OP_DEST_PUSHF,
 37         OP_DEST_LEAVE,
 38 };
 39 
 40 struct op_dest {
 41         enum op_dest_type type;
 42         unsigned char reg;
 43         int offset;
 44 };
 45 
 46 enum op_src_type {
 47         OP_SRC_REG,
 48         OP_SRC_REG_INDIRECT,
 49         OP_SRC_CONST,
 50         OP_SRC_POP,
 51         OP_SRC_POPF,
 52         OP_SRC_ADD,
 53         OP_SRC_AND,
 54 };
 55 
 56 struct op_src {
 57         enum op_src_type type;
 58         unsigned char reg;
 59         int offset;
 60 };
 61 
 62 struct stack_op {
 63         struct op_dest dest;
 64         struct op_src src;
 65 };
 66 
 67 void arch_initial_func_cfi_state(struct cfi_state *state);
 68 
 69 int arch_decode_instruction(struct elf *elf, struct section *sec,
 70                             unsigned long offset, unsigned int maxlen,
 71                             unsigned int *len, unsigned char *type,
 72                             unsigned long *immediate, struct stack_op *op);
 73 
 74 bool arch_callee_saved_reg(unsigned char reg);
 75 
 76 #endif /* _ARCH_H */
 77 

~ [ 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