[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7eccdb0b09eff581377e5efab8377b6a37596992.1746821544.git.jpoimboe@kernel.org>
Date: Fri, 9 May 2025 13:16:56 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: x86@...nel.org
Cc: linux-kernel@...r.kernel.org,
Petr Mladek <pmladek@...e.com>,
Miroslav Benes <mbenes@...e.cz>,
Joe Lawrence <joe.lawrence@...hat.com>,
live-patching@...r.kernel.org,
Song Liu <song@...nel.org>,
laokz <laokz@...mail.com>,
Jiri Kosina <jikos@...nel.org>,
Marcos Paulo de Souza <mpdesouza@...e.com>,
Weinan Liu <wnliu@...gle.com>,
Fazla Mehrab <a.mehrab@...edance.com>,
Chen Zhongjin <chenzhongjin@...wei.com>,
Puranjay Mohan <puranjay@...nel.org>
Subject: [PATCH v2 32/62] objtool: Suppress section skipping warnings with --dryrun
It's common to use --dryrun on binaries that have already been
processed. Don't print the section skipping warnings in that case.
Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
---
tools/objtool/check.c | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 3b9443b98fd5..66cbeebd16ea 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -637,7 +637,9 @@ static int create_static_call_sections(struct objtool_file *file)
sec = find_section_by_name(file->elf, ".static_call_sites");
if (sec) {
- WARN("file already has .static_call_sites section, skipping");
+ if (!opts.dryrun)
+ WARN("file already has .static_call_sites section, skipping");
+
return 0;
}
@@ -719,7 +721,9 @@ static int create_retpoline_sites_sections(struct objtool_file *file)
sec = find_section_by_name(file->elf, ".retpoline_sites");
if (sec) {
- WARN("file already has .retpoline_sites, skipping");
+ if (!opts.dryrun)
+ WARN("file already has .retpoline_sites, skipping");
+
return 0;
}
@@ -757,7 +761,9 @@ static int create_return_sites_sections(struct objtool_file *file)
sec = find_section_by_name(file->elf, ".return_sites");
if (sec) {
- WARN("file already has .return_sites, skipping");
+ if (!opts.dryrun)
+ WARN("file already has .return_sites, skipping");
+
return 0;
}
@@ -795,7 +801,9 @@ static int create_ibt_endbr_seal_sections(struct objtool_file *file)
sec = find_section_by_name(file->elf, ".ibt_endbr_seal");
if (sec) {
- WARN("file already has .ibt_endbr_seal, skipping");
+ if (!opts.dryrun)
+ WARN("file already has .ibt_endbr_seal, skipping");
+
return 0;
}
@@ -852,7 +860,9 @@ static int create_cfi_sections(struct objtool_file *file)
sec = find_section_by_name(file->elf, ".cfi_sites");
if (sec) {
- WARN("file already has .cfi_sites section, skipping");
+ if (!opts.dryrun)
+ WARN("file already has .cfi_sites section, skipping");
+
return 0;
}
@@ -900,7 +910,9 @@ static int create_mcount_loc_sections(struct objtool_file *file)
sec = find_section_by_name(file->elf, "__mcount_loc");
if (sec) {
- WARN("file already has __mcount_loc section, skipping");
+ if (!opts.dryrun)
+ WARN("file already has __mcount_loc section, skipping");
+
return 0;
}
@@ -944,7 +956,9 @@ static int create_direct_call_sections(struct objtool_file *file)
sec = find_section_by_name(file->elf, ".call_sites");
if (sec) {
- WARN("file already has .call_sites section, skipping");
+ if (!opts.dryrun)
+ WARN("file already has .call_sites section, skipping");
+
return 0;
}
--
2.49.0
Powered by blists - more mailing lists