summaryrefslogtreecommitdiffstats
path: root/cmds/app_process
diff options
context:
space:
mode:
authorDmitriy Ivanov <dimitry@google.com>2014-10-07 13:34:42 -0700
committerDmitriy Ivanov <dimitry@google.com>2014-10-09 15:03:07 -0700
commit96e0cfa721925550b1cc39cdfd6084a878e6ffe2 (patch)
tree40fb74227d09c3abef60b8799038c1bab8358ca1 /cmds/app_process
parentae1b6805a2609759186af8d7131c4750e011019a (diff)
downloadframeworks_base-96e0cfa721925550b1cc39cdfd6084a878e6ffe2.zip
frameworks_base-96e0cfa721925550b1cc39cdfd6084a878e6ffe2.tar.gz
frameworks_base-96e0cfa721925550b1cc39cdfd6084a878e6ffe2.tar.bz2
Link sigchain to main executable
Also export necessary symbols to preempt calls from libart.so Bug: 15345057 Bug: 15426766 Change-Id: If0b7f59a59824e30aa0c33dad76c7a44932180de
Diffstat (limited to 'cmds/app_process')
-rw-r--r--cmds/app_process/Android.mk17
-rw-r--r--cmds/app_process/sigchain_proxy.cpp17
2 files changed, 32 insertions, 2 deletions
diff --git a/cmds/app_process/Android.mk b/cmds/app_process/Android.mk
index 74a2f7b..1ca14a6 100644
--- a/cmds/app_process/Android.mk
+++ b/cmds/app_process/Android.mk
@@ -2,10 +2,18 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
+# TODO: Trying to link libsigchain as a static library prevents
+# static linker from exporting necessary symbols. So as a workaround
+# we use sigchain.o
LOCAL_SRC_FILES:= \
- app_main.cpp
+ app_main.cpp \
+ sigchain_proxy.cpp
+
+LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
+LOCAL_CPPFLAGS := -std=c++11 -Iart
LOCAL_SHARED_LIBRARIES := \
+ libdl \
libcutils \
libutils \
liblog \
@@ -28,8 +36,10 @@ ifeq ($(TARGET_ARCH),arm)
include $(CLEAR_VARS)
+# see comment above (~l5)
LOCAL_SRC_FILES:= \
- app_main.cpp
+ app_main.cpp \
+ sigchain_proxy.cpp
LOCAL_SHARED_LIBRARIES := \
libcutils \
@@ -38,6 +48,9 @@ LOCAL_SHARED_LIBRARIES := \
libbinder \
libandroid_runtime
+LOCAL_LDFLAGS := -ldl -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
+LOCAL_CPPFLAGS := -std=c++11 -Iart
+
LOCAL_MODULE := app_process__asan
LOCAL_MODULE_TAGS := eng
LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)/asan
diff --git a/cmds/app_process/sigchain_proxy.cpp b/cmds/app_process/sigchain_proxy.cpp
new file mode 100644
index 0000000..bb7a678
--- /dev/null
+++ b/cmds/app_process/sigchain_proxy.cpp
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "sigchainlib/sigchain.cc"