1# This test is to demostrate the issue: 2# 3# hidden symbol '__cxa_begin_cleanup' in ./obj/local/armeabi/libgnustl_static.a(eh_arm.o) 4# is referenced by DSO ./obj/local/armeabi/libidiv.so 5# hidden symbol '__cxa_type_match' in ./obj/local/armeabi/libgnustl_static.a(eh_arm.o) 6# is referenced by DSO ./obj/local/armeabi/libidiv.so 7# 8# File idiv.cpp contains code potentially causes divide-by-zero exception. libidiv.so 9# is built with libgnustl_static.a which provides __cxa_begin_cleanup and 10# __cxa_type_match needed by unwinder in libgcc.a. Unfortunately both are built 11# with hidden visibility, and causes warnings as the above when libidiv.so is used 12# to link other binaries. 13# 14# The fix is to unhide both __cxa_begin_cleanup and __cxa_type_match 15# 16 17LOCAL_PATH := $(call my-dir) 18 19include $(CLEAR_VARS) 20LOCAL_MODULE := libidiv 21LOCAL_SRC_FILES:= idiv.cpp 22LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter 23include $(BUILD_SHARED_LIBRARY) 24 25include $(CLEAR_VARS) 26LOCAL_MODULE := libthrow 27LOCAL_SRC_FILES:= throw.cpp 28LOCAL_CFLAGS := -Wall -Werror -frtti -fexceptions 29LOCAL_SHARED_LIBRARIES = libidiv 30include $(BUILD_SHARED_LIBRARY)