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

Unified Diff: base/native_library.h

Issue 2277863002: Enable loading native libraries with RTLD_DEEPBIND (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/BUILD.gn ('k') | base/native_library.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/native_library.h
diff --git a/base/native_library.h b/base/native_library.h
index b4f3a3cd1ba267000848b09c0ee9d8af7983387f..02eae1d508138e35f31bec5962a196529120d41f 100644
--- a/base/native_library.h
+++ b/base/native_library.h
@@ -65,12 +65,32 @@ struct BASE_EXPORT NativeLibraryLoadError {
#endif // OS_WIN
};
+struct BASE_EXPORT NativeLibraryOptions {
+ NativeLibraryOptions() = default;
+ NativeLibraryOptions(const NativeLibraryOptions& options) = default;
+
+ // If |true|, a loaded library is required to prefer local symbol resolution
+ // before considering global symbols. Note that this is already the default
+ // behavior on most systems. Setting this to |false| does not guarantee the
+ // inverse, i.e., it does not force a preference for global symbols over local
+ // ones.
+ bool prefer_own_symbols = false;
+};
+
// Loads a native library from disk. Release it with UnloadNativeLibrary when
// you're done. Returns NULL on failure.
// If |error| is not NULL, it may be filled in on load error.
BASE_EXPORT NativeLibrary LoadNativeLibrary(const FilePath& library_path,
NativeLibraryLoadError* error);
+// Loads a native library from disk. Release it with UnloadNativeLibrary when
+// you're done. Returns NULL on failure.
+// If |error| is not NULL, it may be filled in on load error.
+BASE_EXPORT NativeLibrary LoadNativeLibraryWithOptions(
+ const FilePath& library_path,
+ const NativeLibraryOptions& options,
+ NativeLibraryLoadError* error);
+
#if defined(OS_WIN)
// Loads a native library from disk. Release it with UnloadNativeLibrary when
// you're done.
« no previous file with comments | « base/BUILD.gn ('k') | base/native_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698