From: "tip-bot2 for Josh Poimboeuf" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: objtool/core] Revert "objtool: Warn on functions with ambiguous -ffunction-sections section names"
Date: Fri, 21 Nov 2025 09:57:38 -0000 [thread overview]
Message-ID: <176371905887.498.4204477685302876780.tip-bot2@tip-bot2> (raw)
In-Reply-To: <c7d549d4de8bd1490d106b99630eea5efc69a4dd.1763669451.git.jpoimboe@kernel.org>
The following commit has been merged into the objtool/core branch of tip:
Commit-ID: 11991999a20145b7f8af21202d0cac6b1f90a6e4
Gitweb: https://git.kernel.org/tip/11991999a20145b7f8af21202d0cac6b1f90a6e4
Author: Josh Poimboeuf <jpoimboe@kernel.org>
AuthorDate: Thu, 20 Nov 2025 12:14:21 -08:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Fri, 21 Nov 2025 10:04:10 +01:00
Revert "objtool: Warn on functions with ambiguous -ffunction-sections section names"
This reverts commit 9c7dc1dd897a1cdcade9566ea4664b03fbabf4a4.
The check-function-names.sh script now provides the function name
checking functionality for all architectures, making the objtool check
redundant.
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/c7d549d4de8bd1490d106b99630eea5efc69a4dd.1763669451.git.jpoimboe@kernel.org
---
tools/objtool/Documentation/objtool.txt | 7 +-----
tools/objtool/check.c | 33 +------------------------
2 files changed, 40 deletions(-)
diff --git a/tools/objtool/Documentation/objtool.txt b/tools/objtool/Documentation/objtool.txt
index f88f8d2..9e97fc2 100644
--- a/tools/objtool/Documentation/objtool.txt
+++ b/tools/objtool/Documentation/objtool.txt
@@ -456,13 +456,6 @@ the objtool maintainers.
these special names and does not use module_init() / module_exit()
macros to create them.
-13. file.o: warning: func() function name creates ambiguity with -ffunctions-sections
-
- Functions named startup(), exit(), split(), unlikely(), hot(), and
- unknown() are not allowed due to the ambiguity of their section
- names when compiled with -ffunction-sections. For more information,
- see the comment above TEXT_MAIN in include/asm-generic/vmlinux.lds.h.
-
If the error doesn't seem to make sense, it could be a bug in objtool.
Feel free to ask objtool maintainers for help.
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 1a20ff8..490cf78 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2642,37 +2642,6 @@ static int decode_sections(struct objtool_file *file)
return 0;
}
-/*
- * Certain function names are disallowed due to section name ambiguities
- * introduced by -ffunction-sections.
- *
- * See the comment above TEXT_MAIN in include/asm-generic/vmlinux.lds.h.
- */
-static int validate_function_names(struct objtool_file *file)
-{
- struct symbol *func;
- int warnings = 0;
-
- for_each_sym(file->elf, func) {
- if (!is_func_sym(func))
- continue;
-
- if (!strcmp(func->name, "startup") || strstarts(func->name, "startup.") ||
- !strcmp(func->name, "exit") || strstarts(func->name, "exit.") ||
- !strcmp(func->name, "split") || strstarts(func->name, "split.") ||
- !strcmp(func->name, "unlikely") || strstarts(func->name, "unlikely.") ||
- !strcmp(func->name, "hot") || strstarts(func->name, "hot.") ||
- !strcmp(func->name, "unknown") || strstarts(func->name, "unknown.")) {
-
- WARN("%s() function name creates ambiguity with -ffunction-sections",
- func->name);
- warnings++;
- }
- }
-
- return warnings;
-}
-
static bool is_special_call(struct instruction *insn)
{
if (insn->type == INSN_CALL) {
@@ -4942,8 +4911,6 @@ int check(struct objtool_file *file)
if (!nr_insns)
goto out;
- warnings += validate_function_names(file);
-
if (opts.retpoline)
warnings += validate_retpoline(file);
next prev parent reply other threads:[~2025-11-21 9:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-20 20:14 [PATCH 0/6] objtool: More -ffunction-sections fixes Josh Poimboeuf
2025-11-20 20:14 ` [PATCH 1/6] serial: icom: Fix namespace collision and startup() section placement with -ffunction-sections Josh Poimboeuf
2025-11-21 9:57 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2025-11-20 20:14 ` [PATCH 2/6] media: atomisp: gc2235: " Josh Poimboeuf
2025-11-21 9:57 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2025-11-21 13:28 ` [PATCH 2/6] " Hans de Goede
2025-11-20 20:14 ` [PATCH 3/6] tty: amiserial: " Josh Poimboeuf
2025-11-21 9:57 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2025-11-20 20:14 ` [PATCH 4/6] tty: synclink_gt: " Josh Poimboeuf
2025-11-21 9:57 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2025-11-20 20:14 ` [PATCH 5/6] kbuild: Check for functions with ambiguous -ffunction-sections section names Josh Poimboeuf
2025-11-21 9:57 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2025-11-20 20:14 ` [PATCH 6/6] Revert "objtool: Warn on functions with ambiguous -ffunction-sections section names" Josh Poimboeuf
2025-11-21 9:57 ` tip-bot2 for Josh Poimboeuf [this message]
2025-11-21 7:00 ` [PATCH 0/6] objtool: More -ffunction-sections fixes Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=176371905887.498.4204477685302876780.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®