LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 05-23-2008, 01:20 PM   #1
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Rep: Reputation: 33
What is a kernel section mismatch


Lately i have upgraded Slackware's 2.6.24.5 kernel to 2.6.25.4 in the process i noticed that i recieved a Section mismatch warning/error.

my question is, What is a section mismatch error, What are they caused by, and how to resolve them

i have run the make DEBUG_CONFIG_SECTION_MISMATCH=y and it has printed some info that i have written down. but other than that i am stumped.
any help is appreciated, thanks.
 
Old 05-24-2008, 10:14 AM   #2
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Original Poster
Rep: Reputation: 33
The problem seems to be stemming from the PCMCIA card and cardbus portion of the kernel.

Here are the errors:

Code:
make CONFIG_DEBUG_SECTION_MISMATCH=y
scripts/kconfig/conf -s arch/x86/Kconfig
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h
  GZIP    kernel/config_data.gz
  IKCFG   kernel/config_data.h
  CC      kernel/configs.o
  LD      kernel/built-in.o
  CC      drivers/pcmcia/cs.o
  CC      drivers/pcmcia/cistpl.o
  CC      drivers/pcmcia/rsrc_mgr.o
  CC      drivers/pcmcia/socket_sysfs.o
  CC      drivers/pcmcia/cardbus.o
include/asm/io_32.h: In function 'memcpy_fromio':
include/asm/io_32.h:216: warning: passing argument 2 of '__memcpy' discards qualifiers from pointer target type
  LD      drivers/pcmcia/pcmcia_core.o
WARNING: drivers/pcmcia/pcmcia_core.o(.data+0x134): Section mismatch in reference from the variable pccard_sysfs_interface to the function .devinit.text:pccard_sysfs_add_socket()
The variable pccard_sysfs_interface references
the function __devinit pccard_sysfs_add_socket()
If the reference is valid then annotate the
variable with __init* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/pcmcia/pcmcia_core.o(.data+0x138): Section mismatch in reference from the variable pccard_sysfs_interface to the function .devexit.text:pccard_sysfs_remove_socket()
The variable pccard_sysfs_interface references
the function __devexit pccard_sysfs_remove_socket()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

  LD      drivers/pcmcia/built-in.o
WARNING: drivers/pcmcia/built-in.o(.data+0x134): Section mismatch in reference from the variable pccard_sysfs_interface to the function .devinit.text:pccard_sysfs_add_socket()
The variable pccard_sysfs_interface references
the function __devinit pccard_sysfs_add_socket()
If the reference is valid then annotate the
variable with __init* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/pcmcia/built-in.o(.data+0x138): Section mismatch in reference from the variable pccard_sysfs_interface to the function .devexit.text:pccard_sysfs_remove_socket()
The variable pccard_sysfs_interface references
the function __devexit pccard_sysfs_remove_socket()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

  CC      drivers/ssb/main.o
  CC      drivers/ssb/scan.o
  LD      drivers/ssb/ssb.o
  LD      drivers/ssb/built-in.o
  LD      drivers/built-in.o
WARNING: drivers/built-in.o(.text+0xcdb38): Section mismatch in reference from the function cb_alloc() to the function .devinit.text:pci_scan_bridge()
The function cb_alloc() references
the function __devinit pci_scan_bridge().
This is often because cb_alloc lacks a __devinit
annotation or the annotation of pci_scan_bridge is wrong.

WARNING: drivers/built-in.o(.data+0x9f34): Section mismatch in reference from the variable pccard_sysfs_interface to the function .devinit.text:pccard_sysfs_add_socket()
The variable pccard_sysfs_interface references
the function __devinit pccard_sysfs_add_socket()
If the reference is valid then annotate the
variable with __init* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: drivers/built-in.o(.data+0x9f38): Section mismatch in reference from the variable pccard_sysfs_interface to the function .devexit.text:pccard_sysfs_remove_socket()
The variable pccard_sysfs_interface references
the function __devexit pccard_sysfs_remove_socket()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x1d8d78): Section mismatch in reference from the function cb_alloc() to the function .devinit.text:pci_scan_bridge()
The function cb_alloc() references
the function __devinit pci_scan_bridge().
This is often because cb_alloc lacks a __devinit
annotation or the annotation of pci_scan_bridge is wrong.

WARNING: vmlinux.o(.data+0x194b4): Section mismatch in reference from the variable pccard_sysfs_interface to the function .devinit.text:pccard_sysfs_add_socket()
The variable pccard_sysfs_interface references
the function __devinit pccard_sysfs_add_socket()
If the reference is valid then annotate the
variable with __init* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: vmlinux.o(.data+0x194b8): Section mismatch in reference from the variable pccard_sysfs_interface to the function .devexit.text:pccard_sysfs_remove_socket()
The variable pccard_sysfs_interface references
the function __devexit pccard_sysfs_remove_socket()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
  KSYM    .tmp_kallsyms1.S
  AS      .tmp_kallsyms1.o
  LD      .tmp_vmlinux2
  KSYM    .tmp_kallsyms2.S
  AS      .tmp_kallsyms2.o
  LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
  CC      arch/x86/boot/version.o
  LD      arch/x86/boot/setup.elf
  OBJCOPY arch/x86/boot/setup.bin
  OBJCOPY arch/x86/boot/compressed/vmlinux.bin
  GZIP    arch/x86/boot/compressed/vmlinux.bin.gz
  LD      arch/x86/boot/compressed/piggy.o
  LD      arch/x86/boot/compressed/vmlinux
  OBJCOPY arch/x86/boot/vmlinux.bin
  BUILD   arch/x86/boot/bzImage
Root device is (3, 1)
Setup is 11452 bytes (padded to 11776 bytes).
System is 2067 kB
Kernel: arch/x86/boot/bzImage is ready  (#16)
  Building modules, stage 2.
  MODPOST 433 modules

Last edited by C-Sniper; 05-24-2008 at 10:19 AM.
 
Old 05-24-2008, 11:26 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Searching the LKML shows section mismatch patches fixes are up for inclusion in 2.6.26.*.
 
Old 05-24-2008, 11:46 AM   #4
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Original Poster
Rep: Reputation: 33
Thank you very much unspawn!
 
Old 08-10-2008, 12:09 AM   #5
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Rep: Reputation: 38
Quote:
Originally Posted by unSpawn View Post
Searching the LKML shows section mismatch patches fixes are up for inclusion in 2.6.26.*.
What is LKML?
Edit--------------
Never mind!
It is the (unofficial) Linux Kernel Mailing List archive.

Last edited by okos; 08-10-2008 at 12:18 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
WARNING: drivers/... - Section mismatch: dasoberdick Slackware 1 06-15-2007 01:55 PM
Problems compiling 2.6.18: Section mismatch [newbie] Shioni Linux - General 7 09-23-2006 09:54 AM
kernel version mismatch vkmgeek Programming 3 03-20-2006 06:39 AM
new kernel mismatch with gcc??? JNaas Linux - Newbie 4 10-18-2004 10:59 AM
Kernel mismatch vedion Linux - General 1 03-31-2004 03:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration