• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

修订版c45e40ff18445bff25be6ad0562c97acf557ef44 (tree)
时间2016-09-04 08:46:51
作者David Ng <dave@code...>
CommiterSteve Kondik

Log Message

Add optional target-specific LD_PRELOAD to environment

Append additional libraries defined in TARGET_LDPRELOAD to the
LD_PRELOAD environment if it is defined.

Conflicts:

rootdir/init.environ.rc.in

Change-Id: I15f083df87605d2b708b56311430e11409a09dd7

更改概述

差异

--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -78,16 +78,21 @@ endif
7878
7979 include $(BUILD_SYSTEM)/base_rules.mk
8080
81-# Regenerate init.environ.rc if PRODUCT_BOOTCLASSPATH has changed.
82-bcp_md5 := $(word 1, $(shell echo $(PRODUCT_BOOTCLASSPATH) $(PRODUCT_SYSTEM_SERVER_CLASSPATH) | $(MD5SUM)))
81+# Regenerate init.environ.rc if PRODUCT_BOOTCLASSPATH or TARGET_LDPRELOAD has changed.
82+bcp_md5 := $(word 1, $(shell echo $(PRODUCT_BOOTCLASSPATH) $(PRODUCT_SYSTEM_SERVER_CLASSPATH) $(TARGET_LDPRELOAD) | $(MD5SUM)))
8383 bcp_dep := $(intermediates)/$(bcp_md5).bcp.dep
8484 $(bcp_dep) :
8585 $(hide) mkdir -p $(dir $@) && rm -rf $(dir $@)*.bcp.dep && touch $@
8686
87+ifneq ($(strip $(TARGET_LDPRELOAD)),)
88+ TARGET_LDPRELOAD_STR := :$(TARGET_LDPRELOAD)
89+endif
90+
8791 $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/init.environ.rc.in $(bcp_dep)
8892 @echo "Generate: $< -> $@"
8993 @mkdir -p $(dir $@)
90- $(hide) sed -e 's?%BOOTCLASSPATH%?$(PRODUCT_BOOTCLASSPATH)?g' $< >$@
94+ $(hide) sed -e 's?%BOOTCLASSPATH%?$(PRODUCT_BOOTCLASSPATH)?g'\
95+ -e 's?%TARGET_LDPRELOAD%?$(TARGET_LDPRELOAD_STR)?g' $< >$@
9196 $(hide) sed -i -e 's?%SYSTEMSERVERCLASSPATH%?$(PRODUCT_SYSTEM_SERVER_CLASSPATH)?g' $@
9297 $(hide) sed -i -e 's?%EXPORT_GLOBAL_ASAN_OPTIONS%?$(EXPORT_GLOBAL_ASAN_OPTIONS)?g' $@
9398
--- a/rootdir/init.environ.rc.in
+++ b/rootdir/init.environ.rc.in
@@ -9,4 +9,5 @@ on init
99 export ASEC_MOUNTPOINT /mnt/asec
1010 export BOOTCLASSPATH %BOOTCLASSPATH%
1111 export SYSTEMSERVERCLASSPATH %SYSTEMSERVERCLASSPATH%
12+ export LD_PRELOAD libsigchain.so%TARGET_LDPRELOAD%
1213 %EXPORT_GLOBAL_ASAN_OPTIONS%