0

I want to build a linux kernel with as many C source files as possible for testing, so I use make allyesconfig at first. Meanwhile I need debug info, so I tried some ways to add it:

  1. make menuconfig and open the debuginfo option.
  2. modify the "CONFIG_DEBUG_INFO_NONE=y" to "CONFIG_DEBUG_INFO=y"

and then run make, however an error happen for the both two ways: "FATAL: modpost: vmlinux.o is truncated. sechdrs[i].sh_offset=572324920 > sizeof(*hrd)=64 make[1]: *** [scripts/Makefile.modpost:56: vmlinux.symvers] Error 1 make: *** [Makefile:1169: vmlinux] Error 2"

so I'm confused, how could I add debug info when I use the allyesconfig? The tested versions of my kernel is 6.0-rc6 and 6.0

Absoler
  • 1
  • 1
  • Are you building 32-bit or 64-bit? – 0andriy Feb 19 '23 at 14:50
  • x86-64, and now I tried the latest 6.1.12, the error message is "objcopy: warning: vmlinux.o has a corrupt section with a size (8d23f823) larger than the file size objcopy: warning: vmlinux.o has a corrupt section with a size (c987b988) larger than the file size objcopy: warning: vmlinux.o has a corrupt section with a size (4bba10f9) larger than the file size objcopy: vmlinux.o[.modinfo]: file truncated make[1]: *** [scripts/Makefile.vmlinux_o:72: modules.builtin.modinfo] Error 1 make: *** [Makefile:1229: vmlinux_o] Error 2" – Absoler Feb 19 '23 at 16:42
  • Please provide enough code so others can better understand or reproduce the problem. – Community Feb 20 '23 at 05:50

0 Answers0