对 -finstrument-functions 的未定义引用 [英] Undefined reference to -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 内核
和 arm 板.
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屋!