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

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

Version: ~ [ linux-6.4-rc3 ] ~ [ linux-6.3.4 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.30 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.113 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.180 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.243 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.283 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.315 ] ~ [ 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) 2017 Josh Poimboeuf <jpoimboe@redhat.com>
  4  */
  5 
  6 #ifndef _CHECK_H
  7 #define _CHECK_H
  8 
  9 #include <stdbool.h>
 10 #include "cfi.h"
 11 #include "arch.h"
 12 
 13 struct insn_state {
 14         struct cfi_state cfi;
 15         unsigned int uaccess_stack;
 16         bool uaccess;
 17         bool df;
 18         bool noinstr;
 19         s8 instr;
 20 };
 21 
 22 struct instruction {
 23         struct list_head list;
 24         struct hlist_node hash;
 25         struct section *sec;
 26         unsigned long offset;
 27         unsigned int len;
 28         enum insn_type type;
 29         unsigned long immediate;
 30         bool dead_end, ignore, ignore_alts;
 31         bool hint;
 32         bool retpoline_safe;
 33         s8 instr;
 34         u8 visited;
 35         u8 ret_offset;
 36         int alt_group;
 37         struct symbol *call_dest;
 38         struct instruction *jump_dest;
 39         struct instruction *first_jump_src;
 40         struct reloc *jump_table;
 41         struct list_head alts;
 42         struct symbol *func;
 43         struct list_head stack_ops;
 44         struct cfi_state cfi;
 45         struct orc_entry orc;
 46 };
 47 
 48 struct instruction *find_insn(struct objtool_file *file,
 49                               struct section *sec, unsigned long offset);
 50 
 51 #define for_each_insn(file, insn)                                       \
 52         list_for_each_entry(insn, &file->insn_list, list)
 53 
 54 #define sec_for_each_insn(file, sec, insn)                              \
 55         for (insn = find_insn(file, sec, 0);                            \
 56              insn && &insn->list != &file->insn_list &&                 \
 57                         insn->sec == sec;                               \
 58              insn = list_next_entry(insn, list))
 59 
 60 
 61 #endif /* _CHECK_H */
 62 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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