Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: base/android/java/src/org/chromium/base/library_loader/ModernLinker.java

Issue 1710083004: Support Crazy Linker in WebAPK to load Chrome's uncompressed native libraries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.base.library_loader; 5 package org.chromium.base.library_loader;
6 6
7 import android.os.Bundle; 7 import android.os.Bundle;
8 import android.os.SystemClock; 8 import android.os.SystemClock;
9 9
10 import org.chromium.base.Log; 10 import org.chromium.base.Log;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 synchronized (mLock) { 110 synchronized (mLock) {
111 assert !mPrepareLibraryLoadCalled; 111 assert !mPrepareLibraryLoadCalled;
112 ensureInitializedLocked(); 112 ensureInitializedLocked();
113 113
114 // If in the browser, generate a random base load address for servic e processes 114 // If in the browser, generate a random base load address for servic e processes
115 // and create an empty shared RELROs map. For service processes, the shared 115 // and create an empty shared RELROs map. For service processes, the shared
116 // RELROs map must remain null until set by useSharedRelros(). 116 // RELROs map must remain null until set by useSharedRelros().
117 if (mInBrowserProcess) { 117 if (mInBrowserProcess) {
118 setupBaseLoadAddressLocked(); 118 setupBaseLoadAddressLocked();
119 mSharedRelros = new HashMap<String, LibInfo>(); 119 mSharedRelros = new HashMap<String, LibInfo>();
120 // Retrieve the data directory from base.
121 mDataDirectory = PathUtils.getDataDirectory(null);
120 } 122 }
121 123
122 // Create an empty loaded libraries map. 124 // Create an empty loaded libraries map.
123 mLoadedLibraries = new HashMap<String, LibInfo>(); 125 mLoadedLibraries = new HashMap<String, LibInfo>();
124 126
125 // Retrieve the data directory from base.
126 mDataDirectory = PathUtils.getDataDirectory(null);
127
128 // Start the current load address at the base load address. 127 // Start the current load address at the base load address.
129 mCurrentLoadAddress = mBaseLoadAddress; 128 mCurrentLoadAddress = mBaseLoadAddress;
130 129
131 mPrepareLibraryLoadCalled = true; 130 mPrepareLibraryLoadCalled = true;
132 } 131 }
133 } 132 }
134 133
135 /** 134 /**
136 * Call this method just after loading all native shared libraries in this p rocess. 135 * Call this method just after loading all native shared libraries in this p rocess.
137 * If not in the browser, closes the LibInfo entries used for RELRO sharing. 136 * If not in the browser, closes the LibInfo entries used for RELRO sharing.
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 * @param relroPath Path to the shared RELRO file for this library. 485 * @param relroPath Path to the shared RELRO file for this library.
487 * @param libInfo libInfo instance. On success, the mRelroStart, mRelroSize 486 * @param libInfo libInfo instance. On success, the mRelroStart, mRelroSize
488 * and mRelroFd will be set. 487 * and mRelroFd will be set.
489 * @return true on success, false otherwise. 488 * @return true on success, false otherwise.
490 */ 489 */
491 private static native boolean nativeCreateSharedRelro(String dlopenExtPath, 490 private static native boolean nativeCreateSharedRelro(String dlopenExtPath,
492 long loadAddress, 491 long loadAddress,
493 String relroPath, 492 String relroPath,
494 LibInfo libInfo); 493 LibInfo libInfo);
495 } 494 }
OLDNEW
« no previous file with comments | « base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java ('k') | build/android/rezip/RezipApk.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698