mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: sam@ravnborg.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH, RFC] Fix bogus modpost warnings
Date: Wed, 29 Apr 2009 14:32:11 +0200	[thread overview]
Message-ID: <20090429123211.GA12874@linux-mips.org> (raw)

Trying to build the current kernel with gcc 4.4.0 will result in a large
number of apparently bogus warnings like these:

WARNING: crypto/cryptd.o (.text.T.349): unexpected section name.
The (.[number]+) following section name are ld generated and not expected.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example <linux/init.h> contains
section definitions for use in .S files.

WARNING: drivers/block/pktcdvd.o (.text.T.772): unexpected section name.
The (.[number]+) following section name are ld generated and not expected.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example <linux/init.h> contains
section definitions for use in .S files.

emitted by modpost.  This is because with -ffunction-sections gcc may now
generate some section names like .text.T.772 itself instead of like in
the past deriving those from the function's name like .text.ipgre_close.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
---

For now I see this patch as a proposal only.  I'm also not sure if with
this addition check there are still section names left for which the if
condition would ever be true.  Data sections maybe?

 scripts/mod/modpost.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 8d46ea7..13e801e 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -739,7 +739,8 @@ static int check_section(const char *modname, const char *sec)
 		/* consume all digits */
 		while (*e && e != sec && isdigit(*e))
 			e--;
-		if (*e == '.' && !strstr(sec, ".linkonce")) {
+		if (*e == '.' &&
+		    !strstr(sec, ".linkonce") && !strstr(sec, ".text")) {
 			warn("%s (%s): unexpected section name.\n"
 			     "The (.[number]+) following section name are "
 			     "ld generated and not expected.\n"

             reply	other threads:[~2009-04-29 12:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-29 12:32 Ralf Baechle [this message]
2009-04-29 20:48 ` Sam Ravnborg
2009-04-30  0:12   ` Ralf Baechle

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=20090429123211.GA12874@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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

Powered by JetHome