未定义对-finstrument-functions的引用 [英] Undefined reference to -finstrument-functions

查看:213
本文介绍了未定义对-finstrument-functions的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试跟踪内核函数,并且正在使用-finstrument-functions来执行此操作,但是出现如下未定义的参考错误:

I am trying to trace kernel functions and I am using -finstrument-functions to do that, but I get undefined reference errors as below:

arch/arm/kernel/elf.c:9: undefined reference to `__cyg_profile_func_enter'
arch/arm/kernel/elf.c:13: undefined reference to `__cyg_profile_func_exit'
arch/arm/kernel/built-in.o: In function `elf_set_personality':
arch/arm/kernel/elf.c:42: undefined reference to `__cyg_profile_func_enter'
arch/arm/kernel/elf.c:75: undefined reference to `__cyg_profile_func_exit'

还有更多类似于上面drivers的错误. 我已经导出了__cyg_profile_func_enter__cyg_profile_func_exit符号,但是仍然出现此错误.我使用linux 4.1 kernel和手臂板.

There are many more errors similar to above in drivers also. I have exported the __cyg_profile_func_enter and __cyg_profile_func_exit symbols, but still I get this error. I use linux 4.1 kernel and arm board.

推荐答案

您是否还在头文件中输入了__cyg_profile_func_enter和__cyg_profile_func_exit的条目.如果没有,请在头文件中声明这些功能,并确保该模块正在编译.

Have you made the entries of __cyg_profile_func_enter and __cyg_profile_func_exit in the header file as well. If not then pls declare these function in the header file and make sure that module is compiling.

这篇关于未定义对-finstrument-functions的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆