Kernel dso support for 'dl_iterate_phdr' function
Kernel provides virtual DSO for stack unwinding/exception handlind info for signal usage case. Stack unwinding routines use 'dl_iterate_phdr' function for additional DWARF info gathering from DSOs. Patch enables virtual DSO enumeration via dl_iterate_phdr function. Signed-off-by: Sergey Melnikov <sergey.melnikov@intel.com> Change-Id: Ic2882b28f40b456a088bc1e63c50cbfda7e4a102
This commit is contained in:
committed by
Elliott Hughes
parent
bfacb603e4
commit
c45087bffa
@@ -74,6 +74,7 @@ test_src_files = \
|
||||
regex_test.cpp \
|
||||
signal_test.cpp \
|
||||
stack_protector_test.cpp \
|
||||
stack_unwinding_test.cpp \
|
||||
stdio_test.cpp \
|
||||
stdlib_test.cpp \
|
||||
string_test.cpp \
|
||||
@@ -87,6 +88,18 @@ test_dynamic_ldflags = -Wl,--export-dynamic -Wl,-u,DlSymTestFunction
|
||||
test_dynamic_src_files = \
|
||||
dlfcn_test.cpp \
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := bionic-unit-tests-unwind-test-impl
|
||||
LOCAL_CFLAGS += $(test_c_flags) -fexceptions -fnon-call-exceptions
|
||||
LOCAL_SRC_FILES := stack_unwinding_test_impl.c
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := bionic-unit-tests-unwind-test-impl-host
|
||||
LOCAL_CFLAGS += $(test_c_flags) -fexceptions -fnon-call-exceptions
|
||||
LOCAL_SRC_FILES := stack_unwinding_test_impl.c
|
||||
include $(BUILD_HOST_STATIC_LIBRARY)
|
||||
|
||||
# Build tests for the device (with bionic's .so). Run with:
|
||||
# adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
|
||||
include $(CLEAR_VARS)
|
||||
@@ -97,6 +110,7 @@ LOCAL_LDFLAGS += $(test_dynamic_ldflags)
|
||||
LOCAL_SHARED_LIBRARIES += libdl
|
||||
LOCAL_SRC_FILES := $(test_src_files) $(test_dynamic_src_files)
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := bionic-unit-tests-clang
|
||||
LOCAL_STATIC_LIBRARIES += bionic-unit-tests-unwind-test-impl
|
||||
include $(BUILD_NATIVE_TEST)
|
||||
|
||||
# Build tests for the device (with bionic's .a). Run with:
|
||||
@@ -107,7 +121,7 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||
LOCAL_CFLAGS += $(test_c_flags)
|
||||
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
||||
LOCAL_SRC_FILES := $(test_src_files)
|
||||
LOCAL_STATIC_LIBRARIES += libstlport_static libstdc++ libm libc
|
||||
LOCAL_STATIC_LIBRARIES += libstlport_static libstdc++ libm libc bionic-unit-tests-unwind-test-impl
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := bionic-unit-tests-clang
|
||||
include $(BUILD_NATIVE_TEST)
|
||||
|
||||
@@ -142,6 +156,7 @@ LOCAL_CFLAGS += $(test_c_flags)
|
||||
LOCAL_LDFLAGS += -lpthread -ldl
|
||||
LOCAL_LDFLAGS += $(test_dynamic_ldflags)
|
||||
LOCAL_SRC_FILES := $(test_src_files) $(test_dynamic_src_files)
|
||||
LOCAL_STATIC_LIBRARIES += bionic-unit-tests-unwind-test-impl-host
|
||||
include $(BUILD_HOST_NATIVE_TEST)
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user