objtool: Ignore empty alternatives
authorJulien Thierry <jthierry@redhat.com>
Fri, 27 Mar 2020 15:28:41 +0000 (15:28 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:05:09 +0000 (09:05 +0200)
commitb34bdf1148731cd258192cd6a6ed6014fcd627e4
tree9e97db018ab7189f0a375539fab85d9d1a9d7da5
parent11ff15e4fec72c392945579a49ee4bc0d9c796e9
objtool: Ignore empty alternatives

[ Upstream commit 7170cf47d16f1ba29eca07fd818870b7af0a93a5 ]

The .alternatives section can contain entries with no original
instructions. Objtool will currently crash when handling such an entry.

Just skip that entry, but still give a warning to discourage useless
entries.

Signed-off-by: Julien Thierry <jthierry@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/objtool/check.c