Re: [PATCH 21/29] objtool: Rename --duplicate to --lto

From: Josh Poimboeuf
Date: Sat Feb 26 2022 - 16:48:15 EST


On Sat, Feb 26, 2022 at 11:42:13AM -0800, Josh Poimboeuf wrote:
> > + OPT_BOOLEAN(0, "lto", &lto, "whole-archive like runs"),
>
> "--lto" is a confusing name, since this "feature" isn't specific to LTO.
>
> Also, it gives no indication of what it actually does.
>
> What it does is, run objtool on vmlinux or module just like it's a
> normal object, and *don't* do noinstr validation. Right?
>
> It's weird for the noinstr-only-mode to be the default.
>
> BTW "--duplicate" had similar problems...
>
> So how about:
>
> - Default to normal mode on vmlinux/module, i.e. validate and/or
> generate ORC like any other object. This default is more logically
> consistent and makes sense for the future once we get around to
> parallelizing objtool.
>
> - Have "--noinstr", which does noinstr validation, in addition to all
> the other objtool validation/generation. So it's additive, like any
> other cmdline option. (Maybe this option isn't necessarily needed for
> now.)

It just dawned on me that "--noinstr" already exists. But I'm
scratching my head trying to figure out the difference between
"--noinstr" and omitting "--lto".

> - Have "--noinstr-only" which only does noinstr validation and nothing
> else. (Alternatively, "--noinstr --dry-run")
>
> ?

--
Josh