gpt4 book ai didi

c - 内置函数的位置 Microchip C30 编译器

转载 作者:太空宇宙 更新时间:2023-11-04 03:50:23 27 4
gpt4 key购买 nike

我问这个只是出于好奇。

我正在使用 Microchip C30 编译器为 PIC24F 开发 EEPROM 驱动程序代码。在此期间,我使用了 C30 内置函数,例如__builtin_tblwtl()、__builtin_tbloffset 等如何找到内置函数的位置?从 Wiki 我发现了这个:

"Some compilers (for example, GCC[7]) provide built-in versions of many of the functions in the C standard library; that is, the implementations of the functions are written into the compiled object file, and the program calls the built-in versions instead of the functions in the C library shared object file"

这是否意味着这些函数都写在编译器的目标文件中?那是否意味着我们不能将其视为代码?我找遍了整个C30目录也没有找到这些函数。

谢谢

最佳答案

用户定义的函数只存储在编译器的目标文件中,上面提到的函数 __builtin_tblwtl()__builtin_tbloffset 等都是以前在 Microchip C30 编译器的库中编写的。所以你仅获取指向该库的链接。例如在 linux 中,gcc 是编译器,而 glibc 是运行时库。

关于c - 内置函数的位置 Microchip C30 编译器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21059381/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com