diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-03-26 18:12:06 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-04-02 13:43:32 +0300 |
commit | 3a647607b57ad8346e659ddd3b951ac292c83690 (patch) | |
tree | 9a0904266e179db196aa6ec050a4a359079fa5b5 /tools/objtool/orc_gen.c | |
parent | a958c4fea768d2c378c89032ab41d38da2a24422 (diff) | |
download | linux-3a647607b57ad8346e659ddd3b951ac292c83690.tar.xz |
objtool: Rework the elf_rebuild_reloc_section() logic
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
Diffstat (limited to 'tools/objtool/orc_gen.c')
-rw-r--r-- | tools/objtool/orc_gen.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/tools/objtool/orc_gen.c b/tools/objtool/orc_gen.c index 738aa5021bc4..f5347089550e 100644 --- a/tools/objtool/orc_gen.c +++ b/tools/objtool/orc_gen.c @@ -254,8 +254,5 @@ int orc_create(struct objtool_file *file) return -1; } - if (elf_rebuild_reloc_section(file->elf, ip_rsec)) - return -1; - return 0; } |