From: Sam Ravnborg <sam@ravnborg.org>
To: sparclinux@vger.kernel.org
Subject: section mismatches from sun4v*_patch in trampoline.S
Date: Sat, 02 Jun 2007 20:32:06 +0000 [thread overview]
Message-ID: <20070602203206.GA13700@uranus.ravnborg.org> (raw)
Hi David.
As per discussion in other mail I have looked into the section
mismatch warnings coming from trampoline.S
If the section is changed to .init.text it gives the following warnings:
WARNING: arch/sparc64/kernel/built-in.o(.sun4v_1insn_patch+0x8): Section mismatch: reference to .init.text:
WARNING: arch/sparc64/kernel/built-in.o(.sun4v_1insn_patch+0x10): Section mismatch: reference to .init.text:
WARNING: arch/sparc64/kernel/built-in.o(.sun4v_1insn_patch+0x18): Section mismatch: reference to .init.text:
WARNING: arch/sparc64/kernel/built-in.o(.cpuid_patch+0x0): Section mismatch: reference to .init.text:
The good news is that there is a nice pattern here. All sections that
have the references end in _patch.
So a simple solution is to teach modpost to not warn about references
from a section named *_patch to .init.text
I have such a change queued to modpost but would like to know if
you have any better ideas before pushing the change.
Sam
Relevant patches (for info only).
I do not know if it is OK to use .init.text??
I would assume that CONFIG_HOTPLUG_CPU had impact here.
diff --git a/arch/sparc64/kernel/trampoline.S b/arch/sparc64/kernel/trampoline.S
index a4dc01a..2588cf0 100644
--- a/arch/sparc64/kernel/trampoline.S
+++ b/arch/sparc64/kernel/trampoline.S
@@ -37,6 +37,7 @@ tramp_stack:
.skip TRAMP_STACK_SIZE
.text
+ .section .init.text, "ax"
.align 8
.globl sparc64_cpu_startup, sparc64_cpu_startup_end
sparc64_cpu_startup:
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 0f9130f..8464938 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1173,6 +1173,11 @@ static int init_section_ref_ok(const char *name)
".rodata",
NULL
};
+ /* End of section names */
+ const char *end_of_sec[] = {
+ "_patch",
+ NULL
+ };
if (initexit_section_ref_ok(name))
return 1;
@@ -1183,6 +1188,11 @@ static int init_section_ref_ok(const char *name)
for (s = namelist2; *s; s++)
if (strncmp(*s, name, strlen(*s)) = 0)
return 1;
+
+ for (s = end_of_sec; *s; s++)
+ if (strrcmp(name, *s) = 0)
+ return 1;
+
if (strrcmp(name, ".init") = 0)
return 1;
return 0;
next reply other threads:[~2007-06-02 20:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-02 20:32 Sam Ravnborg [this message]
2007-06-02 21:02 ` section mismatches from sun4v*_patch in trampoline.S David Miller
2007-06-02 23:00 ` Sam Ravnborg
2007-06-03 2:20 ` David Miller
2007-06-05 6:58 ` David Miller
2007-06-05 9:13 ` Sam Ravnborg
2007-06-05 20:03 ` David Miller
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=20070602203206.GA13700@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=sparclinux@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.