文章目录
一、编译型issue
2021.11.22_gcc_编译中"cold"及"hot"的问题
问题及解释:
"cold"表示冷门函数被调用,不过多优化,不放入缓存。“hot”表示被频繁调用,放入缓存。酌情考虑是否要替换相关函数及程序优化问题。
include/linux/init.h:363:7: warning: ‘cleanup_module’ specifies less restrictive attribute than its target ‘my_mod_1_exit’: ‘cold’
二、应用时出现的相关issue
2021.11.22_brcm_“insmod module.ko"报错"invalid module format”
问题:内核污染,gcc版本相同。
<4>dt_demo: loading out-of-tree module taints kernel.
<3>dt_demo: sections missing
<3>dt_demo: sections missing
解决(治标不治本):关闭博通平台PLTS选项,定义如下
# 定义
2799 if [ "$KERNEL_ARCH" = "arm" ]; then
2800 bool 'Enable ARM_MODULE_PLTS to allow large modules' BUILD_ARM_PLTS
2801 fi
# 修改,注释,make clean -> make
614 BUILD_ARM_PLTS=y
-->
614 # BUILD_ARM_PLTS=y