同事看了我之前的ld脚本,问这个*(.gnu.linkonce.t.*) 是干啥的,可以拿掉吗?
说实话只知道这类输入段在我们系统中是没用的,拿掉没问题,但具体讲不明白其功能作用。
我们的soc使用Freertos,这是前提。然后去网上搜了一下相关资料,这里做个记录。
.gnu.linkonce.this_module
There's nothing special to say here. This section contains only one structure--this_module, which is mostly filled with zeroes (as it is used by the LKM loader internally) except three fields:
- Name of the module
- A pointer to the initialization procedure--module_init
- A pointer to the de-initialization procedure--module_cleanup
首先,这是个模块说明的结构体,用于LKM中,包括了模块名字、初始化和卸载的指针。
搜