objtool: Get rid of reloc->idx
authorJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 30 May 2023 17:21:05 +0000 (10:21 -0700)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Wed, 7 Jun 2023 17:03:21 +0000 (10:03 -0700)
commitbe9a4c116824c39720001db5bc45fe7528b26cff
treebaceb62de9286ebccbf559a181020ab002ab5cdf
parentebcef730a19ba7ca446169f391d2e51722d68043
objtool: Get rid of reloc->idx

Use the array offset to calculate the reloc index.

With allyesconfig + CONFIG_DEBUG_INFO:

- Before: peak heap memory consumption: 45.56G
- After:  peak heap memory consumption: 43.83G

Link: https://lore.kernel.org/r/7351d2ebad0519027db14a32f6204af84952574a.1685464332.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
tools/objtool/elf.c
tools/objtool/include/objtool/elf.h