diff --git a/include/linux/android_kabi.h b/include/linux/android_kabi.h index f5cc7c48477e..f36faf4654cd 100644 --- a/include/linux/android_kabi.h +++ b/include/linux/android_kabi.h @@ -42,11 +42,15 @@ * Worker macros, don't use these, use the ones without a leading '_' */ +#if defined(BUILD_VDSO) || defined(__DISABLE_EXPORTS) +#define __ANDROID_KABI_RULE(hint, target, value) +#else #define __ANDROID_KABI_RULE(hint, target, value) \ static const char CONCATENATE(__gendwarfksyms_rule_, \ __COUNTER__)[] __used __aligned(1) \ __section(".discard.gendwarfksyms.kabi_rules") = \ "1\0" #hint "\0" target "\0" value +#endif #define _ANDROID_KABI_RULE(hint, target, value) \ __ANDROID_KABI_RULE(hint, #target, #value) @@ -66,6 +70,9 @@ __stringify(_new)); \ } +#if defined(BUILD_VDSO) || defined(__DISABLE_EXPORTS) +#define _ANDROID_KABI_REPLACE(_orig, _new) _new +#else #define _ANDROID_KABI_REPLACE(_orig, _new) \ union { \ _new; \ @@ -74,6 +81,7 @@ }; \ _ANDROID_KABI_NORMAL_SIZE_ALIGN(_orig, _new); \ } +#endif /*