Unresolved Symbol (转)
来源:互联网 发布:php 多线程 编辑:程序博客网 时间:2024/04/30 09:29
How to avoid the unresolved symbols error If you keep getting an unresolved symbols error when using ALSA modules, the solution is very simple: Clean the kernel's source tree. Change directory to the kernel source tree. If you want to keep the same config, I advise :
Then, recompile ALSA. I know that this is not directly ALSA related, but it could take place in the FAQ, as it definitely prevents ALSA from working. Try this: In the alsa-driver directory,
Remove all of the ALSA kernel modules before you do "make install". Do a "find /lib/modules/`uname -r` -name 'snd*.o'" to make sure they're all gone. On Thu, 8 Mar 2001, Narayana, Venkat A. wrote: > Hi, > I am learning to write kernel modules, and while experimenting > with a simple module, i got > " hello.o: unresolved symbol printk_Rsmp_1b7d4074" error > while loading this module via insmod hello.o command. > > I noticed that /proc/ksyms contains printk symbol. > > What is that i am doing which is not correct? > Help me out. As other people have pointed out this has to do with versioning. The simple answer to the question is that you need to include modversions.h before the header file for printk if you want the module to load into a kernel with CONFIG_MODVERSIONS turned on. You could do this in two ways:
#ifdef CONFIG_MODVERSIONS#include <linux/modversions.h>#endif
ifdef CONFIG_MODVERSIONSCPPFLAGS += -include /usr/src/linux/modversions.hendif Now, I'll try and explain how it all works. (Jay, a section on this is definitely needed in the module programming guide ;). Okay, this can be a bit difficult to explain, but I'll give it a go. I've probably got some of it wrong. Someone will correct me. (all this assumes CONFIG_MODVERSIONS is turned on)
#define __ver_printk 1b7d4074#define printk _set_ver(printk) this winds up having a #define along the line of #define printk printk_R1b7d4074
there is no such function as printk, there is only one called printk_R1b7d4074.
Another question you might ask is how the .ver files get generated?
gcc -E -D__GENKSYMS__ <the-c-file> | genksys -k <your-kernel-version> > <your-ver-file>
#define __ver_printk 1b7d4074#define printk _set_ver(printk) where the 1b7d4074 depends on the kernel version you supply. Hi, I have gone through an alsa compilation which went well, but the loading of the module came back with the following error : /lib/modules/2.2.17/misc/snd.o: unresolved symbol unregister_sound_dsp /lib/modules/2.2.17/misc/snd.o: unresolved symbol register_sound_dsp /lib/modules/2.2.17/misc/snd.o: unresolved symbol unregister_sound_special /lib/modules/2.2.17/misc/snd.o: unresolved symbol register_sound_special /lib/modules/2.2.17/misc/snd.o: insmod /lib/modules/2.2.17/misc/snd.o failed /lib/modules/2.2.17/misc/snd.o: insmod snd-cs4236 failed I then went to the FAQ which said that it was because my kernel was incorrectly configured andalso because I had missed out the soundcore code (CONFIG_SOUND=y). I was surprised because I had just recompiled that kernel, ensuring that I had added the right options. Apparently -- I noticed this on some kernel mailing lists -- the usage of the kernel modversions facility (CONFIG_MODVERSIONS) is not always correctly taken into account by the fastdep kernel makefiles reconfiguration system. The result is weird symbol names for some symbols. |
- Unresolved Symbol (转)
- [转]unresolved external symbol _*
- unresolved symbol
- unresolved symbol
- unresolved external symbol “symbol”
- (转)unresolved external symbol _main解决办法
- [转]unresolved external symbol _main 解决方法
- error LNK2001: unresolved external symbol _main(转)
- 【转】解决error LNK2001: unresolved external symbol
- [转]unresolved external symbol _main解决办法
- [转]unresolved external symbol _main解决办法
- 转:解决 unresolved external symbol 无法解析
- unresolved external symbol _AtlAxWinInit@
- unresolved external symbol __GSHandlerCheck
- unresolved external symbol
- unresolved external symbol _*
- unresolved external symbol问题
- unresolved external symbol _main
- 10月招聘会排期
- facade
- compile the mod_gsoap of apache2 for win32
- JFdraw 一个不错的矢量工具
- 2000/XP命令行一次运行多个命令
- Unresolved Symbol (转)
- C#socket
- Portal学习
- winnt32 /cmdcons
- 要和你一起做的100件事
- Windows 2000缓冲区溢出入门(我所找到的最好的入门教程)
- 如何用正确的方法来写出质量好的软件的75条体会(zz)
- 解读多重启动引导文件——BOOT.INI
- 自动安装Windows2000系统