ANDROID: GKI: Multi arch exports protection support
ABI is being implemented for x86_64, making it necessary
to support protected exports header file generation for
the GKI modules for multiple architecture.
Enable support to select required inputs based on the ARCH
to generate gki_module_protected_exports.h during kernel
build.
Inputs for generating gki_module_protected_exports.h are:
ARCH = arm64:
ABI Protected exports list: abi_gki_protected_exports_aarch64
Protected GKI modules list: gki_aarch64_protected_modules
ARCH = x86_64:
ABI Protected exports list: abi_gki_protected_exports_x86_64
Protected GKI modules list: gki_x86_64_protected_modules
Test: TH
Test: Manual verification of the generated header file
Test: bazel run //common:kernel_aarch64_abi_update_protected_exports
Bug: 151893768
Change-Id: Ic4bcb2732199b71a7973b5ce4c852bcd95d37131
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
(cherry picked from commit bf07621480a22ed6254731244d14fc7d1d5070f1)
diff --git a/BUILD.bazel b/BUILD.bazel
index 1241755..d1e0be1 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -34,8 +34,8 @@
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
"kmi_symbol_list": "android/abi_gki_aarch64",
"additional_kmi_symbol_lists": _aarch64_additional_kmi_symbol_lists,
- "protected_exports_list": "android/abi_gki_protected_exports",
- "protected_modules_list": "android/gki_protected_modules",
+ "protected_exports_list": "android/abi_gki_protected_exports_aarch64",
+ "protected_modules_list": "android/gki_aarch64_protected_modules",
},
"kernel_aarch64_16k": {
"kmi_symbol_list_strict_mode": False,
@@ -46,16 +46,20 @@
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
"kmi_symbol_list": "android/abi_gki_aarch64",
"additional_kmi_symbol_lists": _aarch64_additional_kmi_symbol_lists,
- "protected_exports_list": "android/abi_gki_protected_exports",
- "protected_modules_list": "android/gki_protected_modules",
+ "protected_exports_list": "android/abi_gki_protected_exports_aarch64",
+ "protected_modules_list": "android/gki_aarch64_protected_modules",
},
"kernel_x86_64": {
"kmi_symbol_list_strict_mode": False,
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
+ "protected_exports_list": "android/abi_gki_protected_exports_x86_64",
+ "protected_modules_list": "android/gki_x86_64_protected_modules",
},
"kernel_x86_64_debug": {
"kmi_symbol_list_strict_mode": False,
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
+ "protected_exports_list": "android/abi_gki_protected_exports_x86_64",
+ "protected_modules_list": "android/gki_x86_64_protected_modules",
},
})