bsd_signal is a deprecated synonym for the signal. Nevertheless there are apps and libraries calling this function. libsigchain needs to intercept these calls and handle them the same way it handles signal() call. Bug: http://b/30562229 Test: readelf --dyn-sym app_process32 and check that bsd_signal is exported readelf --dyn-sym app_process64 and check that bsd_signal is not exported Change-Id: Iec584070b42bc7fa43b114c0f884aff2db5a6858
81 lines
2.1 KiB
Makefile
81 lines
2.1 KiB
Makefile
LOCAL_PATH:= $(call my-dir)
|
|
|
|
# This is a list of libraries that need to be included in order to avoid
|
|
# bad apps. This prevents a library from having a mismatch when resolving
|
|
# new/delete from an app shared library.
|
|
# See b/21032018 for more details.
|
|
app_process_common_shared_libs := \
|
|
libwilhelm \
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_SRC_FILES:= \
|
|
app_main.cpp
|
|
|
|
LOCAL_LDFLAGS_32 := -Wl,--version-script,art/sigchainlib/version-script32.txt -Wl,--export-dynamic
|
|
LOCAL_LDFLAGS_64 := -Wl,--version-script,art/sigchainlib/version-script64.txt -Wl,--export-dynamic
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
libdl \
|
|
libcutils \
|
|
libutils \
|
|
liblog \
|
|
libbinder \
|
|
libnativeloader \
|
|
libandroid_runtime \
|
|
$(app_process_common_shared_libs) \
|
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
|
|
|
|
LOCAL_MODULE:= app_process
|
|
LOCAL_MULTILIB := both
|
|
LOCAL_MODULE_STEM_32 := app_process32
|
|
LOCAL_MODULE_STEM_64 := app_process64
|
|
|
|
LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
|
|
|
|
include $(BUILD_EXECUTABLE)
|
|
|
|
# Create a symlink from app_process to app_process32 or 64
|
|
# depending on the target configuration.
|
|
include $(BUILD_SYSTEM)/executable_prefer_symlink.mk
|
|
|
|
# Build a variant of app_process binary linked with ASan runtime.
|
|
# ARM-only at the moment.
|
|
ifeq ($(TARGET_ARCH),arm)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_SRC_FILES:= \
|
|
app_main.cpp
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
libcutils \
|
|
libutils \
|
|
liblog \
|
|
libbinder \
|
|
libandroid_runtime \
|
|
$(app_process_common_shared_libs) \
|
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
|
|
|
|
LOCAL_LDFLAGS := -ldl
|
|
LOCAL_LDFLAGS_32 := -Wl,--version-script,art/sigchainlib/version-script32.txt -Wl,--export-dynamic
|
|
LOCAL_LDFLAGS_64 := -Wl,--version-script,art/sigchainlib/version-script64.txt -Wl,--export-dynamic
|
|
LOCAL_CPPFLAGS := -std=c++11
|
|
|
|
LOCAL_MODULE := app_process__asan
|
|
LOCAL_MULTILIB := both
|
|
LOCAL_MODULE_STEM_32 := app_process32
|
|
LOCAL_MODULE_STEM_64 := app_process64
|
|
|
|
LOCAL_SANITIZE := address
|
|
LOCAL_CLANG := true
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)/asan
|
|
|
|
LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
|
|
|
|
include $(BUILD_EXECUTABLE)
|
|
|
|
endif # ifeq($(TARGET_ARCH),arm)
|