如何使用 `allyesconfig` 和调试信息构建 linux 内核

问题描述 投票:0回答:0

我想用尽可能多的C源文件构建一个linux内核来测试,所以我一开始就用make allyesconfig。同时我需要调试信息,所以我尝试了一些方法来添加它:

  1. make menuconfig 并打开 debuginfo 选项。
  2. 修改“CONFIG_DEBUG_INFO_NONE=y”为“CONFIG_DEBUG_INFO=y”

然后运行 make,但是这两种方式都会出错: “致命:modpost:vmlinux.o 被截断。sechdrs[i].sh_offset=572324920 > sizeof(*hrd)=64 make[1]: *** [scripts/Makefile.modpost:56: vmlinux.symvers] 错误 1 make: *** [Makefile:1169: vmlinux] 错误 2”

所以我很困惑,我怎么能在使用allyesconfig时添加调试信息?我内核的测试版本是 6.0-rc6 和 6.0

linux-kernel gnu-make dwarf debug-information
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.