答:
注意: linux內核版本為4.14.108
一.修改對應內核源碼中的Makefile (到openwrt生成的build_dir中找)
將KBUILD_CFLAGS變量中的-O2改成-O1,讓編譯只進行簡單的優化
二.使能內核的編譯選項CONFIG_DEBUG_SECTION_MISMATCH,防止內聯 (可選)
make kernel_menuconfig (在menuconfig中使能選項CONFIG_DEBUG_SECTION_MISMATCH)
Symbol: DEBUG_SECTION_MISMATCH [=y]
Type: boolean
Prompt: Enable full Section mismatch analysis
Location:
-> Kernel hacking
-> Compile-time checks and compiler options