查看: 116|回复: 0

内核编译告警Section mismatch in reference from the variable __ksymtab_rockchip_clk_register_armclk to the function .init.text:rockchip_clk_register_armclk()

[复制链接]

1

主题

7

回帖

20

积分

新手上路

积分
20
发表于 2025-4-3 15:02:35 | 显示全部楼层 |阅读模式
【问题描述】:内核编译告警出现以下告警
  1. [OHOS ERROR] WARNING: modpost: vmlinux.o(___ksymtab_gpl+rockchip_clk_register_armclk+0x0): Section mismatch in reference from the variable __ksymtab_rockchip_clk_register_armclk to the function .init.text:rockchip_clk_register_armclk()
  2. [OHOS ERROR] The symbol rockchip_clk_register_armclk is exported and annotated __init
  3. [OHOS ERROR] Fix this by removing the __init annotation of rockchip_clk_register_armclk or drop the export.
复制代码
【问题分析】:函数申明/定义的时候加了init作用域同时该函数又通过EXPORT_SYMBOL_GPL将该函数导出,从而导致两者的生命周期时间不一致【问题处理】:将函数申明/定义中的init删除或者将EXPORT_SYMBOL_GPL导出删除

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表