Skip to content

Commit

Permalink
Merge tag 'objtool-urgent-2020-04-25' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/linux/kernel/git/tip/tip

Pull objtool fixes from Ingo Molnar:
 "Two fixes: fix an off-by-one bug, and fix 32-bit builds on 64-bit
  systems"

* tag 'objtool-urgent-2020-04-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool: Fix off-by-one in symbol_by_offset()
  objtool: Fix 32bit cross builds
  • Loading branch information
Linus Torvalds committed Apr 25, 2020
2 parents ab51cac + 7f9b34f commit 9b3e59e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/objtool/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static int symbol_by_offset(const void *key, const struct rb_node *node)

if (*o < s->offset)
return -1;
if (*o > s->offset + s->len)
if (*o >= s->offset + s->len)
return 1;

return 0;
Expand Down
2 changes: 1 addition & 1 deletion tools/objtool/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static inline u32 sec_offset_hash(struct section *sec, unsigned long offset)
offset &= OFFSET_STRIDE_MASK;

ol = offset;
oh = offset >> 32;
oh = (offset >> 16) >> 16;

__jhash_mix(ol, oh, idx);

Expand Down

0 comments on commit 9b3e59e

Please sign in to comment.