From: Sam Ravnborg <sam@ravnborg.org>
To: Chris Wedgwood <cw@f00f.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: (hacky) [PATCH] silence MODPOST section mismatch warnings
Date: Thu, 10 May 2007 23:14:46 +0200 [thread overview]
Message-ID: <20070510211446.GB23149@uranus.ravnborg.org> (raw)
In-Reply-To: <20070510204037.GE29713@flint.arm.linux.org.uk>
On Thu, May 10, 2007 at 09:40:38PM +0100, Russell King wrote:
> On Thu, May 10, 2007 at 01:34:18PM -0700, Chris Wedgwood wrote:
> > MODPOST seems to be spewing bogus warnings. It's not clear how best
> > to fix it so perhaps we should silence it for now?
>
> I agree. Example bogus warning:
>
> WARNING: arch/arm/mach-iop32x/built-in.o - Section mismatch:
> reference to .init.text: from .data between 'iq80321_timer'
> (at offset 0x428) and 'iq80321_serial_device'
>
> c04088fc d iq80321_timer
> c0408950 d iq80321_serial_device
>
> It's completely unclear what is referencing what, what the two named
> symbols mean, and even what "at offset" relates to.
The error message tells you that somewhere _between_ the symbol
iq80312_timer and iq80321_serial_device there is a recerence to an address
in the .init.text section.
The referenced address could not be resolved to an actual symbol.
Lets take a look:
git grep iq80321_timer reveals:
arch/arm/mach-iop32x/iq80321.c:static void __init iq80321_timer_init(void)
arch/arm/mach-iop32x/iq80321.c:static struct sys_timer iq80321_timer = {
arch/arm/mach-iop32x/iq80321.c: .init = iq80321_timer_init,
arch/arm/mach-iop32x/iq80321.c: .timer = &iq80321_timer,
So the one to look at is this structure:
static struct sys_timer iq80321_timer = {
.init = iq80321_timer_init,
.offset = iop_gettimeoffset,
};
iq80321_timer_init is a function marked __init
So we have a reference from .data to .init.text
If you remove the static definition of iq80321_timer then you will see
that modpost can resolve the symbol for you.
The usage of iq80321_timer is obscufated inside a MACHINCE_START/MACHINE_END
macor so I did not look further.
But based on the naming of the member in the struct ".init" I will assume
this is legitime reference to .init.text from .data.
Today modpost whitelist (avoid warnings) if a variable are named on of the
following:
*driver, *_template, *_sht, *_ops, *_probe, *probe_one
We could add *timer to silence this particular warning indeed.
Or we could rename the varibale.
Or we could find a way to annotate the data to say "references to .init.*
is OK and should not be warned.
The latter seems to be most appropriate so this is the direction I'm heading.
Sam
next prev parent reply other threads:[~2007-05-10 21:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-10 20:34 Chris Wedgwood
2007-05-10 20:40 ` Russell King
2007-05-10 21:01 ` David Miller
2007-05-10 21:14 ` Sam Ravnborg [this message]
2007-05-10 20:51 ` David Miller
2007-05-10 20:54 ` Russell King
2007-05-10 21:01 ` Sam Ravnborg
2007-05-11 6:28 ` Satyam Sharma
2007-05-10 21:07 ` David Miller
2007-05-10 21:23 ` Russell King
2007-05-10 21:59 ` Russell King
2007-05-10 22:03 ` [PATCH] Make modpost section warnings clearer Russell King
2007-05-10 22:08 ` David Miller
2007-05-10 22:16 ` (hacky) [PATCH] silence MODPOST section mismatch warnings Sam Ravnborg
2007-05-10 22:18 ` Russell King
2007-05-11 4:12 ` Sam Ravnborg
2007-05-11 18:54 ` Sam Ravnborg
2007-05-11 18:57 ` Russell King
2007-05-10 21:19 ` Sam Ravnborg
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=20070510211446.GB23149@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=cw@f00f.org \
--cc=linux-kernel@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 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®