# Check the correctness of the prebuilt ELF files # # This check ensures that DT_SONAME matches with the filename, DT_NEEDED # matches the shared libraries specified in LOCAL_SHARED_LIBRARIES, and all # undefined symbols in the prebuilt binary can be found in one of the shared # libraries specified in LOCAL_SHARED_LIBRARIES. # # Inputs: # - LOCAL_ALLOW_UNDEFINED_SYMBOLS # - LOCAL_IGNORE_MAX_PAGE_SIZE # - LOCAL_BUILT_MODULE # - LOCAL_IS_HOST_MODULE # - LOCAL_MODULE_CLASS # - TARGET_CHECK_PREBUILT_MAX_PAGE_SIZE # - TARGET_MAX_PAGE_SIZE_SUPPORTED # - intermediates # - my_installed_module_stem # - my_prebuilt_src_file # - my_check_elf_file_shared_lib_files # - my_system_shared_libraries
ifndef LOCAL_IS_HOST_MODULE ifneq ($(filter $(LOCAL_MODULE_CLASS),SHARED_LIBRARIES EXECUTABLES NATIVE_TESTS),)
check_elf_files_stamp := $(intermediates)/check_elf_files.timestamp
$(check_elf_files_stamp): PRIVATE_SONAME := $(if $(filter $(LOCAL_MODULE_CLASS),SHARED_LIBRARIES),$(my_installed_module_stem))
$(check_elf_files_stamp): PRIVATE_ALLOW_UNDEFINED_SYMBOLS := $(LOCAL_ALLOW_UNDEFINED_SYMBOLS)
$(check_elf_files_stamp): PRIVATE_SYSTEM_SHARED_LIBRARIES := $(my_system_shared_libraries) # PRIVATE_SHARED_LIBRARY_FILES are file paths to built shared libraries. # In addition to $(my_check_elf_file_shared_lib_files), some file paths are # added by `resolve-shared-libs-for-elf-file-check` from `core/main.mk`.
$(check_elf_files_stamp): PRIVATE_SHARED_LIBRARY_FILES := $(my_check_elf_file_shared_lib_files)
# For different page sizes to work, we must support a larger max page size # as well as properly reflect page size at runtime. Limit this check, since many # devices set the max page size (for future proof) than actually use the # larger page size. ifeq ($(strip $(TARGET_CHECK_PREBUILT_MAX_PAGE_SIZE)),true) ifeq ($(strip $(LOCAL_IGNORE_MAX_PAGE_SIZE)),true)
$(check_elf_files_stamp): PRIVATE_MAX_PAGE_SIZE := else
$(check_elf_files_stamp): PRIVATE_MAX_PAGE_SIZE := $(TARGET_MAX_PAGE_SIZE_SUPPORTED) endif else
$(check_elf_files_stamp): PRIVATE_MAX_PAGE_SIZE := endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.