objtool: Improve reloc hash size guestimate
Nathan reported that LLVM ThinLTO builds have a performance regression with commit25cf0d8aa2("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:25cf0d8aa2("objtool: Rewrite hashtable sizing") Reported-by: Nathan Chancellor <nathan@kernel.org> Debugged-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Nathan Chancellor <nathan@kernel.org> Link: https://lkml.kernel.org/r/YMJpGLuGNsGtA5JJ@hirez.programming.kicks-ass.net
This commit is contained in:
parent
c199f64ff9
commit
d33b9035e1
2 changed files with 5 additions and 7 deletions
|
|
@ -83,6 +83,7 @@ struct elf {
|
|||
int fd;
|
||||
bool changed;
|
||||
char *name;
|
||||
unsigned int text_size;
|
||||
struct list_head sections;
|
||||
|
||||
int symbol_bits;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue