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: NNathan Chancellor <nathan@kernel.org> Debugged-by: NSami Tolvanen <samitolvanen@google.com> Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Tested-by: NNathan Chancellor <nathan@kernel.org> Link: https://lkml.kernel.org/r/YMJpGLuGNsGtA5JJ@hirez.programming.kicks-ass.net
Showing
想要评论请 注册 或 登录