diff options
Diffstat (limited to 'tools/objtool')
-rw-r--r-- | tools/objtool/check.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 87e528c2840c..923652ba5f9a 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -34,9 +34,10 @@ struct instruction *find_insn(struct objtool_file *file, { struct instruction *insn; - hash_for_each_possible(file->insn_hash, insn, hash, offset) + hash_for_each_possible(file->insn_hash, insn, hash, sec_offset_hash(sec, offset)) { if (insn->sec == sec && insn->offset == offset) return insn; + } return NULL; } @@ -282,7 +283,7 @@ static int decode_instructions(struct objtool_file *file) if (ret) goto err; - hash_add(file->insn_hash, &insn->hash, insn->offset); + hash_add(file->insn_hash, &insn->hash, sec_offset_hash(sec, insn->offset)); list_add_tail(&insn->list, &file->insn_list); nr_insns++; } |