使用的GCC:Linaro-GCC 4.7 / 4.8 / 4.9.3 / 6.4 / 7.3,但版本似乎没有意义
OS:更新了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
我该怎么办?我试图搜索返回的变量,但没有找到任何提示。我无法正确编译任何源,因此我敢打赌我的PC出了点问题,但是我不知道如何调试它。
答案 0 :(得分:0)
我遇到了相同 问题!您可以先尝试将“ CONFIG_NO_ERROR_ON_MISMATCH = y ”添加到“ make ”中,然后看看会发生什么,但这并不能解决我的问题。我必须通过将' CONFIG_DEBUG_SECTION_MISMATCH = y '放入' make '中来明确显示不匹配项。
然后,这些不匹配项将获得更令人满意的调试输出(错误日志),接下来,您将其中的一些复制并放到Google上,以希望有人越过相同的道路。 我发现这个补丁 https://github.com/LIMYOONAOS/android_kernel_leeco_x2-msm8996/commit/736f808bfefde74fdc8f6294c44f5c77a8e1d741
证明我的成功祝你好运!