summaryrefslogtreecommitdiff
path: root/tools/objtool/orc_gen.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-03-26 16:12:08 +0100
committerIngo Molnar <mingo@kernel.org>2021-04-02 12:44:37 +0200
commitd0c5c4cc73da0b05b0d9e5f833f2d859e1b45f8e (patch)
treeb9f0b2e78272ec8b314572c802645a87138535fa /tools/objtool/orc_gen.c
parentef47cc01cb4abcd760d8ac66b9361d6ade4d0846 (diff)
objtool: Create reloc sections implicitly
Have elf_add_reloc() create the relocation section implicitly. Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com> 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.880174448@infradead.org
Diffstat (limited to 'tools/objtool/orc_gen.c')
-rw-r--r--tools/objtool/orc_gen.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/objtool/orc_gen.c b/tools/objtool/orc_gen.c
index 1b57be6508f4..dc9b7dd314b0 100644
--- a/tools/objtool/orc_gen.c
+++ b/tools/objtool/orc_gen.c
@@ -225,8 +225,6 @@ int orc_create(struct objtool_file *file)
sec = elf_create_section(file->elf, ".orc_unwind_ip", 0, sizeof(int), nr);
if (!sec)
return -1;
- if (!elf_create_reloc_section(file->elf, sec, SHT_RELA))
- return -1;
/* Write ORC entries to sections: */
list_for_each_entry(entry, &orc_list, list) {