From: Sam Ravnborg <sam@ravnborg.org>
To: Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: Bogus section mismatch errors?
Date: Tue, 8 May 2007 13:52:20 +0200 [thread overview]
Message-ID: <20070508115220.GA29160@uranus.ravnborg.org> (raw)
In-Reply-To: <20070508111759.GA26562@flint.arm.linux.org.uk>
On Tue, May 08, 2007 at 12:17:59PM +0100, Russell King wrote:
>
> WARNING: arch/arm/mach-realview/built-in.o - Section mismatch:
> reference to .init.text: from .data between 'realview_timer' (at offset 0x54)
> and 'clcd_plat_data'
>
> Weird, these two data structures don't interact with each other. Probably
> bogus.
modpsot does it best to guess what symbol are represented by an address.
In this case I would assume that realview_timer has a function pointer to a function
that is marked __init.
>
> WARNING: init/built-in.o - Section mismatch:
> reference to .init.text: from .text between 'rest_init' (at offset 0x2c)
> and 'run_init_process'
This is due to the reference to kernel_init - but binutils hardcode the offset
so modpost does not recognize the symbol.
A workaround (that I do not like) it to remove static declaration of kernel_init,
then modpost will recognize the symbol and see this is OK.
> WARNING: mm/built-in.o - Section mismatch:
> reference to .init.text: from .text between 'kmem_cache_create' (at offset 0x1bd94)
> and 'cache_reap'
> WARNING: mm/built-in.o - Section mismatch:
> reference to .init.text: from .text between 'kmem_cache_create' (at offset 0x1bdcc)
> and 'cache_reap'
There are in slab a function that is not marked __init that refer to a function marked
__init. But the logic surrounding makes it OK.
I have no fix/workaround for this.
Andres has suggested that we should mark functions/data that may refer to __init{data}
with something like: __nowarn and __nowarndata
I am planning to implement something so we can mark functions/data with:
__init_ref_ok and _init_data_ref_ok
Which is indeed more ugly but expalins what is actually OK.
I hope to take a look during the weekend.
Sam
next prev parent reply other threads:[~2007-05-08 12:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 11:17 Bogus section mismatch errors? Russell King
2007-05-08 11:52 ` Sam Ravnborg [this message]
2007-05-08 20:41 ` David Miller
2007-05-09 9:59 ` Paul Mundt
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=20070508115220.GA29160@uranus.ravnborg.org \
--to=sam@ravnborg.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 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.