Initial unified commit for Android 11, syncing up to v311
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
From e3c7e720c893a6ecef90b4b950787ed820792581 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 12 Sep 2019 12:54:23 +0200
|
||||
Subject: [PATCH 1/2] Use vndk_lite ld.config only on same-version vendor
|
||||
|
||||
When running Q over P lite, there is currently absolutely no chance the
|
||||
device boots, because it will be using Q vndk.
|
||||
Thus using ld.config.28.txt when running Q over P lite gives a little more
|
||||
chance for the device to boot, than when using vndk_lite ld.config.
|
||||
Also, once this patch is applied, the required effort to boot
|
||||
Q over P lite is exclusively in vndk, which is manageable.
|
||||
|
||||
Change-Id: I55257cd7c738b1d20582e198e1d5621e1c87a03e
|
||||
---
|
||||
linker/linker.cpp | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/linker/linker.cpp b/linker/linker.cpp
|
||||
index f24167722..a82d7c430 100644
|
||||
--- a/linker/linker.cpp
|
||||
+++ b/linker/linker.cpp
|
||||
@@ -3372,7 +3372,10 @@ static std::string get_ld_config_file_apex_path(const char* executable_path) {
|
||||
}
|
||||
|
||||
static std::string get_ld_config_file_vndk_path() {
|
||||
- if (android::base::GetBoolProperty("ro.vndk.lite", false)) {
|
||||
+ bool same_version_system_vendor = false;
|
||||
+ if(std::to_string(__ANDROID_API__) == Config::get_vndk_version_string('.'))
|
||||
+ same_version_system_vendor = true;
|
||||
+ if (android::base::GetBoolProperty("ro.vndk.lite", false) && same_version_system_vendor) {
|
||||
return kLdConfigVndkLiteFilePath;
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 709393961b2c65d2e9c50fdb5c2db3370811da5c Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 26 Oct 2020 23:23:24 +0100
|
||||
Subject: [PATCH 3/3] Ignore vndk lite when looking for ld.config
|
||||
|
||||
Change-Id: I6927ba11dcb8435fab1866985c177a1852488414
|
||||
---
|
||||
linker/linker.cpp | 8 --------
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/linker/linker.cpp b/linker/linker.cpp
|
||||
index ae2c00c21..ea504c91e 100644
|
||||
--- a/linker/linker.cpp
|
||||
+++ b/linker/linker.cpp
|
||||
@@ -93,7 +93,6 @@ static uint64_t g_module_unload_counter = 0;
|
||||
static const char* const kLdConfigArchFilePath = "/system/etc/ld.config." ABI_STRING ".txt";
|
||||
|
||||
static const char* const kLdConfigFilePath = "/system/etc/ld.config.txt";
|
||||
-static const char* const kLdConfigVndkLiteFilePath = "/system/etc/ld.config.vndk_lite.txt";
|
||||
|
||||
static const char* const kLdGeneratedConfigFilePath = "/linkerconfig/ld.config.txt";
|
||||
|
||||
@@ -3372,13 +3371,6 @@ static std::string get_ld_config_file_apex_path(const char* executable_path) {
|
||||
}
|
||||
|
||||
static std::string get_ld_config_file_vndk_path() {
|
||||
- bool same_version_system_vendor = false;
|
||||
- if(std::to_string(__ANDROID_API__) == Config::get_vndk_version_string('.'))
|
||||
- same_version_system_vendor = true;
|
||||
- if (android::base::GetBoolProperty("ro.vndk.lite", false) && same_version_system_vendor) {
|
||||
- return kLdConfigVndkLiteFilePath;
|
||||
- }
|
||||
-
|
||||
std::string ld_config_file_vndk = kLdConfigFilePath;
|
||||
size_t insert_pos = ld_config_file_vndk.find_last_of('.');
|
||||
if (insert_pos == std::string::npos) {
|
||||
--
|
||||
2.17.1
|
||||
|
||||
Reference in New Issue
Block a user