Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.