OSDN Git Service

Keep the symbol table in the shared libraries.
authorChristopher Ferris <cferris@google.com>
Tue, 1 Apr 2014 19:29:09 +0000 (12:29 -0700)
committerChristopher Ferris <cferris@google.com>
Wed, 2 Apr 2014 03:55:59 +0000 (20:55 -0700)
In order to allow the unwinder code to have meaningful names for
art functions, leave the symbol table.

Here are the size increases:

Platform    Size Increase
--------    -------------
arm         ~631K
arm64       ~631K
mips        ~424K
x86         ~565K
x86_64      ~565K

Bug: 12958251
Change-Id: Ib8bf11bef648f8296f4d6544f7b2af0d7f969ad8

runtime/Android.mk

index e8224cd..c8d294a 100644 (file)
@@ -436,6 +436,11 @@ $$(ENUM_OPERATOR_OUT_GEN): $$(GENERATED_SRC_DIR)/%_operator_out.cc : $(LOCAL_PAT
   endif
 
   ifeq ($$(art_target_or_host),target)
+    ifneq ($$(art_ndebug_or_debug),debug)
+      # Leave the symbols in the shared library so that stack unwinders can
+      # produce meaningful name resolution.
+      LOCAL_STRIP_MODULE := keep_symbols
+    endif
     include $(BUILD_SHARED_LIBRARY)
   else # host
     include $(BUILD_HOST_SHARED_LIBRARY)