错误提示:连接 built-in.o 提示 undefined reference to
2015-08-01 11:22
471 查看
今天编译内核的时候,由于我是按照别人的内核修改做的内核,内核版本号不一致所以编译出现了如下的错误:
arch/arm/mach-omap2/built-in.o: In function `map_xbar_event_to_channel':
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/devices.c:1058: undefined reference to `edma_cc'
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/devices.c:1066: undefined reference to `edma_cc'
arch/arm/mach-omap2/built-in.o: In function `omap_push_sram_idle':
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/pm34xx.c:771: undefined reference to `omap_gen_pool'
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/pm34xx.c:771: undefined reference to `omap_gen_pool'
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/pm34xx.c:771: undefined reference to `gen_pool_alloc'
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/pm34xx.c:774: undefined reference to `gen_pool_alloc'
后来发现,提示的这些文件函数都有声明头文件也有包括。
于是参考别人的博客:http://blog.chinaunix.net/uid-8391208-id-1739710.html
上面的博客没有给出具体的路径方法。
下面给出具体路径方法:
以这个为例:
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/devices.c:1058: undefined reference to `edma_cc'
用source insight打开。找到edma_cc'定义所在的c文件。
比如我的edma_cc定义在了Edma.c (arch\arm\common)中
于是我修改arch\arm\common目录下的Makefile 指定obj-y += edma.o就可以。
arch/arm/mach-omap2/built-in.o: In function `map_xbar_event_to_channel':
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/devices.c:1058: undefined reference to `edma_cc'
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/devices.c:1066: undefined reference to `edma_cc'
arch/arm/mach-omap2/built-in.o: In function `omap_push_sram_idle':
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/pm34xx.c:771: undefined reference to `omap_gen_pool'
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/pm34xx.c:771: undefined reference to `omap_gen_pool'
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/pm34xx.c:771: undefined reference to `gen_pool_alloc'
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/pm34xx.c:774: undefined reference to `gen_pool_alloc'
后来发现,提示的这些文件函数都有声明头文件也有包括。
于是参考别人的博客:http://blog.chinaunix.net/uid-8391208-id-1739710.html
上面的博客没有给出具体的路径方法。
下面给出具体路径方法:
以这个为例:
/home/hello/work/kernel/am335x/linux-3.2.21/arch/arm/mach-omap2/devices.c:1058: undefined reference to `edma_cc'
用source insight打开。找到edma_cc'定义所在的c文件。
比如我的edma_cc定义在了Edma.c (arch\arm\common)中
于是我修改arch\arm\common目录下的Makefile 指定obj-y += edma.o就可以。
相关文章推荐
- IOS 自定义 tableView cell(UITableViewCell height) 高度
- SolrCloud Wiki翻译(4)Distributed Requests
- UITextfield
- POJ 1679 The Unique MST
- UILabel
- 通过UIAlertView或者ActionSheet控件调用share方法
- UIView
- poj 1019 Number Sequence 【组合数学+数字x的位宽函数】
- UITableViewCell 输入框动态变高
- Ueditor上传图片到本地改造到上传图片到云存储
- 随机生成UUID的工具类
- iOS开发UI篇—transframe属性(形变)
- Serializable serialVersionUID
- UIViewController 视图控制器
- UIButton,UITextField
- [LeetCode]232.Implement Queue using Stacks
- uva-133 - The Dole Queue
- iOS UI03_UIViewController视图控制器
- iOS UI03_LTView
- 写在Demo战斗系统之前,先用原型工具做套UI第四篇-回合制战斗UI界面制作