I am trying to set the CONFIG_DEBUG_INFO_BTF
option to y
in my Linux .config
file. For some reason, this config item is missing from .config
even after running make olddefconfig
, and when I manually add CONFIG_DEBUG_INFO_BTF=y
to .config
, the option is removed as soon as I run make
. What is happening?
When an option is omitted from .config
(and when it is removed from .config
by the build process automatically), this is the same as not having the option set.
Take a look at the Kconfig file where the option is originally defined. The option must have dependencies on other config options and these dependencies are not met, which is why the option is being automatically removed from .config
by the build process.
DEBUG_INFO_BTF
is defined in lib/Kconfig.debug
. Here is the definition:
config DEBUG_INFO_BTF
bool "Generate BTF typeinfo"
depends on !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED
depends on !GCC_PLUGIN_RANDSTRUCT || COMPILE_TEST
help
Generate deduplicated BTF type information from DWARF debug info.
Turning this on expects presence of pahole tool, which will convert
DWARF type info into equivalent deduplicated BTF type info.
DEBUG_INFO_BTF
depends on the DEBUG_INFO_SPLIT
option being turned off. In my .config
file, CONFIG_DEBUG_INFO_SPLIT
was set to y
, which is why CONFIG_DEBUG_INFO_BTF=y
was being removed automatically by the build process (and why the option was omitted originally from my .config
file). Unsetting the DEBUG_INFO_SPLIT
option fixed my issue.