提交 9b3e59e3 编写于 作者: L Linus Torvalds

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
...@@ -105,7 +105,7 @@ static int symbol_by_offset(const void *key, const struct rb_node *node) ...@@ -105,7 +105,7 @@ static int symbol_by_offset(const void *key, const struct rb_node *node)
if (*o < s->offset) if (*o < s->offset)
return -1; return -1;
if (*o > s->offset + s->len) if (*o >= s->offset + s->len)
return 1; return 1;
return 0; return 0;
......
...@@ -99,7 +99,7 @@ static inline u32 sec_offset_hash(struct section *sec, unsigned long offset) ...@@ -99,7 +99,7 @@ static inline u32 sec_offset_hash(struct section *sec, unsigned long offset)
offset &= OFFSET_STRIDE_MASK; offset &= OFFSET_STRIDE_MASK;
ol = offset; ol = offset;
oh = offset >> 32; oh = (offset >> 16) >> 16;
__jhash_mix(ol, oh, idx); __jhash_mix(ol, oh, idx);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册