LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1236|回复: 1

关于kernel 2.5.68下编译驱动出错的问题(Invalid module format)

[复制链接]
发表于 2003-7-31 14:21:13 | 显示全部楼层 |阅读模式
各位高手,

小弟请教一个问题。
我的gcc是3.2.2的。
我在内核版本2.5.68下面编译了一个驱动,加载的时候,报出一个错误,说模块驱动格式非法(Invalid module format ) 。
我知道2.4和2.5的驱动格式不一样,我已经下载了一个init_module的补丁,可是加载的时候还是报错。

请高手指教,感激不尽。
:D
发表于 2003-7-31 15:01:20 | 显示全部楼层
补充小猪的,kernel log 打印的 "No module found in object".

编译是这样的
gcc -Wp,-MD,drivers/test/.test.o.d  -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -Iinclude/asm-i386/mach-default -nostdinc -iwithprefix include  -DMODULE -DKBUILD_BASENAME=test -DKBUILD_MODNAME=test -c -o  drivers/test/test.o  drivers/test/test.c
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表