| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.Parcel; | 8 import android.os.Parcel; |
| 9 import android.os.ParcelFileDescriptor; | 9 import android.os.ParcelFileDescriptor; |
| 10 import android.os.Parcelable; | 10 import android.os.Parcelable; |
| (...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 mRelroFd = -1; | 1032 mRelroFd = -1; |
| 1033 } | 1033 } |
| 1034 } | 1034 } |
| 1035 | 1035 |
| 1036 // from Parcelable | 1036 // from Parcelable |
| 1037 public LibInfo(Parcel in) { | 1037 public LibInfo(Parcel in) { |
| 1038 mLoadAddress = in.readLong(); | 1038 mLoadAddress = in.readLong(); |
| 1039 mLoadSize = in.readLong(); | 1039 mLoadSize = in.readLong(); |
| 1040 mRelroStart = in.readLong(); | 1040 mRelroStart = in.readLong(); |
| 1041 mRelroSize = in.readLong(); | 1041 mRelroSize = in.readLong(); |
| 1042 ParcelFileDescriptor fd = in.readFileDescriptor(); | 1042 ParcelFileDescriptor fd = ParcelFileDescriptor.CREATOR.createFromPar
cel(in); |
| 1043 // If CreateSharedRelro fails, the OS file descriptor will be -1 and
|fd| will be null. | 1043 // If CreateSharedRelro fails, the OS file descriptor will be -1 and
|fd| will be null. |
| 1044 mRelroFd = (fd == null) ? -1 : fd.detachFd(); | 1044 mRelroFd = (fd == null) ? -1 : fd.detachFd(); |
| 1045 } | 1045 } |
| 1046 | 1046 |
| 1047 // from Parcelable | 1047 // from Parcelable |
| 1048 @Override | 1048 @Override |
| 1049 public void writeToParcel(Parcel out, int flags) { | 1049 public void writeToParcel(Parcel out, int flags) { |
| 1050 if (mRelroFd >= 0) { | 1050 if (mRelroFd >= 0) { |
| 1051 out.writeLong(mLoadAddress); | 1051 out.writeLong(mLoadAddress); |
| 1052 out.writeLong(mLoadSize); | 1052 out.writeLong(mLoadSize); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 } | 1134 } |
| 1135 } | 1135 } |
| 1136 | 1136 |
| 1137 // The map of libraries that are currently loaded in this process. | 1137 // The map of libraries that are currently loaded in this process. |
| 1138 private static HashMap<String, LibInfo> sLoadedLibraries = null; | 1138 private static HashMap<String, LibInfo> sLoadedLibraries = null; |
| 1139 | 1139 |
| 1140 // Used to pass the shared RELRO Bundle through Binder. | 1140 // Used to pass the shared RELRO Bundle through Binder. |
| 1141 public static final String EXTRA_LINKER_SHARED_RELROS = | 1141 public static final String EXTRA_LINKER_SHARED_RELROS = |
| 1142 "org.chromium.base.android.linker.shared_relros"; | 1142 "org.chromium.base.android.linker.shared_relros"; |
| 1143 } | 1143 } |
| OLD | NEW |