tools/objtool/include/objtool/check.h
Source file repositories/reference/linux-study-clean/tools/objtool/include/objtool/check.h
File Facts
- System
- Linux kernel
- Corpus path
tools/objtool/include/objtool/check.h- Extension
.h- Size
- 4635 bytes
- Lines
- 193
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
stdbool.hobjtool/cfi.hobjtool/arch.h
Detected Declarations
struct insn_statestruct alt_groupstruct alternativestruct instructionenum alternative_typefunction is_static_jumpfunction is_dynamic_jumpfunction is_jump
Annotated Snippet
struct insn_state {
struct cfi_state cfi;
unsigned int uaccess_stack;
bool uaccess;
bool df;
bool noinstr;
s8 instr;
};
struct alt_group {
/*
* Pointer from a replacement group to the original group. NULL if it
* *is* the original group.
*/
struct alt_group *orig_group;
/* First and last instructions in the group */
struct instruction *first_insn, *last_insn, *nop;
/*
* Byte-offset-addressed len-sized array of pointers to CFI structs.
* This is shared with the other alt_groups in the same alternative.
*/
struct cfi_state **cfi;
bool ignore;
unsigned int feature;
};
enum alternative_type {
ALT_TYPE_INSTRUCTIONS,
ALT_TYPE_JUMP_TABLE,
ALT_TYPE_EX_TABLE,
};
struct alternative {
struct alternative *next;
struct instruction *insn;
enum alternative_type type;
};
#define INSN_CHUNK_BITS 8
#define INSN_CHUNK_SIZE (1 << INSN_CHUNK_BITS)
#define INSN_CHUNK_MAX (INSN_CHUNK_SIZE - 1)
struct instruction {
struct hlist_node hash;
struct list_head call_node;
struct section *sec;
unsigned long offset;
unsigned long immediate;
u8 len;
u8 prev_len;
u8 type;
s8 instr;
u32 idx : INSN_CHUNK_BITS,
immediate_len : 4,
dead_end : 1,
ignore_alts : 1,
hint : 1,
save : 1,
restore : 1,
retpoline_safe : 1,
noendbr : 1,
unret : 1,
visited : 4,
no_reloc : 1,
hole : 1,
fake : 1,
trace : 1;
/* 4 bit hole */
struct alt_group *alt_group;
struct instruction *jump_dest;
struct instruction *first_jump_src;
union {
struct symbol *_call_dest;
struct {
struct reloc *_jump_table;
unsigned long _jump_table_size;
};
};
struct alternative *alts;
struct symbol *_sym;
struct stack_op *stack_ops;
struct cfi_state *cfi;
};
Annotation
- Immediate include surface: `stdbool.h`, `objtool/cfi.h`, `objtool/arch.h`.
- Detected declarations: `struct insn_state`, `struct alt_group`, `struct alternative`, `struct instruction`, `enum alternative_type`, `function is_static_jump`, `function is_dynamic_jump`, `function is_jump`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.