summaryrefslogtreecommitdiffstats
path: root/tools/objtool/builtin-orc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-12-31 19:57:10 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2017-12-31 19:57:10 +0100
commit31336ed90cdc866ac25d36851e91df532837c763 (patch)
tree9f141429f6e831a20caf47d9b8ef009b537a7c0b /tools/objtool/builtin-orc.c
parentMerge tag 'char-misc-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
parentobjtool: Fix seg fault with clang-compiled objects (diff)
downloadlinux-31336ed90cdc866ac25d36851e91df532837c763.tar.xz
linux-31336ed90cdc866ac25d36851e91df532837c763.zip
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull objtool fixes from Thomas Gleixner: "Three fixlets for objtool: - Address two segfaults related to missing parameter and clang objects - Make it compile clean with clang" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Fix seg fault with clang-compiled objects objtool: Fix seg fault caused by missing parameter objtool: Fix Clang enum conversion warning
Diffstat (limited to 'tools/objtool/builtin-orc.c')
-rw-r--r--tools/objtool/builtin-orc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/objtool/builtin-orc.c b/tools/objtool/builtin-orc.c
index 4c6b5c9ef073..91e8e19ff5e0 100644
--- a/tools/objtool/builtin-orc.c
+++ b/tools/objtool/builtin-orc.c
@@ -44,6 +44,9 @@ int cmd_orc(int argc, const char **argv)
const char *objname;
argc--; argv++;
+ if (argc <= 0)
+ usage_with_options(orc_usage, check_options);
+
if (!strncmp(argv[0], "gen", 3)) {
argc = parse_options(argc, argv, check_options, orc_usage, 0);
if (argc != 1)
@@ -52,7 +55,6 @@ int cmd_orc(int argc, const char **argv)
objname = argv[0];
return check(objname, no_fp, no_unreachable, true);
-
}
if (!strcmp(argv[0], "dump")) {