The COPY_HEADERS lines like below added in Makefiles are breaking BTF.
|
COPY_HEADERS:=$(shell cp $(ES_DEV_DMA_BUF_HEADER)/*.h include/linux) |
To reproduce enable BTF options:
CONFIG_DEBUG_INFO_BTF=y
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
CONFIG_DEBUG_INFO_BTF_MODULES=y
CONFIG_PROBE_EVENTS_BTF_ARGS=y
Then build the kernel and modules.
Copying the headers in place when make Image.gz is run causes vmlinux to get rebuilt when make modules is run and results in errors when loading any modules:
[ 403.886685] BPF: [128333] FUNC
[ 403.889941] BPF: type_id=128305
[ 403.893098] BPF:
[ 403.895117] BPF: Invalid name
[ 403.898094] BPF:
[ 403.900029] failed to validate module [zram] BTF: -22
The COPY_HEADERS lines like below added in Makefiles are breaking BTF.
linux-stable/drivers/memory/eswin/es_dev_buf/Makefile
Line 4 in 5088af9
To reproduce enable BTF options:
Then build the kernel and modules.
Copying the headers in place when
make Image.gzis run causes vmlinux to get rebuilt whenmake modulesis run and results in errors when loading any modules: