问题描述
我正在尝试跟踪内核函数,并且正在使用-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的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!