8

Dead function is not removed from the shared object built from Android NDK

view full story
linux-howto

http://stackoverflow.com – We noticed that some dead functions are not removed from the generated shared object file (.so) that is built as release (via "ndk-build" without any parameter). To prove that we introduced a dummy function that is definitely not called anywhere (and is also not exported since the default visibility is already set to "hidden" for the whole .so). Somehow the symbol of the dummy function still exists and we can see it by using "nm" against the generated .so. We are using NDK r8d on Linux 11.10. Is there any specific compiler/linker flags that we need to apply to Android.mk in order to get th (HowTos)