Commit 3eaecac8 authored by Julien Thierry's avatar Julien Thierry Committed by Josh Poimboeuf
Browse files

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: default avatarMiroslav Benes <mbenes@suse.cz>
Signed-off-by: default avatarJulien Thierry <jthierry@redhat.com>
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
parent d44becb9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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) {