X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=tools%2Fobjtool%2Fcheck.c;h=9b341584eb1b56b05761bea127ee6cf94eacc190;hb=783711f0d2458ca1bd716000e767c478cef27144;hp=c0e26ad1fa7e3dbd212b3a4fd02fbcc4d8afc74c;hpb=936fd00549d26a19be723cf7cc1c0b1aa50f9fde;p=mirror_ubuntu-bionic-kernel.git diff --git a/tools/objtool/check.c b/tools/objtool/check.c index c0e26ad1fa7e..9b341584eb1b 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -1757,11 +1757,14 @@ static int validate_branch(struct objtool_file *file, struct instruction *first, if (insn->dead_end) return 0; - insn = next_insn; - if (!insn) { + if (!next_insn) { + if (state.cfa.base == CFI_UNDEFINED) + return 0; WARN("%s: unexpected end of section", sec->name); return 1; } + + insn = next_insn; } return 0;