objtool: Allocate relocs in advance for new rela sections
authorJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 30 May 2023 17:21:03 +0000 (10:21 -0700)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Wed, 7 Jun 2023 17:03:20 +0000 (10:03 -0700)
commite0a9349b4c590145c6a83e6c9f7701cec42debbd
treec687b29b9e393fb9892da91a64f0adea575f6831
parentcaa4a6b74b405ddaea40e2946cc3983aac96451d
objtool: Allocate relocs in advance for new rela sections

Similar to read_relocs(), allocate the reloc structs all together in an
array rather than allocating them one at a time.

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