diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/objtool/check.c | 7 | ||||
| -rw-r--r-- | tools/objtool/objtool.c | 6 |
2 files changed, 7 insertions, 6 deletions
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, | |||
| 1757 | if (insn->dead_end) | 1757 | if (insn->dead_end) |
| 1758 | return 0; | 1758 | return 0; |
| 1759 | 1759 | ||
| 1760 | insn = next_insn; | 1760 | if (!next_insn) { |
| 1761 | if (!insn) { | 1761 | if (state.cfa.base == CFI_UNDEFINED) |
| 1762 | return 0; | ||
| 1762 | WARN("%s: unexpected end of section", sec->name); | 1763 | WARN("%s: unexpected end of section", sec->name); |
| 1763 | return 1; | 1764 | return 1; |
| 1764 | } | 1765 | } |
| 1766 | |||
| 1767 | insn = next_insn; | ||
| 1765 | } | 1768 | } |
| 1766 | 1769 | ||
| 1767 | return 0; | 1770 | return 0; |
diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c index 31e0f9143840..07f329919828 100644 --- a/tools/objtool/objtool.c +++ b/tools/objtool/objtool.c | |||
| @@ -70,7 +70,7 @@ static void cmd_usage(void) | |||
| 70 | 70 | ||
| 71 | printf("\n"); | 71 | printf("\n"); |
| 72 | 72 | ||
| 73 | exit(1); | 73 | exit(129); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | static void handle_options(int *argc, const char ***argv) | 76 | static void handle_options(int *argc, const char ***argv) |
| @@ -86,9 +86,7 @@ static void handle_options(int *argc, const char ***argv) | |||
| 86 | break; | 86 | break; |
| 87 | } else { | 87 | } else { |
| 88 | fprintf(stderr, "Unknown option: %s\n", cmd); | 88 | fprintf(stderr, "Unknown option: %s\n", cmd); |
| 89 | fprintf(stderr, "\n Usage: %s\n", | 89 | cmd_usage(); |
| 90 | objtool_usage_string); | ||
| 91 | exit(1); | ||
| 92 | } | 90 | } |
| 93 | 91 | ||
| 94 | (*argv)++; | 92 | (*argv)++; |
