Re: [PATCH 08/13] objtool: Upgrade "Linked object detected" warning to error
From: Miroslav Benes
Date: Mon Mar 17 2025 - 08:38:37 EST
Hi,
On Fri, 14 Mar 2025, Josh Poimboeuf wrote:
> Force the user to fix their cmdline if they forget the '--link' option.
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> ---
> tools/objtool/builtin-check.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
> index 36d81a455b01..79843512a51b 100644
> --- a/tools/objtool/builtin-check.c
> +++ b/tools/objtool/builtin-check.c
> @@ -198,8 +198,8 @@ int objtool_run(int argc, const char **argv)
> return 1;
>
> if (!opts.link && has_multiple_files(file->elf)) {
> - ERROR("Linked object detected, forcing --link");
> - opts.link = true;
> + ERROR("Linked object requires --link");
> + goto err;
there is no 'err' label in objtool_run() at this point. It is introduced
by the next patch.
Miroslav