Messages in this thread Patch in this message | | | From | Julien Thierry <> | Subject | [PATCH v3 3/4] objtool: orc: Skip setting orc_entry for non-text sections | Date | Thu, 30 Jul 2020 10:41:42 +0100 |
| |
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> --- tools/objtool/orc_gen.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/tools/objtool/orc_gen.c b/tools/objtool/orc_gen.c index 968f55e6dd94..66fd56c33303 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) { -- 2.21.3
| |