objtool: Propagate early errors
authorAaron Plattner <aplattner@nvidia.com>
Thu, 5 Oct 2023 00:08:18 +0000 (17:08 -0700)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Fri, 6 Oct 2023 00:01:11 +0000 (17:01 -0700)
If objtool runs into a problem that causes it to exit early, the overall
tool still returns a status code of 0, which causes the build to
continue as if nothing went wrong.

Note this only affects early errors, as later errors are still ignored
by check().

Fixes: b51277eb9775 ("objtool: Ditch subcommands")
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Link: https://lore.kernel.org/r/cb6a28832d24b2ebfafd26da9abb95f874c83045.1696355111.git.aplattner@nvidia.com
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
tools/objtool/objtool.c

index c54f7235c5d94157011a5e202955c539a9182a26..f40febdd6e36aa1d4d73fa2713e7066fe5cabcad 100644 (file)
@@ -146,7 +146,5 @@ int main(int argc, const char **argv)
        exec_cmd_init("objtool", UNUSED, UNUSED, UNUSED);
        pager_init(UNUSED);
 
-       objtool_run(argc, argv);
-
-       return 0;
+       return objtool_run(argc, argv);
 }