summaryrefslogtreecommitdiffstats
path: root/tools/objtool/elf.h
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2020-06-08 19:14:49 +0200
committerTony Lindgren <tony@atomide.com>2020-06-08 19:14:49 +0200
commit4263eb6880df8383fff0efb872278a99eb6142c8 (patch)
tree67ab9bf228e4f5f341f9408e055180932b39fe06 /tools/objtool/elf.h
parentbus: ti-sysc: Increase max softreset wait (diff)
parentARM: dts: dra7-evm-common: Fix duplicate mailbox nodes (diff)
downloadlinux-4263eb6880df8383fff0efb872278a99eb6142c8.tar.xz
linux-4263eb6880df8383fff0efb872278a99eb6142c8.zip
Merge branch 'fixes-v5.7' into fixes
Diffstat (limited to 'tools/objtool/elf.h')
-rw-r--r--tools/objtool/elf.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/objtool/elf.h b/tools/objtool/elf.h
index ebbb10c61e24..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)
@@ -99,7 +100,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);