| Index: base/android/java/src/org/chromium/base/library_loader/ModernLinker.java
|
| diff --git a/base/android/java/src/org/chromium/base/library_loader/ModernLinker.java b/base/android/java/src/org/chromium/base/library_loader/ModernLinker.java
|
| index 152965b405511dccf243462c9d36f18c1194f924..5abc4e54b0f61d7d4885ddaa3f501b7b00339808 100644
|
| --- a/base/android/java/src/org/chromium/base/library_loader/ModernLinker.java
|
| +++ b/base/android/java/src/org/chromium/base/library_loader/ModernLinker.java
|
| @@ -61,6 +61,9 @@
|
| // The map of libraries that are currently loaded in this process.
|
| private HashMap<String, LibInfo> mLoadedLibraries = null;
|
|
|
| + // The directory used to hold shared RELRO data files. Set up by prepareLibraryLoad().
|
| + private String mDataDirectory = null;
|
| +
|
| // Private singleton constructor, and singleton factory method.
|
| private ModernLinker() { }
|
| static Linker create() {
|
| @@ -117,6 +120,9 @@
|
|
|
| // Create an empty loaded libraries map.
|
| mLoadedLibraries = new HashMap<String, LibInfo>();
|
| +
|
| + // Retrieve the data directory from base.
|
| + mDataDirectory = PathUtils.getDataDirectory(null);
|
|
|
| // Start the current load address at the base load address.
|
| mCurrentLoadAddress = mBaseLoadAddress;
|
| @@ -391,7 +397,7 @@
|
| // We are in the browser, and with a current load address that indicates that
|
| // there is enough address space for shared RELRO to operate. Create the
|
| // shared RELRO, and store it in the map.
|
| - String relroPath = PathUtils.getDataDirectory(null) + "/RELRO:" + libFilePath;
|
| + String relroPath = mDataDirectory + "/RELRO:" + libFilePath;
|
| if (nativeCreateSharedRelro(dlopenExtPath,
|
| mCurrentLoadAddress, relroPath, libInfo)) {
|
| mSharedRelros.put(dlopenExtPath, libInfo);
|
|
|