ANDROID: disable KABI macros for VDSO and EFI libstub
If BUILD_VDSO or __DISABLED_EXPORTS are defined, mostly disable the KABI macros to prevent VDSO and EFI libstub link errors. Bug: 400972353 Change-Id: I8031509bc5b481f0350735ecdf6c79f6d885daeb Suggested-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Giuliano Procida <gprocida@google.com> Signed-off-by: John Stultz <jstultz@google.com>
This commit is contained in:
committed by
Treehugger Robot
parent
52cc64794a
commit
31e7de7400
@@ -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
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user