diff options
author | Justin Yun | 2018-02-01 22:22:02 -0600 |
---|---|---|
committer | Justin Yun | 2018-02-07 17:33:15 -0600 |
commit | 8a9a8eeb853ab6ebb5ec26bf50d731f08c32ad5d (patch) | |
tree | 53aa0313329efeda598a38be5b0a83d6b87bf973 /rootdir | |
parent | ab26cc4b121b259fa8734195738ee6cb6c336fa1 (diff) | |
download | platform-system-core-8a9a8eeb853ab6ebb5ec26bf50d731f08c32ad5d.tar.gz platform-system-core-8a9a8eeb853ab6ebb5ec26bf50d731f08c32ad5d.tar.xz platform-system-core-8a9a8eeb853ab6ebb5ec26bf50d731f08c32ad5d.zip |
Use actual VNDK list for non-VNDK-enforcing devices
Rename ld.config.txt.in to ld.config.vndk.txt and
ld.config.txt to ld.config.vndk_light.txt.
For FULL_TREBLE devices without BOARD_VNDK_VERSION, update the VNDK
library list in ld.config.vndk_light.txt with the actual VNDK list.
Bug: 69526027
Test: Build marlin/sailfish and check boot
Change-Id: Idbb0cc97d11037c1493d4739e84961297ce51dbd
Merged-In: Idbb0cc97d11037c1493d4739e84961297ce51dbd
Diffstat (limited to 'rootdir')
-rw-r--r-- | rootdir/Android.mk | 19 | ||||
-rw-r--r-- | rootdir/etc/ld.config.vndk.txt (renamed from rootdir/etc/ld.config.txt.in) | 0 | ||||
-rw-r--r-- | rootdir/etc/ld.config.vndk_light.txt (renamed from rootdir/etc/ld.config.txt) | 90 |
3 files changed, 28 insertions, 81 deletions
diff --git a/rootdir/Android.mk b/rootdir/Android.mk index d8163abd3..85bb73a52 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk | |||
@@ -192,11 +192,12 @@ endef # update_and_install_ld_config | |||
192 | # ld.config.txt | 192 | # ld.config.txt |
193 | # | 193 | # |
194 | # For VNDK enforced devices that have defined BOARD_VNDK_VERSION, use | 194 | # For VNDK enforced devices that have defined BOARD_VNDK_VERSION, use |
195 | # "ld.config.txt.in" as a source file. This configuration includes strict VNDK | 195 | # "ld.config.vndk.txt" as a source file. This configuration includes |
196 | # run-time restrictions for vendor process. | 196 | # strict VNDK run-time restrictions for vendor process. |
197 | # Other treblized devices, that have not defined BOARD_VNDK_VERSION or that | 197 | # Other treblized devices, that have not defined BOARD_VNDK_VERSION or that |
198 | # have set BOARD_VNDK_RUNTIME_DISABLE to true, use "ld.config.txt" as a source | 198 | # have set BOARD_VNDK_RUNTIME_DISABLE to true, use "ld.config.vndk_light.txt" |
199 | # file. This configuration does not have strict VNDK run-time restrictions. | 199 | # as a source file. This configuration does not have strict VNDK run-time |
200 | # restrictions. | ||
200 | # If the device is not treblized, use "ld.config.legacy.txt" for legacy | 201 | # If the device is not treblized, use "ld.config.legacy.txt" for legacy |
201 | # namespace configuration. | 202 | # namespace configuration. |
202 | include $(CLEAR_VARS) | 203 | include $(CLEAR_VARS) |
@@ -216,7 +217,7 @@ ifeq ($(_enforce_vndk_at_runtime),true) | |||
216 | LOCAL_MODULE_STEM := $(call append_vndk_version,$(LOCAL_MODULE)) | 217 | LOCAL_MODULE_STEM := $(call append_vndk_version,$(LOCAL_MODULE)) |
217 | include $(BUILD_SYSTEM)/base_rules.mk | 218 | include $(BUILD_SYSTEM)/base_rules.mk |
218 | $(eval $(call update_and_install_ld_config,\ | 219 | $(eval $(call update_and_install_ld_config,\ |
219 | $(LOCAL_PATH)/etc/ld.config.txt.in,\ | 220 | $(LOCAL_PATH)/etc/ld.config.vndk.txt,\ |
220 | $(LOCAL_BUILT_MODULE),\ | 221 | $(LOCAL_BUILT_MODULE),\ |
221 | $(PLATFORM_VNDK_VERSION))) | 222 | $(PLATFORM_VNDK_VERSION))) |
222 | 223 | ||
@@ -225,7 +226,7 @@ else ifeq ($(PRODUCT_TREBLE_LINKER_NAMESPACES)|$(SANITIZE_TARGET),true|) | |||
225 | LOCAL_MODULE_STEM := $(call append_vndk_version,$(LOCAL_MODULE)) | 226 | LOCAL_MODULE_STEM := $(call append_vndk_version,$(LOCAL_MODULE)) |
226 | include $(BUILD_SYSTEM)/base_rules.mk | 227 | include $(BUILD_SYSTEM)/base_rules.mk |
227 | $(eval $(call update_and_install_ld_config,\ | 228 | $(eval $(call update_and_install_ld_config,\ |
228 | $(LOCAL_PATH)/etc/ld.config.txt,\ | 229 | $(LOCAL_PATH)/etc/ld.config.vndk_light.txt,\ |
229 | $(LOCAL_BUILT_MODULE),\ | 230 | $(LOCAL_BUILT_MODULE),\ |
230 | $(if $(BOARD_VNDK_VERSION),$(PLATFORM_VNDK_VERSION)))) | 231 | $(if $(BOARD_VNDK_VERSION),$(PLATFORM_VNDK_VERSION)))) |
231 | 232 | ||
@@ -244,9 +245,9 @@ _enforce_vndk_at_runtime := | |||
244 | # | 245 | # |
245 | # This file is a temporary configuration file only for GSI. Originally GSI has | 246 | # This file is a temporary configuration file only for GSI. Originally GSI has |
246 | # BOARD_VNDK_VERSION defined and has strict VNDK enforcing rule based on | 247 | # BOARD_VNDK_VERSION defined and has strict VNDK enforcing rule based on |
247 | # "ld.config.txt.in". However for the devices, that have not defined | 248 | # "ld.config.vndk.txt". However for the devices, that have not defined |
248 | # BOARD_VNDK_VERSION, GSI provides this configuration file which is based on | 249 | # BOARD_VNDK_VERSION, GSI provides this configuration file which is based on |
249 | # "ld.config.txt". | 250 | # "ld.config.vndk_light.txt". |
250 | # Do not install this file for the devices other than GSI. | 251 | # Do not install this file for the devices other than GSI. |
251 | include $(CLEAR_VARS) | 252 | include $(CLEAR_VARS) |
252 | LOCAL_MODULE := ld.config.noenforce.txt | 253 | LOCAL_MODULE := ld.config.noenforce.txt |
@@ -255,7 +256,7 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_ETC) | |||
255 | LOCAL_MODULE_STEM := $(LOCAL_MODULE) | 256 | LOCAL_MODULE_STEM := $(LOCAL_MODULE) |
256 | include $(BUILD_SYSTEM)/base_rules.mk | 257 | include $(BUILD_SYSTEM)/base_rules.mk |
257 | $(eval $(call update_and_install_ld_config,\ | 258 | $(eval $(call update_and_install_ld_config,\ |
258 | $(LOCAL_PATH)/etc/ld.config.txt,\ | 259 | $(LOCAL_PATH)/etc/ld.config.vndk_light.txt,\ |
259 | $(LOCAL_BUILT_MODULE),\ | 260 | $(LOCAL_BUILT_MODULE),\ |
260 | $(PLATFORM_VNDK_VERSION))) | 261 | $(PLATFORM_VNDK_VERSION))) |
261 | 262 | ||
diff --git a/rootdir/etc/ld.config.txt.in b/rootdir/etc/ld.config.vndk.txt index c8d87c8f0..c8d87c8f0 100644 --- a/rootdir/etc/ld.config.txt.in +++ b/rootdir/etc/ld.config.vndk.txt | |||
diff --git a/rootdir/etc/ld.config.txt b/rootdir/etc/ld.config.vndk_light.txt index 5d97a73fd..5256cb153 100644 --- a/rootdir/etc/ld.config.txt +++ b/rootdir/etc/ld.config.vndk_light.txt | |||
@@ -82,35 +82,10 @@ namespace.sphal.asan.permitted.paths += /vendor/${LIB} | |||
82 | # libs listed here can be used. | 82 | # libs listed here can be used. |
83 | namespace.sphal.links = default,vndk,rs | 83 | namespace.sphal.links = default,vndk,rs |
84 | 84 | ||
85 | # WARNING: only NDK libs can be listed here. | 85 | namespace.sphal.link.default.shared_libs = %LLNDK_LIBRARIES% |
86 | namespace.sphal.link.default.shared_libs = libc.so | 86 | namespace.sphal.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
87 | namespace.sphal.link.default.shared_libs += libEGL.so | 87 | |
88 | namespace.sphal.link.default.shared_libs += libGLESv1_CM.so | 88 | namespace.sphal.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% |
89 | namespace.sphal.link.default.shared_libs += libGLESv2.so | ||
90 | namespace.sphal.link.default.shared_libs += libdl.so | ||
91 | namespace.sphal.link.default.shared_libs += liblog.so | ||
92 | namespace.sphal.link.default.shared_libs += libm.so | ||
93 | namespace.sphal.link.default.shared_libs += libnativewindow.so | ||
94 | namespace.sphal.link.default.shared_libs += libstdc++.so | ||
95 | namespace.sphal.link.default.shared_libs += libsync.so | ||
96 | namespace.sphal.link.default.shared_libs += libvndksupport.so | ||
97 | namespace.sphal.link.default.shared_libs += libz.so | ||
98 | |||
99 | # WARNING: only VNDK-SP libs can be listed here. DO NOT EDIT this line. | ||
100 | namespace.sphal.link.vndk.shared_libs = android.hardware.renderscript@1.0.so | ||
101 | namespace.sphal.link.vndk.shared_libs += android.hardware.graphics.common@1.0.so | ||
102 | namespace.sphal.link.vndk.shared_libs += android.hardware.graphics.mapper@2.0.so | ||
103 | namespace.sphal.link.vndk.shared_libs += android.hidl.memory@1.0.so | ||
104 | namespace.sphal.link.vndk.shared_libs += libbase.so | ||
105 | namespace.sphal.link.vndk.shared_libs += libc++.so | ||
106 | namespace.sphal.link.vndk.shared_libs += libcutils.so | ||
107 | namespace.sphal.link.vndk.shared_libs += libhardware.so | ||
108 | namespace.sphal.link.vndk.shared_libs += libhidlbase.so | ||
109 | namespace.sphal.link.vndk.shared_libs += libhidlmemory.so | ||
110 | namespace.sphal.link.vndk.shared_libs += libhidltransport.so | ||
111 | namespace.sphal.link.vndk.shared_libs += libhwbinder.so | ||
112 | namespace.sphal.link.vndk.shared_libs += libion.so | ||
113 | namespace.sphal.link.vndk.shared_libs += libutils.so | ||
114 | 89 | ||
115 | # Renderscript gets separate namespace | 90 | # Renderscript gets separate namespace |
116 | namespace.sphal.link.rs.shared_libs = libRS_internal.so | 91 | namespace.sphal.link.rs.shared_libs = libRS_internal.so |
@@ -155,38 +130,13 @@ namespace.rs.asan.permitted.paths += /data | |||
155 | 130 | ||
156 | namespace.rs.links = default,vndk | 131 | namespace.rs.links = default,vndk |
157 | 132 | ||
158 | namespace.rs.link.default.shared_libs = libc.so | 133 | namespace.rs.link.default.shared_libs = %LLNDK_LIBRARIES% |
159 | namespace.rs.link.default.shared_libs += libEGL.so | 134 | namespace.rs.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
160 | namespace.rs.link.default.shared_libs += libGLESv1_CM.so | 135 | # Private LLNDK libs (e.g. libft2.so) are exceptionally allowed to this |
161 | namespace.rs.link.default.shared_libs += libGLESv2.so | 136 | # namespace because RS framework libs are using them. |
162 | namespace.rs.link.default.shared_libs += libdl.so | 137 | namespace.rs.link.default.shared_libs += %PRIVATE_LLNDK_LIBRARIES% |
163 | namespace.rs.link.default.shared_libs += liblog.so | 138 | |
164 | namespace.rs.link.default.shared_libs += libm.so | 139 | namespace.rs.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% |
165 | namespace.rs.link.default.shared_libs += libnativewindow.so | ||
166 | namespace.rs.link.default.shared_libs += libstdc++.so | ||
167 | namespace.rs.link.default.shared_libs += libsync.so | ||
168 | namespace.rs.link.default.shared_libs += libvndksupport.so | ||
169 | namespace.rs.link.default.shared_libs += libz.so | ||
170 | # These two libs are private LLNDK libs but are exceptionally visible | ||
171 | # in this 'rs' namespace because RenderScript framework libraries | ||
172 | # which are loaded into this namespace are using them. | ||
173 | namespace.rs.link.default.shared_libs += libft2.so | ||
174 | namespace.rs.link.default.shared_libs += libmediandk.so | ||
175 | |||
176 | namespace.rs.link.vndk.shared_libs = android.hardware.renderscript@1.0.so | ||
177 | namespace.rs.link.vndk.shared_libs += android.hardware.graphics.common@1.0.so | ||
178 | namespace.rs.link.vndk.shared_libs += android.hardware.graphics.mapper@2.0.so | ||
179 | namespace.rs.link.vndk.shared_libs += android.hidl.memory@1.0.so | ||
180 | namespace.rs.link.vndk.shared_libs += libbase.so | ||
181 | namespace.rs.link.vndk.shared_libs += libc++.so | ||
182 | namespace.rs.link.vndk.shared_libs += libcutils.so | ||
183 | namespace.rs.link.vndk.shared_libs += libhardware.so | ||
184 | namespace.rs.link.vndk.shared_libs += libhidlbase.so | ||
185 | namespace.rs.link.vndk.shared_libs += libhidlmemory.so | ||
186 | namespace.rs.link.vndk.shared_libs += libhidltransport.so | ||
187 | namespace.rs.link.vndk.shared_libs += libhwbinder.so | ||
188 | namespace.rs.link.vndk.shared_libs += libion.so | ||
189 | namespace.rs.link.vndk.shared_libs += libutils.so | ||
190 | 140 | ||
191 | ############################################################################### | 141 | ############################################################################### |
192 | # "vndk" namespace | 142 | # "vndk" namespace |
@@ -204,6 +154,8 @@ namespace.vndk.permitted.paths = /odm/${LIB}/hw | |||
204 | namespace.vndk.permitted.paths += /odm/${LIB}/egl | 154 | namespace.vndk.permitted.paths += /odm/${LIB}/egl |
205 | namespace.vndk.permitted.paths += /vendor/${LIB}/hw | 155 | namespace.vndk.permitted.paths += /vendor/${LIB}/hw |
206 | namespace.vndk.permitted.paths += /vendor/${LIB}/egl | 156 | namespace.vndk.permitted.paths += /vendor/${LIB}/egl |
157 | # This is exceptionally required since android.hidl.memory@1.0-impl.so is here | ||
158 | namespace.vndk.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw | ||
207 | 159 | ||
208 | namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp | 160 | namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp |
209 | namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp | 161 | namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp |
@@ -221,21 +173,15 @@ namespace.vndk.asan.permitted.paths += /vendor/${LIB}/hw | |||
221 | namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/egl | 173 | namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/egl |
222 | namespace.vndk.asan.permitted.paths += /vendor/${LIB}/egl | 174 | namespace.vndk.asan.permitted.paths += /vendor/${LIB}/egl |
223 | 175 | ||
176 | namespace.vndk.asan.permitted.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%/hw | ||
177 | namespace.vndk.asan.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw | ||
178 | |||
224 | # When these NDK libs are required inside this namespace, then it is redirected | 179 | # When these NDK libs are required inside this namespace, then it is redirected |
225 | # to the default namespace. This is possible since their ABI is stable across | 180 | # to the default namespace. This is possible since their ABI is stable across |
226 | # Android releases. | 181 | # Android releases. |
227 | namespace.vndk.links = default | 182 | namespace.vndk.links = default |
228 | namespace.vndk.link.default.shared_libs = android.hidl.memory@1.0-impl.so | 183 | namespace.vndk.link.default.shared_libs = %LLNDK_LIBRARIES% |
229 | namespace.vndk.link.default.shared_libs += libEGL.so | 184 | namespace.vndk.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
230 | namespace.vndk.link.default.shared_libs += libc.so | ||
231 | namespace.vndk.link.default.shared_libs += libdl.so | ||
232 | namespace.vndk.link.default.shared_libs += liblog.so | ||
233 | namespace.vndk.link.default.shared_libs += libm.so | ||
234 | namespace.vndk.link.default.shared_libs += libnativewindow.so | ||
235 | namespace.vndk.link.default.shared_libs += libstdc++.so | ||
236 | namespace.vndk.link.default.shared_libs += libsync.so | ||
237 | namespace.vndk.link.default.shared_libs += libvndksupport.so | ||
238 | namespace.vndk.link.default.shared_libs += libz.so | ||
239 | 185 | ||
240 | ############################################################################### | 186 | ############################################################################### |
241 | # Namespace config for vendor processes. In O, no restriction is enforced for | 187 | # Namespace config for vendor processes. In O, no restriction is enforced for |