对于已经可以正常编译的内核linux-2.6.28.4,在加了自己写的一个rtc驱动后,再编译,出现warning: make ARCH=arm; make ARCH=arm uImage ....... WARNING: modpost: Found 1 section mismatch(es). 感觉有问题,但是实际测试结果,驱动也是可以正常工作的。 【解决过程】 1。至今未找到根本原因是啥。去掉那个rtc驱动,再编译,就是正常的,加上它,编译就出现上述警告。 2.这里: 说,在make的时候,加上参数CONFIG_DEBUG_SECTION_MISMATCH=y',然后应该可以看到具体错在哪里,是哪里mismatch了。 自己去试了下: make ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y 然后,导致整个kernel都要重新编译。。。漫长的等待啊。。。。 最后编译过程中,输出了对应的错误原因: LD drivers/rtc/built-in.o 去看了下代码,具体涉及的代码为: static int __devexit as353x_rtc_remove(struct platform_device *pdev) static struct platform_driver as353x_rtc ={ 其说得,听起来,很在理,但是问题在于,我去搜索了一下内核的其他驱动模块,N多的驱动,都是这种做法,但是都是编译正常,没有警告的,为何只有我这个rtc驱动,对此提出了警告,说是mismatch了呢?很是不解。。。
__devexit可以换成__devinit 这是一个办法 |
WARNING: modpost: Found 1 section mismatch(es).
最新推荐文章于 2024-01-28 19:35:41 发布