aboutsummaryrefslogtreecommitdiff
path: root/libdl
diff options
context:
space:
mode:
authorDmitriy Ivanov <dimitry@google.com>2015-05-21 17:43:49 -0700
committerDmitriy Ivanov <dimitry@google.com>2015-05-27 14:31:36 -0700
commit79fd668bb4ddb22432eeda2ebd8d10359013d9a8 (patch)
treec0f8b611a678275b2f6cab8e4d3b711a6a1aa3f2 /libdl
parentaaafbe128f51dff92da3cf4f5fc9b47f04f05261 (diff)
downloadbionic-79fd668bb4ddb22432eeda2ebd8d10359013d9a8.tar.gz
Add functions to provide target sdk version
Bug: http://b/21364029 Change-Id: I8648d1bff6c8fd6e7cd12da7f128e048b9f2829a
Diffstat (limited to 'libdl')
-rw-r--r--libdl/Android.mk2
-rw-r--r--libdl/libdl.c4
-rw-r--r--libdl/libdl.map39
3 files changed, 44 insertions, 1 deletions
diff --git a/libdl/Android.mk b/libdl/Android.mk
index 2a0724a0b..7b97dc4ad 100644
--- a/libdl/Android.mk
+++ b/libdl/Android.mk
@@ -15,7 +15,7 @@ include $(CLEAR_VARS)
#
# DO NOT REMOVE --exclude-libs!
-LOCAL_LDFLAGS := -Wl,--exclude-libs=libgcc.a
+LOCAL_LDFLAGS := -Wl,--exclude-libs=libgcc.a -Wl,--version-script=$(LOCAL_PATH)/libdl.map
# for x86, exclude libgcc_eh.a for the same reasons as above
LOCAL_LDFLAGS_x86 := -Wl,--exclude-libs=libgcc_eh.a
diff --git a/libdl/libdl.c b/libdl/libdl.c
index dca51b0b0..9a858a36e 100644
--- a/libdl/libdl.c
+++ b/libdl/libdl.c
@@ -17,6 +17,7 @@
#include <dlfcn.h>
#include <link.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <android/dlext.h>
// These are stubs for functions that are actually defined
@@ -38,3 +39,6 @@ void android_get_LD_LIBRARY_PATH(char* buffer __unused, size_t buffer_size __unu
void android_update_LD_LIBRARY_PATH(const char* ld_library_path __unused) { }
void* android_dlopen_ext(const char* filename __unused, int flag __unused, const android_dlextinfo* extinfo __unused) { return 0; }
+
+void android_set_application_target_sdk_version(uint32_t target __unused) { }
+uint32_t android_get_application_target_sdk_version() { return 0; }
diff --git a/libdl/libdl.map b/libdl/libdl.map
new file mode 100644
index 000000000..a911cb67a
--- /dev/null
+++ b/libdl/libdl.map
@@ -0,0 +1,39 @@
+#
+# Copyright (C) 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LIBC {
+ global:
+ android_dlopen_ext;
+ dl_iterate_phdr;
+# begin arm-only
+ dl_unwind_find_exidx;
+# end arm-only
+ dladdr;
+ dlclose;
+ dlerror;
+ dlopen;
+ dlsym;
+ local:
+ *;
+};
+
+LIBC_PRIVATE {
+ global:
+ android_get_application_target_sdk_version;
+ android_set_application_target_sdk_version;
+ android_get_LD_LIBRARY_PATH;
+ android_update_LD_LIBRARY_PATH;
+} LIBC;