Merge "TARGET_OUT_DATA_NATIVE_TESTS now points to $(TARGET_OUT_DATA)/nativetest64 in 64-bit target"
diff --git a/tests/dlfcn_test.cpp b/tests/dlfcn_test.cpp
index a79263d..f056fb6 100644
--- a/tests/dlfcn_test.cpp
+++ b/tests/dlfcn_test.cpp
@@ -32,6 +32,18 @@
   g_called = true;
 }
 
+static int g_ctor_function_called = 0;
+
+extern "C" void ctor_function() __attribute__ ((constructor));
+
+extern "C" void ctor_function() {
+  g_ctor_function_called = 17;
+}
+
+TEST(dlfcn, ctor_function_call) {
+  ASSERT_EQ(17, g_ctor_function_called);
+}
+
 TEST(dlfcn, dlsym_in_self) {
   dlerror(); // Clear any pending errors.
   void* self = dlopen(NULL, RTLD_NOW);