Fix errors found by prebuilt ELF checker

This commit fixes several errors that are found by prebuilt ELF checker:

* Add missing LOCAL_SHARED_LIBRARIES for prebuilt binaries
* Add `LOCAL_CHECK_ELF_FILES := false` to bypass checks on
  `libbccArm.so` and `vulkan.hikey960.so`.

Bug: 119086738
Test: lunch hikey960-userdebug && \
      CHECK_ELF_FILES=true make check-elf-files
Change-Id: I173a47b95c9dc3111e5dfc1f2e5da1865b65311f
diff --git a/mali/bifrost/Android.mk b/mali/bifrost/Android.mk
index a4f6ace..4ea05a7 100644
--- a/mali/bifrost/Android.mk
+++ b/mali/bifrost/Android.mk
@@ -19,6 +19,7 @@
 LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib/egl/
 LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64/egl/
 LOCAL_MULTILIB := both
+LOCAL_SHARED_LIBRARIES := android.hardware.graphics.common@1.0 libz libnativewindow libc++ liblog libm libc libdl
 include $(BUILD_PREBUILT)
 
 include $(CLEAR_VARS)
@@ -28,6 +29,9 @@
 LOCAL_SRC_FILES_arm64 := lib64/$(LOCAL_MODULE)
 LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64/
 LOCAL_MULTILIB := 64
+# Bypass prebuilt ELF check because libLLVM is not a module (it is copied by
+# PRODUCT_COPY_FILES instead).
+LOCAL_CHECK_ELF_FILES := false
 include $(BUILD_PREBUILT)
 
 include $(CLEAR_VARS)
@@ -39,6 +43,7 @@
 LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib/
 LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64/
 LOCAL_MULTILIB := both
+LOCAL_SHARED_LIBRARIES := libRS_internal libRSCpuRef liblog libnativewindow libbcinfo libdl libc++ libc libm
 include $(BUILD_PREBUILT)
 
 include $(CLEAR_VARS)
@@ -61,6 +66,10 @@
 LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib/hw
 LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64/hw
 LOCAL_MULTILIB := both
+LOCAL_SHARED_LIBRARIES := android.hardware.graphics.common@1.0 libz libnativewindow libc++ liblog libm libc libdl
+# Bypass prebuilt ELF check because the DT_SONAME "libGLES_mali.so" is
+# different from LOCAL_MODULE "vulkan.hikey960.so".
+LOCAL_CHECK_ELF_FILES := false
 include $(BUILD_PREBUILT)
 
 endif
diff --git a/mali/utgard/Android.mk b/mali/utgard/Android.mk
index 071cdd2..3e9ccec 100644
--- a/mali/utgard/Android.mk
+++ b/mali/utgard/Android.mk
@@ -8,6 +8,7 @@
 LOCAL_SRC_FILES_arm := $(LOCAL_MODULE)
 LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)
 LOCAL_MULTILIB := 32
+LOCAL_SHARED_LIBRARIES := libc++ libc libdl liblog libm
 include $(BUILD_PREBUILT)
 
 include $(CLEAR_VARS)
@@ -19,6 +20,7 @@
 LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib/egl/
 LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64/egl/
 LOCAL_MULTILIB := both
+LOCAL_SHARED_LIBRARIES := libc++ libc libdl liblog libm
 include $(BUILD_PREBUILT)
 
 endif