summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiyong Park2018-05-29 02:41:30 -0500
committerJiyong Park2018-06-09 18:32:24 -0500
commit011ee12b1def041d71621da7740bf5784a5e6488 (patch)
tree5ff7a6883fd51d6a5e0a245cb085c6f3239282ad /debuggerd
parent7881135fa938fde4286a38b2304787ac070e6423 (diff)
downloadplatform-system-core-011ee12b1def041d71621da7740bf5784a5e6488.tar.gz
platform-system-core-011ee12b1def041d71621da7740bf5784a5e6488.tar.xz
platform-system-core-011ee12b1def041d71621da7740bf5784a5e6488.zip
Shared libs are supported in recovery mode
adbd has been built as a static executable since the same binary was copied to the recovery partition where shared library is not supported. However, since we now support shared library in the recovery partition, adbd is built as a dynamic executable. In addition, the dependency from adbd to libdebuggerd_handler is removed as debuggerd is handled by the dynamic linker. A few more modules in /system/core are marked as recovery_available: true as they are transitive dependencies of the dynamic linker. This change also includes ld.config.recovery.txt which is the linker config file for the recovery mode. It is installed to /etc/ld.config.txt and contains linker namespace config for the dynamic binaries under /sbin. Bug: 63673171 Test: `adb reboot recovery; adb devices` shows the device ID Test: Select 'mount /system' in the recovery mode, then `adb shell`. $ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from the /lib directory. Change-Id: I363d5a787863f1677ee40afb5d5841321ddaae77
Diffstat (limited to 'debuggerd')
-rw-r--r--debuggerd/Android.bp9
1 files changed, 8 insertions, 1 deletions
diff --git a/debuggerd/Android.bp b/debuggerd/Android.bp
index 0b1366209..1b20157b3 100644
--- a/debuggerd/Android.bp
+++ b/debuggerd/Android.bp
@@ -47,6 +47,7 @@ cc_library_shared {
47cc_library_static { 47cc_library_static {
48 name: "libtombstoned_client_static", 48 name: "libtombstoned_client_static",
49 defaults: ["debuggerd_defaults"], 49 defaults: ["debuggerd_defaults"],
50 recovery_available: true,
50 srcs: [ 51 srcs: [
51 "tombstoned/tombstoned_client.cpp", 52 "tombstoned/tombstoned_client.cpp",
52 "util.cpp", 53 "util.cpp",
@@ -90,7 +91,6 @@ cc_library_static {
90cc_library_static { 91cc_library_static {
91 name: "libdebuggerd_handler", 92 name: "libdebuggerd_handler",
92 defaults: ["debuggerd_defaults"], 93 defaults: ["debuggerd_defaults"],
93 recovery_available: true,
94 srcs: ["handler/debuggerd_fallback_nop.cpp"], 94 srcs: ["handler/debuggerd_fallback_nop.cpp"],
95 95
96 whole_static_libs: [ 96 whole_static_libs: [
@@ -104,6 +104,7 @@ cc_library_static {
104cc_library_static { 104cc_library_static {
105 name: "libdebuggerd_handler_fallback", 105 name: "libdebuggerd_handler_fallback",
106 defaults: ["debuggerd_defaults"], 106 defaults: ["debuggerd_defaults"],
107 recovery_available: true,
107 srcs: [ 108 srcs: [
108 "handler/debuggerd_fallback.cpp", 109 "handler/debuggerd_fallback.cpp",
109 ], 110 ],
@@ -120,6 +121,12 @@ cc_library_static {
120 "liblzma", 121 "liblzma",
121 "libcutils", 122 "libcutils",
122 ], 123 ],
124 target: {
125 recovery: {
126 cflags: ["-DNO_LIBDEXFILE_SUPPORT"],
127 exclude_static_libs: ["libdexfile"],
128 },
129 },
123 130
124 export_include_dirs: ["include"], 131 export_include_dirs: ["include"],
125} 132}