diff options
author | Julien Thierry <jthierry@redhat.com> | 2020-08-25 13:47:41 +0100 |
---|---|---|
committer | Josh Poimboeuf <jpoimboe@redhat.com> | 2020-09-01 17:19:11 -0500 |
commit | 3eaecac88a17f7fdf29561a197dc728f7f697c60 (patch) | |
tree | 00d89d1e0310e71e1ef2d513f30ade80e74c170c /tools/objtool | |
parent | d44becb9decf4438d1e555b1428634964d2e5764 (diff) | |
download | linux-3eaecac88a17f7fdf29561a197dc728f7f697c60.tar.gz linux-3eaecac88a17f7fdf29561a197dc728f7f697c60.tar.bz2 linux-3eaecac88a17f7fdf29561a197dc728f7f697c60.zip |
objtool: Skip ORC entry creation for non-text sections
Orc generation is only done for text sections, but some instructions
can be found in non-text sections (e.g. .discard.text sections).
Skip setting their orc sections since their whole sections will be
skipped for orc generation.
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Julien Thierry <jthierry@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Diffstat (limited to 'tools/objtool')
-rw-r--r-- | tools/objtool/orc_gen.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/objtool/orc_gen.c b/tools/objtool/orc_gen.c index e6b2363c2e03..22fe4398197f 100644 --- a/tools/objtool/orc_gen.c +++ b/tools/objtool/orc_gen.c @@ -18,6 +18,9 @@ int create_orc(struct objtool_file *file) struct cfi_reg *cfa = &insn->cfi.cfa; struct cfi_reg *bp = &insn->cfi.regs[CFI_BP]; + if (!insn->sec->text) + continue; + orc->end = insn->cfi.end; if (cfa->base == CFI_UNDEFINED) { |