解決編譯kernel出現WARNING: modpost: Found 4 section mismatch(es)
來源:互聯網
上載者:User
板子 helper2416 (cpu s3c2416)
編譯kernel 時 版本3.2.11
WARNING: modpost: Found 4 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
make ARCH=arm CROSS_COMPILE=arm-linux- -j4 CONFIG_DEBUG_SECTION_MISMATCH=y
作者:帥得不敢出門 c/c++群31843264
問題
LD drivers/video/built-in.o
WARNING: drivers/video/built-in.o(.text+0x105b8): Section mismatch in reference from the function s3c_fb_init_fbinfo() to the variable .init.data:monspecs
The function s3c_fb_init_fbinfo() references
the variable __initdata monspecs.
This is often because s3c_fb_init_fbinfo lacks a __initdata
annotation or the annotation of monspecs is wrong.
解決
void s3c_fb_init_fbinfo(struct s3c_fb_info *finfo, char *drv_name, int index) 改成
void __init s3c_fb_init_fbinfo(struct s3c_fb_info *finfo, char *drv_name, int index)
問題
WARNING: drivers/video/built-in.o(.data+0x2ac): Section mismatch in reference from the variable s3c_fb_driver to the function .init.text:s3c_fb_probe()
The variable s3c_fb_driver references
the function __init s3c_fb_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
解決
int __init s3c_fb_probe(struct platform_device *pdev)
改成
static int __devinit s3c_fb_probe(struct platform_device *pdev)
問題
WARNING: vmlinux.o(.text+0x101c4): Section mismatch in reference from the function s3c2416_dma_add() to the (unknown reference) .init.data:(unknown)
The function s3c2416_dma_add() references
the (unknown reference) __initdata (unknown).
This is often because s3c2416_dma_add lacks a __initdata
annotation or the annotation of (unknown) is wrong.