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 17 LOCAL_PATH := $(call my-dir) 18 19 include $(CLEAR_VARS) 20 LOCAL_MODULE := libidiv 21 LOCAL_SRC_FILES:= idiv.cpp 22 LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter 23 include $(BUILD_SHARED_LIBRARY) 24 25 include $(CLEAR_VARS) 26 LOCAL_MODULE := libthrow 27 LOCAL_SRC_FILES:= throw.cpp 28 LOCAL_CFLAGS := -Wall -Werror -frtti -fexceptions 29 LOCAL_SHARED_LIBRARIES = libidiv 30 include $(BUILD_SHARED_LIBRARY)