如何修复这些不匹配



使用的GCC:Linaro GCC 4.7/4.8/4.93/6.4/7.3,但版本似乎没有意义

操作系统:更新了Linux Mint 19和4.17.2-ext73-57.2内核。

我试着编译了一些源代码(例如官方LineageOS源代码(,每次我得到它:

WARNING: vmlinux.o(.data+0x10f40): Section mismatch in reference from the 
variable gdsc_driver to the (unknown reference) .init.data:(unknown)
The variable gdsc_driver references
the (unknown reference) __initdata (unknown)
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: vmlinux.o(.data+0x1c064): Section mismatch in reference from the variable msm_cpu_pm_snoc_client_driver to the (unknown reference) .init.data:(unknown)
The variable msm_cpu_pm_snoc_client_driver references
the (unknown reference) __initdata (unknown)
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: vmlinux.o(.data+0x1c0b4): Section mismatch in reference from the variable msm_cpu_pm_driver to the (unknown reference) .init.data:(unknown)
The variable msm_cpu_pm_driver references
the (unknown reference) __initdata (unknown)
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: vmlinux.o(.data+0x1c104): Section mismatch in reference from the variable msm_cpu_status_driver to the (unknown reference) .init.data:(unknown)
The variable msm_cpu_status_driver references
the (unknown reference) __initdata (unknown)
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: vmlinux.o(.data+0x1c4e0): Section mismatch in reference from the variable msm_rpm_device_driver to the (unknown reference) .init.data:(unknown)
The variable msm_rpm_device_driver references
the (unknown reference) __initdata (unknown)
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: vmlinux.o(.data+0x1c648): Section mismatch in reference from the variable cpu_modes_driver to the (unknown reference) .init.data:(unknown)
The variable cpu_modes_driver references
the (unknown reference) __initdata (unknown)
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: vmlinux.o(.data+0x1c698): Section mismatch in reference from the variable system_modes_driver to the (unknown reference) .init.data:(unknown)
The variable system_modes_driver references
the (unknown reference) __initdata (unknown)
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: vmlinux.o(.data+0x1c6e8): Section mismatch in reference from the variable lpm_levels_driver to the (unknown reference) .init.data:(unknown)
The variable lpm_levels_driver references
the (unknown reference) __initdata (unknown)
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
/home/laptopfalcon/android_kernel_motorola_msm8226-oreo-turbo/scripts/Makefile.modpost:98: recipe for target 'vmlinux.o' failed
make[1]: *** [vmlinux.o] Error 1
Makefile:961: recipe for target 'vmlinux.o' failed
make: *** [vmlinux.o] Error 2

我该怎么办?我试图搜索返回的变量,但没有找到任何提示。我无法正确编译任何源代码,所以我打赌我的电脑有问题,但我不知道如何调试。

我遇到过同样的问题!您可以先尝试将'CONFIG_NO_ERROR_ON_MISMATCH=y'添加到'make中,然后看看会发生什么,但它并没有解决我的问题。我不得不通过将">CONFIG_DEBUG_SECTION_ISMATCH=y"放入">make中来解释不匹配。

然后,这些不匹配会得到一个更令人愉快的调试输出(错误日志(,接下来你复制其中的一些并将其放在谷歌上,希望有人能找到同样的路径。我的补丁是成功的,因为我发现了这个补丁https://github.com/LIMYOONAOS/android_kernel_leeco_x2-msm8996/commit/736f808bfefde74fdc8f6294c44f5c77a8e1d741

祝你好运!

相关内容

  • 没有找到相关文章

最新更新