Skip to content
Commit d33b9035 authored by Peter Zijlstra's avatar Peter Zijlstra
Browse files

objtool: Improve reloc hash size guestimate



Nathan reported that LLVM ThinLTO builds have a performance regression
with commit 25cf0d8a ("objtool: Rewrite hashtable sizing"). Sami
was quick to note that this is due to their use of -ffunction-sections.

As a result the .text section is small and basing the number of relocs
off of that no longer works. Instead have read_sections() compute the
sum of all SHF_EXECINSTR sections and use that.

Fixes: 25cf0d8a ("objtool: Rewrite hashtable sizing")
Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
Debugged-by: default avatarSami Tolvanen <samitolvanen@google.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
Link: https://lkml.kernel.org/r/YMJpGLuGNsGtA5JJ@hirez.programming.kicks-ass.net
parent c199f64f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment