Re: How to fix a module's Section mismatch warnings?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/19/10 6:43 AM, Bob Beers wrote:
On Sat, Jul 17, 2010 at 5:41 AM, Mulyadi Santosa
<mulyadi.santosa@xxxxxxxxx>  wrote:
Hi Bob..

On Sat, Jul 17, 2010 at 02:08, Bob Beers<bob.beers@xxxxxxxxx>  wrote:
Hmmm,  It looks lilke a pretty standard Makefile:

-----------------------8<-------------------
CC=gcc
VER=`uname -r`
SRCREF?=/lib/modules/$(VER)/build
INSTALLDIR=/lib/modules/$(VER)/kernel/net

It's something like what you see in arch/avr32/kernel/vmlinux.lds.S.
To quote some:
SECTIONS
{
        . = CONFIG_ENTRY_ADDRESS;
        .init           : AT(ADDR(.init) - LOAD_OFFSET) {
                _stext = .;
                __init_begin = .;
                        _sinittext = .;
                        *(.text.reset)
                        INIT_TEXT
                        /*
                         * .exit.text is discarded at runtime, not
                         * link time, to deal with references from
                         * __bug_table
                         */
                        EXIT_TEXT
Hi Mulyadi, and list,

First, sorry for posting last exchange off-list.
I didn't intend to (gmail default is 'reply', not 'reply-all',
  but I usually remember to pick the right one).  I don't
  believe it added a whole lot to the progression of the
  thread, so I won't bother to include it here.


Anyway, back to the topic.  I don't think there are any special
  linker tricks in this code.  I have compiled other out of tree
  drivers on occasion, but I have _never_ seen these warnings
  before.

But I guess that the driver code _is_ violating the principle 'don't
  call __init code from non-__init code' somewhere.  I further
  suppose that the information in the warnings should give me
  some clue about where that violation occurs.
For example:

WARNING: vmlinux - Section mismatch: reference to
.init.text:start_kernel from .text between 'is386' (at offset
0xc0401166) and 'check_x87'

The driver code (directly) calls neither 'is386' nor 'check_x87'.
The only part that looks promising is the parenthetical offset
  expression.  So, does this "(at offset 0xc0401166)" point to a
  location in the driver code that is calling some piece of kernel
  __init code?  or possibly the location of the __init code in the
  kernel that is being referenced by some part of the driver code?

Thanks,
-Bob

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ

I found similar one here: http://www.mail-archive.com/linux-kernel@xxxxxxxxxxxxxxx/msg249131.html

Daniel

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux