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

Unified Diff: base/native_library_test_library.cc

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
Index: base/native_library_test_library.cc
diff --git a/base/native_library_test_library.cc b/base/native_library_test_library.cc
new file mode 100644
index 0000000000000000000000000000000000000000..08385066d942ba0966505e76767138a1c6123684
--- /dev/null
+++ b/base/native_library_test_library.cc
@@ -0,0 +1,25 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "build/build_config.h"
+
+#if defined(OS_WIN)
+#define EXPORT __declspec(dllexport)
+#else
+#define EXPORT __attribute__((visibility("default")))
+#endif
+
+extern "C" {
+
+// This symbol name must match the exported symbol in
+// native_library_unittest.cc.
+int EXPORT g_native_library_test_symbol = 0;
+
+int EXPORT GetTestValue() { return 42; }
+
+bool EXPORT IsSameTestSymbolAddress(int* address) {
+ return &g_native_library_test_symbol == address;
+}
+
+} // extern "C"

Powered by Google App Engine
This is Rietveld 408576698