diff options
Diffstat (limited to 'tools/objtool')
-rw-r--r-- | tools/objtool/check.c | 2 | ||||
-rw-r--r-- | tools/objtool/elf.h | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 0e8f9a32e4d1..3c6da70e6084 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -1460,7 +1460,7 @@ static int update_insn_state_regs(struct instruction *insn, struct insn_state *s struct cfi_reg *cfa = &state->cfa; struct stack_op *op = &insn->stack_op; - if (cfa->base != CFI_SP) + if (cfa->base != CFI_SP && cfa->base != CFI_SP_INDIRECT) return 0; /* push */ diff --git a/tools/objtool/elf.h b/tools/objtool/elf.h index 0b79c2353a21..12e01ac190ec 100644 --- a/tools/objtool/elf.h +++ b/tools/objtool/elf.h @@ -87,9 +87,10 @@ struct elf { #define OFFSET_STRIDE (1UL << OFFSET_STRIDE_BITS) #define OFFSET_STRIDE_MASK (~(OFFSET_STRIDE - 1)) -#define for_offset_range(_offset, _start, _end) \ - for (_offset = ((_start) & OFFSET_STRIDE_MASK); \ - _offset <= ((_end) & OFFSET_STRIDE_MASK); \ +#define for_offset_range(_offset, _start, _end) \ + for (_offset = ((_start) & OFFSET_STRIDE_MASK); \ + _offset >= ((_start) & OFFSET_STRIDE_MASK) && \ + _offset <= ((_end) & OFFSET_STRIDE_MASK); \ _offset += OFFSET_STRIDE) static inline u32 sec_offset_hash(struct section *sec, unsigned long offset) |