Skip to content

Commit 9b3e59e

Browse files
committed
Merge tag 'objtool-urgent-2020-04-25' of git://git.kernel.org/pub/scm/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
2 parents ab51cac + 7f9b34f commit 9b3e59e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/objtool/elf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static int symbol_by_offset(const void *key, const struct rb_node *node)
105105

106106
if (*o < s->offset)
107107
return -1;
108-
if (*o > s->offset + s->len)
108+
if (*o >= s->offset + s->len)
109109
return 1;
110110

111111
return 0;

tools/objtool/elf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static inline u32 sec_offset_hash(struct section *sec, unsigned long offset)
9999
offset &= OFFSET_STRIDE_MASK;
100100

101101
ol = offset;
102-
oh = offset >> 32;
102+
oh = (offset >> 16) >> 16;
103103

104104
__jhash_mix(ol, oh, idx);
105105

0 commit comments

Comments
 (0)