summaryrefslogtreecommitdiffstats
path: root/libdl
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:03:48 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:03:48 -0800
commit4e468ed2eb86a2406e14f1eca82072ee501d05fd (patch)
tree4e05b3c66eef86531e464521a3bf96a1864d4bf5 /libdl
parenta27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 (diff)
downloadbionic-4e468ed2eb86a2406e14f1eca82072ee501d05fd.zip
bionic-4e468ed2eb86a2406e14f1eca82072ee501d05fd.tar.gz
bionic-4e468ed2eb86a2406e14f1eca82072ee501d05fd.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'libdl')
-rw-r--r--libdl/Android.mk8
-rw-r--r--libdl/libdl.c10
2 files changed, 18 insertions, 0 deletions
diff --git a/libdl/Android.mk b/libdl/Android.mk
index 661aa18..150f704 100644
--- a/libdl/Android.mk
+++ b/libdl/Android.mk
@@ -16,6 +16,14 @@ include $(CLEAR_VARS)
# DO NOT REMOVE --exclude-libs!
LOCAL_LDFLAGS := -Wl,--exclude-libs=libgcc.a
+
+# for x86, exclude libgcc_eh.a for the same reasons as above
+ifneq ($(TARGET_SIMULATOR),true)
+ifeq ($(TARGET_ARCH),x86)
+LOCAL_LDFLAGS += -Wl,--exclude-libs=libgcc_eh.a
+endif
+endif
+
LOCAL_SRC_FILES:= libdl.c
LOCAL_MODULE:= libdl
diff --git a/libdl/libdl.c b/libdl/libdl.c
index 0411623..52707f1 100644
--- a/libdl/libdl.c
+++ b/libdl/libdl.c
@@ -21,4 +21,14 @@ void *dlopen(const char *filename, int flag) { return 0; }
char *dlerror(void) { return 0; }
void *dlsym(void *handle, const char *symbol) { return 0; }
int dlclose(void *handle) { return 0; }
+
+#ifdef __arm__
void *dl_unwind_find_exidx(void *pc, int *pcount) { return 0; }
+#elif defined(__i386__)
+/* we munge the cb definition so we don't have to include any headers here.
+ * It won't affect anything since these are just symbols anyway */
+int dl_iterate_phdr(int (*cb)(void *info, void *size, void *data),
+ void *data) { return 0; }
+#else
+#error Unsupported architecture. Only arm and x86 are supported.
+#endif