module: Avoid ABI changes when debug info is disabled
authorBen Hutchings <benh@debian.org>
Wed, 2 Mar 2022 20:22:28 +0000 (21:22 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Mon, 18 Apr 2022 12:36:36 +0000 (13:36 +0100)
commit0922bcda3b0fe20cf1da5b32f387155607179755
treef2a2645ab3a900200c2fdfb51b5f904f86ffe513
parenteaa7a6e3a74212086e225674c3a8a1b6464b2634
module: Avoid ABI changes when debug info is disabled

Forwarded: not-needed

CI builds are done with debug info disabled, but this removes some
members from struct module and replaces some BTF-related exports with
static definitions.  This causes builds to fail if there is an ABI
reference for the current ABI.

- Add a new config symbol DEBUG_INFO_BTF_MODULES_NOOP which can be
  enabled when DEBUG_INFO is not enabled
- When the symbol is enabled:
  - Define the BTF-related members of struct module
  - Export the no-op definitions of BTF-related functions
  - Define and export the same BTF-related static lists

Gbp-Pq: Topic debian
Gbp-Pq: Name module-avoid-abi-changes-when-debug-info-is-disabled.patch
include/linux/btf.h
include/linux/module.h
kernel/bpf/btf.c
lib/Kconfig.debug