--- zzzz-none-000/linux-4.4.271/include/linux/module.h 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/include/linux/module.h 2023-04-19 10:22:30.000000000 +0000 @@ -169,9 +169,10 @@ /* Generic info of form tag = "info" */ #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) +#define MODULE_INFO_STRIP(tag, info) __MODULE_INFO_STRIP(tag, tag, info) /* For userspace: you can also call me... */ -#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias) +#define MODULE_ALIAS(_alias) MODULE_INFO_STRIP(alias, _alias) /* Soft module dependencies. See man modprobe.d for details. * Example: MODULE_SOFTDEP("pre: module-foo module-bar post: module-baz") @@ -212,12 +213,12 @@ * Author(s), use "Name " or just "Name", for multiple * authors use multiple MODULE_AUTHOR() statements/lines. */ -#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author) +#define MODULE_AUTHOR(_author) MODULE_INFO_STRIP(author, _author) /* What your module does. */ -#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description) +#define MODULE_DESCRIPTION(_description) MODULE_INFO_STRIP(description, _description) -#ifdef MODULE +#if defined(MODULE) && !defined(CONFIG_MODULE_STRIPPED) /* Creates an alias so file2alias.c can find device table. */ #define MODULE_DEVICE_TABLE(type, name) \ extern const typeof(name) __mod_##type##__##name##_device_table \ @@ -244,7 +245,9 @@ */ #if defined(MODULE) || !defined(CONFIG_SYSFS) -#define MODULE_VERSION(_version) MODULE_INFO(version, _version) +#define MODULE_VERSION(_version) MODULE_INFO_STRIP(version, _version) +#elif defined(CONFIG_MODULE_STRIPPED) +#define MODULE_VERSION(_version) __MODULE_INFO_DISABLED(version) #else #define MODULE_VERSION(_version) \ static struct module_version_attribute ___modver_attr = { \ @@ -266,7 +269,7 @@ /* Optional firmware file (or files) needed by the module * format is simply firmware file name. Multiple firmware * files require multiple MODULE_FIRMWARE() specifiers */ -#define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware) +#define MODULE_FIRMWARE(_firmware) MODULE_INFO_STRIP(firmware, _firmware) /* Given an address, look for it in the exception tables */ const struct exception_table_entry *search_exception_tables(unsigned long add);