]> www.infradead.org Git - users/dwmw2/linux.git/commit
objtool: Rework the elf_rebuild_reloc_section() logic
authorPeter Zijlstra <peterz@infradead.org>
Fri, 26 Mar 2021 15:12:06 +0000 (16:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Jul 2022 09:26:14 +0000 (11:26 +0200)
commitc9049cf4804ab6f2b73d4cc244c3e2f6e0a9f10e
tree43d001c4adafe8af3de935b85abc59e320fa665d
parentd42fa5bf19fc04833f3c27e9555051c428422248
objtool: Rework the elf_rebuild_reloc_section() logic

commit 3a647607b57ad8346e659ddd3b951ac292c83690 upstream.

Instead of manually calling elf_rebuild_reloc_section() on sections
we've called elf_add_reloc() on, have elf_write() DTRT.

This makes it easier to add random relocations in places without
carefully tracking when we're done and need to flush what section.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Link: https://lkml.kernel.org/r/20210326151259.754213408@infradead.org
[bwh: Backported to 5.10: drop changes in create_mcount_loc_sections()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/objtool/check.c
tools/objtool/elf.c
tools/objtool/elf.h
tools/objtool/orc_gen.c