aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2017-09-18 22:43:30 -0400
committerIngo Molnar <mingo@kernel.org>2017-09-28 03:39:02 -0400
commit00d96180dc38ef872ac471c2d3e14b067cbd895d (patch)
treed60b5723b0e77a0e02fc4c15813d9b22a4bd74ca /tools
parent607a4029d439cdfa258aff5da32bb9cd6ed1a66d (diff)
objtool: Don't report end of section error after an empty unwind hint
If asm code specifies an UNWIND_HINT_EMPTY hint, don't warn if the section ends unexpectedly. This can happen with the xen-head.S code because the hypercall_page is "text" but it's all zeros. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Juergen Gross <jgross@suse.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/ddafe199dd8797e40e3c2777373347eba1d65572.1505764066.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/objtool/check.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index a0c518ecf085..83f370fa00c2 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1752,11 +1752,14 @@ static int validate_branch(struct objtool_file *file, struct instruction *first,
1752 if (insn->dead_end) 1752 if (insn->dead_end)
1753 return 0; 1753 return 0;
1754 1754
1755 insn = next_insn; 1755 if (!next_insn) {
1756 if (!insn) { 1756 if (state.cfa.base == CFI_UNDEFINED)
1757 return 0;
1757 WARN("%s: unexpected end of section", sec->name); 1758 WARN("%s: unexpected end of section", sec->name);
1758 return 1; 1759 return 1;
1759 } 1760 }
1761
1762 insn = next_insn;
1760 } 1763 }
1761 1764
1762 return 0; 1765 return 0;